/* ============================================================
   KYNOR — Premium Enterprise Identity
   Stylesheet
   ============================================================ */

/* ===== CSS VARIABLES ===== */

:root {
    --bg-dark:      #040609;                        /* Deep night blue, near black */
    --bg-panel:     #070B11;                        /* Slightly lighter panel background */
    --color-text:   #A1A8B4;                        /* Muted grey for body text */
    --color-heading:#F3F5F7;                        /* Cold pure white for headings */
    --color-silver: #C0C5CC;                        /* Metallic silver accent */
    --border-color: rgba(192, 197, 204, 0.15);      /* Thin metallic separator lines */
    --color-success: #10B981;                        /* Emerald green for success states */
    --color-error:   #EF4444;                        /* Crimson red for error states */

    --font-heading: 'Inter', sans-serif;
    --font-body:    'Inter', sans-serif;
    --font-logo:    'Cinzel', serif;
}

/* ===== RESET ===== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* ===== BACKGROUND GRID ===== */

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 80px 80px;
}

/* ===== LAYOUT ===== */

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */

h1, h2, h3 {
    color: var(--color-heading);
    font-family: var(--font-heading);
    text-transform: uppercase;
}

/* Section label with decorative trailing line */
.section-title {
    font-size: 0.85rem;
    letter-spacing: 4px;
    font-weight: 500;
    margin-bottom: 60px;
    color: var(--color-silver);
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-title::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background-color: var(--border-color);
}

/* ===== BUTTONS ===== */

.btn {
    display: inline-block;
    padding: 18px 40px;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Filled button — inverts on hover */
.btn-solid {
    background-color: var(--color-heading);
    color: var(--bg-dark);
    border: 1px solid var(--color-heading);
}

.btn-solid:hover {
    background-color: transparent;
    color: var(--color-heading);
}

/* ===== HEADER / NAVIGATION ===== */

.header {
    position: fixed;
    top: 0;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(4, 6, 9, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-name {
    height: 15px;
    width: auto;
}

.nav {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--color-heading);
}

/* Contact button in nav — bordered */
.btn-contact {
    color: var(--color-heading);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
}

.btn-contact:hover {
    background-color: var(--color-heading);
    color: var(--bg-dark);
}

/* ===== HERO SECTION ===== */

.hero {
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

/* Subtle radial glow behind hero text */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(192, 197, 204, 0.03) 0%, transparent 70%);
    transform: translateY(-50%);
    z-index: -1;
}

/* Left-bordered label above main title */
.hero-label {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-silver);
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 1px solid var(--color-silver);
}

.hero-title {
    font-size: clamp(3.5rem, 6vw, 6rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 40px;
}

.hero-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 50px;
}

/* ===== ANCHOR OFFSET =====
   Compensates for the fixed header (80px) when jumping to a section.
   The browser will stop scrolling 80px before the element's top edge. */

#process,
#vision,
#contact {
    scroll-margin-top: 80px;
}

/* ===== PROCESS / METRICS ===== */

.metrics {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

/* Each step block, separated by a right border */
.metric-block {
    padding: 80px 40px;
    border-right: 1px solid var(--border-color);
}

.metric-block:last-child {
    border-right: none;
}

.metric-value {
    font-family: var(--font-logo);
    font-size: 2rem;
    color: var(--color-silver);
    margin-bottom: 20px;
}

.metric-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-heading);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.metric-desc {
    font-size: 0.9rem;
}

/* ===== SERVICES SECTION ===== */

#services {
    background-color: var(--bg-dark);
    scroll-margin-top: 80px;
}

.services {
    padding: 100px 0;
    border-bottom: 1px solid var(--border-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
}

.service-card {
    background-color: var(--bg-panel);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: background-color 0.3s ease;
}

.service-card:hover {
    background-color: rgba(192, 197, 204, 0.03);
}

.service-tag {
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-silver);
    padding-left: 14px;
    border-left: 1px solid var(--color-silver);
}

.service-name {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.4;
    color: var(--color-heading);
    text-transform: none;
}

.service-desc {
    font-size: 0.9rem;
    line-height: 1.8;
    flex-grow: 1;
}

.service-stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.service-stack span {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-text);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
}

/* ===== VISION SECTION ===== */

.vision {
    padding: 100px 0;
    border-bottom: 1px solid var(--border-color);
}

/* Two-column layout: 3D visual left, text right */
.vision-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

/* Container for the Three.js canvas */
.vision-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Canvas fills its container */
#vision-canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.vision-text {
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* ===== CONTACT SECTION ===== */

.contact {
    background-color: var(--bg-dark);
    padding: 120px 0;
}

.contact-wrapper {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 80px;
}

.contact-header {
    margin-bottom: 60px;
    text-align: center;
}

.contact-header h2 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

/* Premium Form Styling (Centered maximal layout) */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    position: relative;
    width: 100%;
}

/* Styled text inputs & textareas matching the corporate tech aesthetic */
.form-group input,
.form-group textarea {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--color-heading);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 1px;
    padding: 18px 20px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none;
}

.form-group textarea {
    resize: none;
}

/* Custom placeholder styling matching the muted text identity */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(161, 168, 180, 0.4);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
}

/* Focus state with crisp metallic response */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-silver);
    box-shadow: inset 0 0 8px rgba(192, 197, 204, 0.03);
}

/* Enforcing button layout and pointer action inside the form */
.btn-submit {
    width: 100%;
    text-align: center;
    cursor: pointer;
    border-radius: 0;
}

/* ===== FOOTER ===== */

.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    background-color: var(--bg-dark);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    height: 15px;
    width: auto;
}

.footer-legal {
    font-size: 0.75rem;
    color: #555;
    letter-spacing: 1px;
}

/* ===== TOAST NOTIFICATION ===== */

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #070B14;
    border: 1px solid #10B981;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.06);
}

.toast-success {
    border: 1px solid var(--color-success);
}

.toast-error {
    border: 1px solid var(--color-error);
}

/* Toggled via JavaScript upon successful API response */
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    color: #10B981;
    font-weight: bold;
    font-size: 1.1rem;
}

.toast-text {
    color: var(--color-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-body);
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 992px) {
    .metrics-grid     { grid-template-columns: 1fr; }
    .metric-block     { border-right: none; border-bottom: 1px solid var(--border-color); padding: 50px 20px; }
    .vision-container { grid-template-columns: 1fr; }
    .vision-visual    { height: 300px; }
    .services-grid    { grid-template-columns: 1fr; }
    .service-card     { border-right: none; border-bottom: 1px solid var(--border-color); }
    .service-card:last-child { border-bottom: none; }
}

/* Mobile */
@media (max-width: 768px) {
    .hero-title      { font-size: 3rem; }
    .nav             { display: none; }
    .contact-wrapper { padding: 40px 20px; }
    .footer-inner    { flex-direction: column; gap: 20px; text-align: center; }
    .service-card    { padding: 40px 24px; }
}

@media (max-width: 768px) {
    .toast {
        width: calc(100% - 40px);
        bottom: 20px;
        justify-content: center;
    }
}
