/* ─── Tiempos Headline — drop woff2 files into /fonts/ ─────── */
@font-face {
    font-family: 'Tiempos Headline';
    src: url('./fonts/TiemposHeadline-Light.woff2') format('woff2'),
         url('./fonts/TiemposHeadline-Light.woff')  format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Tiempos Headline';
    src: url('./fonts/TiemposHeadline-Regular.woff2') format('woff2'),
         url('./fonts/TiemposHeadline-Regular.woff')  format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

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

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
    --bg:         #ffffff;
    --bg-card:    #f5f4f2;
    --text:       #111111;
    --text-muted: #767676; /* AA accessible — 4.5:1 contrast on white */
    --text-dim:   #777777;
    --accent:     #5b4fcf;
    --accent-glow: rgba(91, 79, 207, 0.08);
    --border:     rgba(0, 0, 0, 0.09);
    --border-hover: rgba(91, 79, 207, 0.4);

    --font-display: 'Gilroy Free', 'Gilroy', 'Inter', sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;
    --font-serif:   'DM Serif Display', Georgia, serif;
}

/* ─── Base ───────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    cursor: none;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Grain texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.038;
    pointer-events: none;
    z-index: 9990;
}

/* ─── Custom Cursor ──────────────────────────────────────── */
.cursor-dot {
    width: 5px;
    height: 5px;
    background: var(--text);  /* #111 in light mode */
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    opacity: 0; /* hidden until mouse enters */
}

.cursor-ring {
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9998;
    will-change: transform;
    transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
    opacity: 0; /* hidden until mouse enters */
}

body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring,
body:has(.project-card:hover) .cursor-ring {
    width: 56px;
    height: 56px;
    border-color: var(--accent);
    background: var(--accent-glow);
}

/* ─── Navigation ─────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 2.7vw 16px 0.5vw;
}

.nav-logo {
    display: block;
    width: 6.1vw;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2.9vw;
}

.nav-links a {
    color: rgba(5, 5, 5, 0.5);
    text-decoration: none;
    font-family: 'Tiempos Headline', Georgia, serif;
    font-weight: 300;
    font-size: 1.5vw;
    letter-spacing: -0.01em;
    line-height: 1.03;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--text); }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
    height: 100svh;
    position: relative;
    overflow: hidden;
    background: var(--bg);
    --hl-size: clamp(40px, 12.11vw, 155px);
}

/* Hero contact bar */
.hero-contact {
    position: absolute;
    bottom: 28px;
    right: 7vw;
    display: flex;
    align-items: center;
    gap: 28px;
}

.hero-contact-email,
.hero-contact-link {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: color 0.3s;
}

.hero-contact-email:hover,
.hero-contact-link:hover { color: var(--text); }

/* Hero text — absolutely positioned from Figma (1200 × 832) */
.hl {
    position: absolute;
    font-family: 'Tiempos Headline', Georgia, serif;
    font-weight: 300;
    color: #050505;
    letter-spacing: -0.01em;
    line-height: 1.03;
    white-space: nowrap;
    margin: 0;
    left: 2vw;
}

.hl--1 { font-size: var(--hl-size); top: 20.5vh; }
.hl--2 { font-size: var(--hl-size); top: calc(20.5vh + 1.1 * var(--hl-size)); }
.hl--3 { font-size: var(--hl-size); top: calc(20.5vh + 2.2 * var(--hl-size)); }

/* Character spans created in JS for hover dispersion */
.hl-char {
    display: inline-block;
    will-change: transform, opacity;
}

/*
  Figma Lines SVG: full-viewport coordinate system, design width = 1280px.
  Lines at x = 127, 334, 541, 747, 954, 1161 → expressed as vw fractions.
  Lines 2, 3, 6 use accent-line formulas (exact Figma % + px offset).
  Lines 1, 4, 5 use simple vw (127/1280, 747/1280, 954/1280).
*/

.hero-vline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(5, 5, 5, 0.12);
    transform-origin: top center;
}

.hero-vline--1 { left: 9.92vw; }                      /* 127/1280 */
.hero-vline--2 { left: calc(25vw + 14px); }            /* 334/1280 — matches btm-l accent */
.hero-vline--3 { left: calc(41.67vw + 7.67px); }       /* 541/1280 — matches top accent */
.hero-vline--4 { left: 58.36vw; }                      /* 747/1280 */
.hero-vline--5 { left: 74.53vw; }                      /* 954/1280 */
.hero-vline--6 { left: calc(91.67vw - 12.33px); }      /* 1161/1280 — matches btm-r accent */

/*
  Darker vertical accent lines — Line184 / 185 / 186
  These are vertical segments, darker than the grid lines.
  Heights converted from px / 832px frame height.
*/
.hero-accent {
    position: absolute;
    width: 1px;
    background: #050505;
}

/* Line184 — top: hangs down from above the viewport */
.hero-accent--top {
    left: calc(41.67vw + 7.67px);
    top: -5px;
    height: 17.2vh; /* 143 / 832 */
}

/* Line185 — bottom-left: rises from the bottom edge */
.hero-accent--btm-l {
    left: 58.36vw;  /* moved to vline--4 (747/1280) */
    top: 82vh;      /* 682 / 832 */
    height: 18vh;   /* 150 / 832 — reaches bottom exactly */
}

/* Line186 — bottom-right: longer, also reaches the bottom edge */
.hero-accent--btm-r {
    left: calc(91.67vw - 12.33px);
    top: 59.4vh;    /* 494 / 832 */
    height: 40.6vh; /* 338 / 832 — reaches bottom exactly */
}

/* Rotated identity label */
.hero-label {
    position: absolute;
    left: calc(91.67vw + 46.67px);
    bottom: 28px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 500;
    color: rgba(5, 5, 5, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

/* Chat messages box — frosted glass, hidden until first message */
.hero-messages {
    position: absolute;
    left: 24px;
    bottom: calc(11vh + 10px);
    top: auto;
    width: 500px;
    height: 57.9vh;
    overflow: hidden; /* clips scrollbar to border-radius */
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
    border-radius: 33px;
    box-shadow: 0px -10.656px 42.622px 0px rgba(0,0,0,0.1),
                0px 15.983px 33.298px 0px rgba(0,0,0,0.15);
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.hero-messages.is-active {
    opacity: 1;
    visibility: visible;
}

/* Inner scroll container — scrollbar stays inside rounded card */
.hero-messages-inner {
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* Fade edges on scroll */
    mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 28px,
        black calc(100% - 28px),
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0px,
        black 28px,
        black calc(100% - 28px),
        transparent 100%
    );
}

/* Scrollbar — minimal, inside the card */
.hero-messages-inner::-webkit-scrollbar { width: 3px; }
.hero-messages-inner::-webkit-scrollbar-track { background: transparent; }
.hero-messages-inner::-webkit-scrollbar-thumb { background: rgba(5,5,5,0.15); border-radius: 2px; }

/* Minimise button — top right of card */
.hero-messages-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(5, 5, 5, 0.07);
    color: rgba(5, 5, 5, 0.5);
    font-size: 18px;
    line-height: 1;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 2px 0;
    transition: background 0.15s, color 0.15s;
    z-index: 1;
}
.hero-messages-close:hover {
    background: rgba(5, 5, 5, 0.13);
    color: #050505;
}

/* Bottom input pill */
.hero-pill {
    position: absolute;
    left: 24px;
    top: 89vh;
    width: 500px;
    height: 62px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
    border-radius: 33px;
    box-shadow: 0px -10.656px 42.622px 0px rgba(0,0,0,0.1),
                0px 10px 25px 0px rgba(0,0,0,0.07);
    padding: 8px 8px 8px 22px;
    gap: 8px;
}

.hero-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: 'Tiempos Headline', Georgia, serif;
    font-weight: 400;
    font-size: 16px;
    color: #050505;
    letter-spacing: -0.01em;
    padding: 0;
    cursor: text;
    min-width: 0;
}

.hero-input::placeholder {
    color: rgba(5, 5, 5, 0.5);
    transition: opacity 0.2s ease;
}

.hero-input:focus::placeholder {
    opacity: 0;
}

.hero-input:focus {
    outline: none;
}

.hero-send {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #050505;
    color: #fff;
    border: none;
    cursor: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
}

.hero-send:hover  { background: #333333; }
.hero-send:disabled { opacity: 0.4; }

/* Mic button */
.hero-mic {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: none;
    border: none;
    cursor: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(5, 5, 5, 0.45);
    transition: color 0.2s;
    padding: 0;
}
.hero-mic:hover { color: #050505; }
.hero-mic.is-recording {
    color: #c0392b;
    animation: micPulse 1.2s ease-in-out infinite;
}
@keyframes micPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Recording save / cancel buttons — same size as send */
.hero-rec-btn {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    cursor: none;
    display: none; /* shown only during recording */
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}
.hero-rec-cancel {
    background: rgba(5,5,5,0.07);
    color: #050505;
}
.hero-rec-cancel:hover { background: rgba(5,5,5,0.14); }

/* During recording: show save/cancel, hide mic */
.hero-pill.is-recording .hero-mic { display: none; }
.hero-pill.is-recording .hero-rec-btn { display: inline-flex; }

/* ─── About / Bio ───────────────────────────────────────── */
.about {
    padding: 120px 7vw 100px;
}

.about-bio {
    max-width: 68ch;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.bio-line {
    font-family: 'Tiempos Headline', 'Cormorant Display', 'Playfair Display', Georgia, serif;
    font-weight: 300;
    font-size: clamp(20px, 2vw, 30px);
    color: var(--text-muted);
    line-height: 1.5;
    letter-spacing: -0.01em;
    margin: 0;
}

/* ─── Work Section ───────────────────────────────────────── */
.work {
    padding: 140px 7vw 80px;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin-bottom: 72px;
}

.section-eyebrow {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding-top: 6px;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(40px, 5.5vw, 88px);
    letter-spacing: -0.04em;
    line-height: 1;
}

.section-heading strong {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--text);
}

.section-heading .serif-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.3);
    letter-spacing: -0.01em;
}

/* ─── Project Cards ──────────────────────────────────────── */
.projects-list {
    display: flex;
    flex-direction: column;
}

.project-card {
    display: grid;
    grid-template-columns: 260px 1fr 40px;
    align-items: center;
    gap: 52px;
    padding: 36px 0;
    border-top: 1px solid var(--border);
    cursor: none;
    position: relative;
    transition: padding-left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:last-child {
    border-bottom: 1px solid var(--border);
}

/* Hover fill bar */
.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.03) 0%, transparent 80%);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0;
    pointer-events: none;
}

.project-card:hover {
    padding-left: 8px;
}

.project-card:hover::before {
    transform: scaleX(1);
}

/* Thumbnail */
.project-thumb {
    width: 260px;
    height: 164px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    transform: scale(0.94);
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-thumb {
    transform: scale(1);
}

.project-img {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 12px 14px;
}

.project-img-label {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.25);
}

/* Placeholder gradients per card */
.p-img-1 { background: linear-gradient(140deg, #0c1b33 0%, #0f2a4a 60%, #1a2e5a 100%); }
.p-img-2 { background: linear-gradient(140deg, #150a2e 0%, #221040 60%, #2d1558 100%); }
.p-img-3 { background: linear-gradient(140deg, #081c20 0%, #0d2c30 60%, #103540 100%); }
.p-img-4 { background: linear-gradient(140deg, #081f10 0%, #0d2e18 60%, #103825 100%); }
.p-img-5 { background: linear-gradient(140deg, #201008 0%, #2e180d 60%, #3a2010 100%); }

/* Subtle sheen overlay on placeholders */
.project-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
    transition: opacity 0.3s;
}

.project-card:hover .project-img::after {
    opacity: 0;
}

/* Card body */
.project-body {
    min-width: 0;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.project-num {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--accent);
}

.project-year {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.project-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(22px, 2.2vw, 34px);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.project-card:hover .project-title {
    color: var(--accent);
}

.project-desc {
    font-size: 13.5px;
    font-weight: 300;
    color: var(--text-muted);
    line-height: 1.75;
    max-width: 480px;
    margin-bottom: 16px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-tags span {
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 11px;
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-muted);
    transition: border-color 0.35s, color 0.35s;
}

.project-card:hover .project-tags span {
    border-color: var(--border-hover);
    color: var(--text-dim);
}

/* Arrow */
.project-cta {
    display: flex;
    align-items: center;
    justify-content: center;
}

.arrow-icon {
    font-size: 22px;
    color: var(--text-muted);
    display: block;
    transform: translate(0, 0);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.35s;
}

.project-card:hover .arrow-icon {
    transform: translate(5px, -5px);
    color: var(--accent);
}

/* Work footer link */
.work-footer {
    display: flex;
    justify-content: center;
    padding-top: 72px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 14px 28px;
    border-radius: 100px;
    transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.view-all-btn:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-glow);
}

.view-all-btn .btn-arrow {
    transition: transform 0.3s;
}

.view-all-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* ─── Contact Modal ──────────────────────────────────────── */
.contact-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 200;
}

.contact-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.contact-modal {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(12.5px);
    -webkit-backdrop-filter: blur(12.5px);
    border-radius: 33px;
    box-shadow: 0px -10.656px 42.622px 0px rgba(0,0,0,0.1),
                0px 15.983px 33.298px 0px rgba(0,0,0,0.15);
    padding: 40px 40px 36px;
    width: min(480px, calc(100vw - 48px));
    position: relative;
    transform: translateY(16px);
    transition: transform 0.4s ease;
}

.contact-overlay.is-open .contact-modal {
    transform: translateY(0);
}

.contact-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(5,5,5,0.06);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-muted);
    cursor: none;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.contact-close:hover {
    background: rgba(5,5,5,0.12);
    color: var(--text);
}

.contact-heading {
    font-family: 'Tiempos Headline', Georgia, serif;
    font-weight: 300;
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -0.01em;
    line-height: 1.03;
    color: #050505;
    margin-bottom: 28px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-field label {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-field input,
.contact-field textarea {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    resize: none;
}

.contact-field input:focus,
.contact-field textarea:focus {
    border-color: rgba(5,5,5,0.25);
    background: rgba(255, 255, 255, 0.85);
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: rgba(5,5,5,0.3);
    font-weight: 300;
}

.contact-submit {
    align-self: flex-start;
    background: #050505;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 13px 28px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.01em;
    cursor: none;
    transition: background 0.2s;
    margin-top: 4px;
}

.contact-submit:hover { background: #333; }

.contact-success {
    font-family: 'Tiempos Headline', Georgia, serif;
    font-weight: 300;
    font-size: 18px;
    letter-spacing: -0.01em;
    color: var(--text-muted);
    padding: 20px 0;
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
    padding: 100px 7vw 48px;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.footer-inner {
    margin-bottom: 64px;
}

.footer-cta {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(36px, 5vw, 80px);
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 28px;
}

.footer-cta strong {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--text);
}

.footer-cta .serif-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.32);
    letter-spacing: -0.01em;
}

.footer-email {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 3px;
    transition: color 0.3s, border-color 0.3s;
}

.footer-email:hover {
    color: var(--text);
    border-color: rgba(255,255,255,0.3);
}

.footer-bottom {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    flex-wrap: wrap;
}

.footer-socials {
    display: flex;
    gap: 24px;
    margin-left: auto;
}

.footer-socials a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-socials a:hover { color: var(--text); }

/* ─── Chat Section ───────────────────────────────────────── */
.chat-section {
    padding: 120px 7vw 100px;
}

.chat-inner {
    max-width: 68ch;
}

.chat-heading {
    font-family: 'Tiempos Headline', 'Cormorant Display', 'Playfair Display', Georgia, serif;
    font-weight: 300;
    font-size: clamp(36px, 4.5vw, 80px);
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 40px;
}

.chat-window {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 380px;
    overflow-y: auto;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.chat-messages {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Message rows */
.chat-msg {
    display: flex;
}

.chat-msg--user {
    justify-content: flex-end;
}

.chat-msg--gosia {
    justify-content: flex-start;
}

/* Bubbles */
.chat-bubble {
    font-family: 'Tiempos Headline', Georgia, serif;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: -0.01em;
}

/* User bubble — black pill, bottom-right corner flat */
.chat-msg--user .chat-bubble {
    background: #050505;
    color: #fff;
    border-radius: 24px 24px 0 24px;
    padding: 12px 16px;
    line-height: 1.03;
    max-width: 85%;
}

/* Assistant text — plain, no bubble */
.chat-msg--gosia .chat-bubble {
    background: transparent;
    color: #050505;
    border: none;
    padding: 0;
    line-height: 1.5;
    max-width: 100%;
}
.chat-msg--gosia .chat-bubble p {
    margin: 0;
}
.chat-msg--gosia .chat-bubble p + p {
    margin-top: 0.9em;
}
.chat-msg--gosia .chat-bubble strong {
    font-weight: 600;
}

/* Typing indicator */
.chat-bubble--typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 18px;
}

.chat-bubble--typing span {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingDot 1.2s ease-in-out infinite;
}

.chat-bubble--typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble--typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
    0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
    30%            { opacity: 1;    transform: translateY(-4px); }
}

/* Input row */
.chat-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.chat-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 13px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    color: var(--text);
    outline: none;
    transition: border-color 0.3s;
    cursor: text;
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.chat-input:focus {
    border-color: rgba(0, 0, 0, 0.3);
}

.chat-send {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 100px;
    width: 46px;
    height: 46px;
    font-size: 18px;
    cursor: none;
    transition: background 0.3s, transform 0.2s;
}

.chat-send:hover {
    background: #444444;
}

.chat-send:disabled {
    opacity: 0.4;
}

/* ─── Responsive ──────────────────────────────────────────── */

/* Tablet — up to 1024px */
@media (max-width: 1024px) {
    .hl--1 { font-size: 13vw; top: 20vh; }
    .hl--2 { font-size: 13vw; top: calc(20vh + 1.1 * 13vw); }
    .hl--3 { font-size: 13vw; top: calc(20vh + 2.2 * 13vw); }

    .hero-pill,
    .hero-messages { width: min(500px, calc(100vw - 48px)); }

    .nav-links a { font-size: clamp(13px, 1.5vw, 18px); }
    .nav-logo    { width: clamp(52px, 6.1vw, 80px); }
}

/* iPad portrait — 769px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {

    .hero {
        height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0;
        padding-top: 88px;
        padding-bottom: 120px;
    }

    .hl {
        position: relative;
        top: auto;
        left: 0;
        padding-left: 24px;
        font-size: 16vw;
        line-height: 1.0;
        margin: 0;
        white-space: normal;
    }
    .hl--1, .hl--2, .hl--3 { font-size: 16vw; top: auto; margin: 0; }

    /* Pill — full width at bottom */
    .hero-pill {
        width: auto;
        left: 24px;
        right: 24px;
        top: auto;
        bottom: 36px;
        position: absolute;
    }

    /* Chat messages box */
    .hero-messages {
        width: auto;
        left: 24px;
        right: 24px;
        top: auto;
        bottom: calc(36px + 62px + 14px);
        height: 78vh;
        position: absolute;
    }
    .hero-messages.is-active {
        top: 88px;
        height: auto;
    }

    .hero-label { display: none; }
    .hero-contact { display: none; }
}

/* Mobile — up to 768px */
@media (max-width: 768px) {

    /* Hide custom cursor on touch */
    .cursor-dot,
    .cursor-ring { display: none; }
    html { cursor: auto; }
    button, a { cursor: pointer; }
    .hero-send, .hero-mic, .hero-rec-btn, .hero-messages-close { cursor: pointer; }

    /* Nav */
    .nav { padding: 14px 20px; }
    .nav-logo { width: 44px; }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 15px; }

    /* Hero — flex column, text block centered in available space */
    .hero {
        height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0;
        padding-top: 72px;  /* clear the nav */
        padding-bottom: 98px; /* clear the pill */
    }

    /* Headlines — consistent line-height throughout, no extra gaps between pairs */
    .hl {
        position: relative;
        top: auto;
        left: 0;
        padding-left: 16px;
        font-size: 22vw;
        line-height: 1.0;
        margin: 0;
        white-space: normal;
    }
    .hl--1, .hl--2, .hl--3 { font-size: 22vw; top: auto; margin: 0; }

    /* Vertical lines — keep just 2 */
    .hero-vline--1,
    .hero-vline--3,
    .hero-vline--4,
    .hero-vline--5 { display: none; }

    /* Accent lines — hide on mobile */
    .hero-accent--top,
    .hero-accent--btm-l,
    .hero-accent--btm-r { display: none; }

    /* Identity label — hide */
    .hero-label { display: none; }
    .hero-contact { display: none; }

    /* Chat pill — full width, anchored to bottom */
    .hero-pill {
        left: 16px;
        right: 16px;
        width: auto;
        top: auto;
        bottom: max(24px, env(safe-area-inset-bottom, 16px));
        position: absolute;
    }

    /* Chat messages box — sits above the pill */
    .hero-messages {
        left: 16px;
        right: 16px;
        width: auto;
        top: auto;
        bottom: calc(max(24px, env(safe-area-inset-bottom, 16px)) + 62px + 12px);
        height: 72dvh;
        position: absolute;
    }

    /* When active on mobile — expand up to just below the nav */
    .hero-messages.is-active {
        top: 68px;
        height: auto;
    }

    /* Footer */
    .footer { padding: 60px 20px 40px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
    .footer-socials { margin-left: 0; gap: 16px; }
}
