/* ═══════════════════════════════════════════════════════════════
   SUPERNEW — Official Site
   Design System: Stripe-inspired (Indigo + Gradient Mesh)
   Archetype: #11 Bento Box Grid
   Effects: Gradient Text + Magnetic Button
   ═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens (Stripe DESIGN.md) ─── */
:root {
    /* Brand */
    --color-primary: #533afd;
    --color-primary-deep: #4434d4;
    --color-primary-press: #2e2b8c;
    --color-primary-soft: rgba(83, 58, 253, 0.08);
    --color-primary-subdued: #b9b9f9;

    /* Surfaces */
    --color-canvas: #ffffff;
    --color-canvas-soft: #f6f9fc;
    --color-canvas-cream: #f5e9d4;

    /* Text */
    --color-ink: #0d253d;
    --color-ink-secondary: #273951;
    --color-ink-muted: #64748b;

    /* Accents for mesh */
    --color-ruby: #ea2261;
    --color-lavender: #c4b5fd;

    /* Borders */
    --color-hairline: #e3e8ee;
    --color-hairline-input: #a8c3de;

    /* Shadows */
    --shadow-card: rgba(0, 55, 112, 0.08) 0 1px 3px;
    --shadow-card-hover: rgba(0, 55, 112, 0.08) 0 8px 24px, rgba(0, 55, 112, 0.04) 0 2px 6px;

    /* Typography */
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-xxl: 32px;
    --space-section: 80px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;

    /* Layout */
    --max-width: 1120px;
    --nav-height: 56px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    line-height: 1.4;
    color: var(--color-ink);
    background: var(--color-canvas);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection { background: var(--color-primary); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.container { width: min(calc(100% - 48px), var(--max-width)); margin: 0 auto; }

/* ─── Typography ─── */
.eyebrow {
    display: inline-block;
    margin-bottom: var(--space-xl);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
}

h1, h2, h3 { font-family: var(--font-display); color: var(--color-ink); }

h1 {
    font-size: clamp(38px, 5vw, 52px);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -1.2px;
}

h2 {
    font-size: clamp(28px, 3.5vw, 36px);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.6px;
}

h3 {
    font-size: 20px;
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

p { color: var(--color-ink-secondary); line-height: 1.6; }

/* ─── Gradient Text ─── */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-ruby) 50%, var(--color-primary) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

/* ─── Navigation ─── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 0 var(--color-hairline);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: min(calc(100% - 48px), var(--max-width));
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-ink);
    transition: opacity 0.2s ease;
}
.nav-logo:hover { opacity: 0.7; }
.nav-logo-mark { color: var(--color-primary); }

.nav-logo-text {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-links { display: flex; align-items: center; gap: var(--space-xl); }
.nav-links a {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-ink-muted);
    transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--color-ink); }

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    padding: 2px;
}
.nav-hamburger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--color-ink);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    z-index: 99;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-mobile.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-mobile a {
    display: block;
    padding: var(--space-lg) var(--space-xl);
    font-size: 17px;
    font-weight: 500;
    border-bottom: 1px solid var(--color-hairline);
    color: var(--color-ink);
    transition: background-color 0.15s ease;
}
.nav-mobile a:hover { background: var(--color-canvas-soft); }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    padding: 0 20px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0;
    transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
    background: var(--color-primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(83, 58, 253, 0.25);
}
.btn-primary:hover {
    background: var(--color-primary-deep);
    box-shadow: 0 4px 16px rgba(83, 58, 253, 0.35);
}

/* ─── Hero Section — Bento Grid ─── */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: calc(var(--nav-height) + 40px) var(--space-xl) var(--space-xxl);
    overflow: hidden;
}

/* Gradient Mesh Background */
.hero-mesh { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.mesh-blob { position: absolute; border-radius: 50%; }

.mesh-blob--1 {
    width: 500px; height: 400px;
    top: -8%; right: -5%;
    background: radial-gradient(circle, rgba(83, 58, 253, 0.06) 0%, transparent 60%);
}
.mesh-blob--2 {
    width: 350px; height: 350px;
    top: 15%; left: 30%;
    background: radial-gradient(circle, rgba(196, 181, 253, 0.12) 0%, transparent 55%);
}
.mesh-blob--3 {
    width: 280px; height: 280px;
    bottom: 10%; right: 20%;
    background: radial-gradient(circle, rgba(234, 34, 97, 0.04) 0%, transparent 55%);
}
.mesh-blob--4 {
    width: 200px; height: 200px;
    bottom: 20%; left: 5%;
    background: radial-gradient(circle, rgba(245, 233, 212, 0.3) 0%, transparent 55%);
}

/* Bento Grid Layout */
.hero-bento {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 32px), var(--max-width));
    margin: 0 auto;
    max-width: 600px;
}

.bento-hero-text {
    grid-column: 1 / -1;
}

.hero-badge {
    display: inline-block;
    margin-bottom: var(--space-xl);
    padding: 6px 14px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
}

.hero-title {
    margin-bottom: var(--space-xl);
}

.hero-sub {
    max-width: 48ch;
    margin-bottom: var(--space-xl);
    font-size: 16px;
    color: var(--color-ink-muted);
}

/* ─── Sections ─── */
.section { padding: var(--space-section) 0; }
.section--story { background: var(--color-canvas-soft); }
.section--services { background: var(--color-canvas); }
.section--contact { background: var(--color-canvas-soft); }

.section-header { text-align: center; max-width: 560px; margin: 0 auto var(--space-xxl); }
.section-header h2 { margin-bottom: var(--space-sm); }

/* ─── Story — Bento ─── */
.story-bento {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-xxl);
    align-items: center;
}

.story-accent {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-deep));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 40px rgba(83, 58, 253, 0.18);
}

.story-accent-text {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    text-align: center;
    letter-spacing: -0.02em;
}

.story-body h2 { margin-bottom: var(--space-xl); }
.story-body p + p { margin-top: var(--space-md); }

/* ─── Services — Bento Grid ─── */
.services-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.svc-card {
    padding: var(--space-xxl);
    background: var(--color-canvas);
    border: 1px solid var(--color-hairline);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.svc-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translate3d(0, -3px, 0);
}

.svc-card--wide { grid-column: 1 / -1; }

.svc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    margin-bottom: var(--space-xl);
}

.svc-card h3 { margin-bottom: var(--space-sm); }
.svc-card p { font-size: 14px; }

/* ─── Contact — Bento ─── */
.contact-bento {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xxl);
    align-items: start;
}

.contact-text h2 { margin-bottom: var(--space-xl); }
.contact-text p { max-width: 40ch; }

.contact-form {
    background: var(--color-canvas);
    border: 1px solid var(--color-hairline);
    border-radius: var(--radius-lg);
    padding: var(--space-xxl);
    box-shadow: var(--shadow-card);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.form-group { margin-bottom: var(--space-lg); }

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-ink);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-hairline-input);
    border-radius: var(--radius-sm);
    background: var(--color-canvas);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--color-ink-muted); opacity: 0.6; }

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(83, 58, 253, 0.1);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}
.form-group textarea { resize: vertical; min-height: 100px; }

.btn-submit { margin-top: var(--space-sm); gap: 8px; }
.btn-submit svg { flex-shrink: 0; }
.form-status { margin-top: var(--space-md); font-size: 13px; color: var(--color-ink-muted); min-height: 18px; }

/* ─── Footer ─── */
.footer {
    background: var(--color-canvas);
    border-top: 1px solid var(--color-hairline);
    padding: var(--space-xl) 0;
}
.footer-inner { display: flex; align-items: center; justify-content: center; }
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-ink);
    opacity: 0.4;
    transition: opacity 0.2s ease;
}
.footer-logo:hover { opacity: 0.8; }
.footer-logo-mark { color: var(--color-primary); }
.footer-logo span {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ─── Scroll Reveal ─── */
[data-reveal] {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: translate3d(0, 0, 0); }

/* ─── Responsive: Tablet (≤ 1024px) ─── */
@media (max-width: 1024px) {
    .story-bento { grid-template-columns: 1fr; gap: var(--space-xl); }
    .story-accent { max-width: 240px; margin: 0 auto; }
    .contact-bento { grid-template-columns: 1fr; gap: var(--space-xl); }
    .contact-text p { max-width: none; }
}

/* ─── Responsive: Mobile (≤ 768px) ─── */
@media (max-width: 768px) {
    :root { --space-section: 56px; }
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
    .nav-mobile { display: flex; }

    .hero { min-height: auto; padding: calc(var(--nav-height) + 60px) var(--space-lg) var(--space-xl); }

    .services-bento { grid-template-columns: 1fr; }
    .svc-card--wide { grid-column: 1; }

    .form-row { grid-template-columns: 1fr; }
    .contact-form { padding: var(--space-xl); }

    .btn { width: 100%; text-align: center; }
}

/* ─── Responsive: Small phone (≤ 480px) ─── */
@media (max-width: 480px) {
    .container { width: calc(100% - 32px); }
    .hero-title { font-size: 32px; }
    .contact-form { padding: var(--space-lg); }
    .svc-card { padding: var(--space-xl); }
}
