/* =============================================
   haru.systems — Frutiger Aero Design System
   Coastal Blend Palette
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
    --deep-aquamarine: #0D7FA8;
    --lagoon-teal: #4EC4D9;
    --pale-horizon: #A8E4F0;
    --arctic-white: #F0F9FC;
    --deep-harbor: #1B3A4B;
    --coastal-blue: #2D7EA8;
    --white: #FFFFFF;

    /* Glass treatment */
    --glass-fill: rgba(255, 255, 255, 0.15);
    --glass-fill-strong: rgba(255, 255, 255, 0.22);
    --glass-border: rgba(255, 255, 255, 0.40);
    --glass-shadow: 0 8px 32px rgba(13, 127, 168, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    --glass-blur: blur(12px) saturate(180%);

    /* Gradients */
    --hero-gradient: linear-gradient(135deg, #1B3A4B 0%, #0D7FA8 55%, #4EC4D9 100%);
    --section-transition: linear-gradient(180deg, #A8E4F0 0%, #F0F9FC 100%);
    --cta-gradient: linear-gradient(145deg, #1B3A4B 0%, #0D7FA8 100%);

    /* Typography */
    --font-display: 'Nunito Sans', system-ui, sans-serif;
    --font-body: 'Source Sans 3', system-ui, sans-serif;
    --font-numeral: 'DM Sans', system-ui, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--arctic-white);
    color: var(--deep-harbor);
    line-height: 1.75;
    overflow-x: hidden;
}

/* --- Typography Base --- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
}

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

.section-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--hero-gradient);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}

/* Blob container anchored to left, slightly off-canvas */
.hero-blob-container {
    position: absolute;
    left: -12%;
    top: 50%;
    transform: translateY(-50%);
    width: 800px;
    height: 800px;
    pointer-events: none;
}

.blob-hero {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 20px 60px rgba(13, 127, 168, 0.35));
}

.blob-path {
    transition: d 0.8s ease-in-out;
}

/* Hero content — right side */
.hero-content {
    position: relative;
    z-index: 2;
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 48px 80px 0;
    min-height: 100vh;
}

/* Glass panel — Aero treatment */
.glass-panel {
    background: var(--glass-fill);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 56px 52px;
    width: 540px;
    max-width: 100%;
}

.hero-glass {
    width: 540px;
}

.hero-logotype {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 72px;
    color: var(--arctic-white);
    letter-spacing: -0.025em;
    line-height: 1.0;
    margin-bottom: 20px;
}

.hero-descriptor {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 18px;
    color: var(--pale-horizon);
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* CTA Button — primary */
.btn-primary {
    display: inline-block;
    background: var(--deep-aquamarine);
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    padding: 14px 36px;
    border-radius: 50px;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(13, 127, 168, 0.4), 0 1px 4px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.15), transparent);
    border-radius: 50px 50px 0 0;
    pointer-events: none;
}

.btn-primary:hover {
    background: var(--lagoon-teal);
    box-shadow: 0 6px 28px rgba(78, 196, 217, 0.5), 0 2px 6px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

/* Secondary button */
.btn-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--pale-horizon);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    padding: 14px 36px;
    border-radius: 50px;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.15);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* Chrome rule separator */
.hero-separator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, rgba(168, 228, 240, 0.15) 100%);
    pointer-events: none;
}

.chrome-rule {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, #4EC4D9 0%, rgba(168, 228, 240, 0.6) 40%, transparent 100%);
}

/* =============================================
   IDENTITY / PURPOSE SECTION
   ============================================= */

.section-identity {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(180deg, #0D7FA8 0%, #A8E4F0 40%, #F0F9FC 100%);
    display: flex;
    align-items: center;
    padding: 100px 48px;
    max-width: 100%;
    overflow: hidden;
}

.identity-illustration {
    width: 40%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 60px;
}

.illustration-coastal {
    width: 100%;
    max-width: 400px;
    height: auto;
    opacity: 0.75;
    filter: drop-shadow(0 12px 40px rgba(13, 127, 168, 0.25));
}

.identity-text-block {
    flex: 1;
    max-width: 60%;
}

.section-eyebrow {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--deep-aquamarine);
    margin-bottom: 16px;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 48px;
    color: var(--deep-harbor);
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin-bottom: 40px;
}

.identity-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.identity-col {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--deep-harbor);
    line-height: 1.75;
}

/* =============================================
   FEATURES / SYSTEMS SECTION
   ============================================= */

.section-features {
    background: linear-gradient(180deg, #F0F9FC 0%, #E8F6FB 100%);
    padding: 100px 0;
    overflow: hidden;
}

.features-header {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px;
    margin-bottom: 80px;
}

.features-header .section-heading {
    font-size: 56px;
    color: var(--deep-harbor);
}

.features-list {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 48px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.feature-block {
    display: flex;
    align-items: center;
    gap: 60px;
    min-height: 340px;
}

.feature-block--right {
    flex-direction: row-reverse;
}

.feature-illustration {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-illustration svg {
    width: 220px;
    height: 220px;
    filter: drop-shadow(0 8px 30px rgba(13, 127, 168, 0.2));
}

/* Glass card — Aero morphism */
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.40);
    border-left: 1px solid rgba(255, 255, 255, 0.40);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(13, 127, 168, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 44px 48px;
    flex: 1;

    /* Entrance animation — initial state */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.glass-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card {
    background: rgba(255, 255, 255, 0.18);
}

.feature-icon {
    margin-bottom: 24px;
}

.feature-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    color: var(--deep-harbor);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.feature-body {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--deep-harbor);
    line-height: 1.75;
    opacity: 0.85;
}

/* =============================================
   SOCIAL PROOF / DATA SECTION
   ============================================= */

.section-data {
    position: relative;
    min-height: 80vh;
    background: linear-gradient(180deg, #E8F6FB 0%, #F0F9FC 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 48px;
    overflow: hidden;
}

/* Ghost numerals — background texture */
.data-numerals-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ghost-numeral {
    position: absolute;
    font-family: var(--font-numeral);
    font-weight: 300;
    font-size: 280px;
    color: var(--deep-aquamarine);
    opacity: 0.06;
    line-height: 1;
    user-select: none;
    white-space: nowrap;
}

.data-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.data-statement {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.data-statement.visible {
    opacity: 1;
    transform: translateY(0);
}

.data-statement--large {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-number {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 80px;
    color: var(--deep-aquamarine);
    letter-spacing: -0.03em;
    line-height: 1;
}

.data-label {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--deep-harbor);
    line-height: 1.5;
    opacity: 0.8;
}

.data-divider {
    height: 1px;
    background: linear-gradient(90deg, var(--lagoon-teal) 0%, transparent 100%);
    opacity: 0.3;
}

.data-quote {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 26px;
    color: var(--deep-harbor);
    line-height: 1.5;
    letter-spacing: -0.01em;
    font-style: normal;
    margin-bottom: 12px;
}

.data-cite {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--coastal-blue);
    letter-spacing: 0.04em;
    display: block;
}

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

.section-cta {
    position: relative;
    min-height: 100vh;
    background: var(--cta-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Blob decorations in corners */
.cta-blob-left {
    position: absolute;
    left: -80px;
    bottom: -60px;
    width: 500px;
    height: 500px;
    pointer-events: none;
}

.cta-blob-right {
    position: absolute;
    right: -60px;
    top: -40px;
    width: 400px;
    height: 400px;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 48px;
}

.cta-glass {
    background: rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    border-left: 1px solid rgba(255, 255, 255, 0.45);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 680px;
    width: 100%;
    text-align: center;
    padding: 72px 64px;
}

.cta-eyebrow {
    color: var(--lagoon-teal);
    margin-bottom: 20px;
}

.cta-heading {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 56px;
    color: var(--arctic-white);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 24px;
}

.cta-body {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--pale-horizon);
    line-height: 1.7;
    margin-bottom: 48px;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.cta-meta {
    opacity: 0.5;
}

.cta-meta .data-cite {
    color: var(--pale-horizon);
}

/* =============================================
   SECTION-TO-SECTION GRADIENT TRANSITIONS
   ============================================= */

/* Gradient wash between hero and identity */
.section-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, #0D7FA8 100%);
    pointer-events: none;
    z-index: 1;
}

/* Gradient wash between identity and features */
.section-identity::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, transparent 0%, #F0F9FC 100%);
    pointer-events: none;
}

/* =============================================
   ANIMATIONS
   ============================================= */

/* Chrome ring rotation (continuous) */
@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#chrome-ring {
    transform-origin: 450px 450px;
    animation: rotateRing 30s linear infinite;
}

/* Blob morphing keyframes */
@keyframes blobMorph {
    0%   { d: path("M450,150 C600,100 780,200 820,380 C860,560 760,720 580,780 C400,840 200,760 140,580 C80,400 160,220 320,160 C360,145 410,155 450,150Z"); }
    25%  { d: path("M420,140 C580,85 790,185 825,375 C860,565 750,730 565,785 C380,840 185,758 135,568 C85,378 175,210 340,150 C375,138 400,145 420,140Z"); }
    50%  { d: path("M465,160 C625,105 800,215 828,400 C856,585 748,735 558,788 C368,841 170,762 126,572 C82,382 148,210 318,162 C355,148 440,163 465,160Z"); }
    75%  { d: path("M435,145 C595,92 788,195 822,382 C856,569 752,726 568,782 C384,838 182,755 132,565 C82,375 168,215 335,155 C368,143 412,148 435,145Z"); }
    100% { d: path("M450,150 C600,100 780,200 820,380 C860,560 760,720 580,780 C400,840 200,760 140,580 C80,400 160,220 320,160 C360,145 410,155 450,150Z"); }
}

@keyframes blobScale {
    0%, 100% { transform: scale(1.0); }
    50% { transform: scale(1.02); }
}

#blob-main-path {
    animation: blobMorph 16s ease-in-out infinite, blobScale 16s ease-in-out infinite;
}

.blob-shadow {
    animation: blobMorph 16s ease-in-out infinite;
    animation-delay: 0.1s;
}

.blob-highlight {
    animation: blobMorph 16s ease-in-out infinite;
}

/* Identity blob */
@keyframes identityBlobMorph {
    0%, 100% { d: path("M160,500 C220,470 300,480 340,520 C380,560 360,600 300,610 C240,620 160,600 130,560 C100,520 100,530 160,500Z"); }
    50%       { d: path("M155,495 C215,462 308,475 348,518 C388,561 366,606 305,615 C244,624 158,598 128,558 C98,518 95,528 155,495Z"); }
}

#identity-blob {
    animation: identityBlobMorph 24s ease-in-out infinite;
}

/* CTA blob slow morph */
@keyframes ctaBlobMorph {
    0%, 100% { d: path("M250,80 C340,60 420,120 440,220 C460,320 400,420 300,450 C200,480 100,430 70,330 C40,230 80,120 180,90 C210,80 230,83 250,80Z"); }
    50%       { d: path("M255,75 C348,55 428,118 448,220 C468,322 406,426 304,455 C202,484 98,432 68,332 C38,232 78,118 178,86 C208,76 232,78 255,75Z"); }
}

#cta-blob-left-path {
    animation: ctaBlobMorph 22s ease-in-out infinite;
}

/* Stagger entrance for feature cards */
.feature-block:nth-child(1) .glass-card { transition-delay: 0ms; }
.feature-block:nth-child(2) .glass-card { transition-delay: 80ms; }
.feature-block:nth-child(3) .glass-card { transition-delay: 160ms; }
.feature-block:nth-child(4) .glass-card { transition-delay: 240ms; }

/* =============================================
   RESPONSIVE — Mobile (≤768px)
   ============================================= */

@media (max-width: 768px) {
    .hero-blob-container {
        width: 400px;
        height: 400px;
        left: -20%;
        top: 20%;
        transform: none;
    }

    .hero-content {
        width: 100%;
        padding: 60px 24px;
        justify-content: center;
    }

    .hero-glass {
        width: 100%;
    }

    .hero-logotype {
        font-size: 44px;
    }

    .section-identity {
        flex-direction: column;
        padding: 80px 24px;
    }

    .identity-illustration {
        width: 100%;
        padding-right: 0;
        margin-bottom: 48px;
    }

    .identity-text-block {
        max-width: 100%;
    }

    .identity-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .section-heading {
        font-size: 36px;
    }

    .features-list {
        padding: 0 24px;
        gap: 60px;
    }

    .feature-block,
    .feature-block--right {
        flex-direction: column;
    }

    .feature-illustration {
        width: 160px;
    }

    .feature-illustration svg {
        width: 160px;
        height: 160px;
    }

    .glass-card {
        padding: 32px 28px;
    }

    .section-data {
        padding: 80px 24px;
    }

    .data-number {
        font-size: 56px;
    }

    .data-quote {
        font-size: 20px;
    }

    .ghost-numeral {
        font-size: 160px;
    }

    .cta-glass {
        padding: 48px 32px;
    }

    .cta-heading {
        font-size: 38px;
    }

    .cta-blob-left, .cta-blob-right {
        width: 250px;
        height: 250px;
    }
}
