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

:root {
    --bg: #f6f4f0;
    --paper: #ffffff;
    --ink: #1b2030;
    --ink-70: #3d4258;
    --ink-40: #7a7f94;
    --ink-20: #b5b8c7;
    --ink-10: #dddee6;
    --ink-05: #eeeff3;
    --copper: #2c5fc4;
    --copper-dark: #1e4aa0;
    --copper-light: #7ba3e0;
    --copper-wash: #eef3fc;
    --navy: #1b2030;
    --display: 'Fraunces', Georgia, serif;
    --body: 'Outfit', -apple-system, sans-serif;
    --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--body);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Blueprint grid texture ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 79px, var(--ink-10) 79px, var(--ink-10) 80px),
        repeating-linear-gradient(90deg, transparent, transparent 79px, var(--ink-10) 79px, var(--ink-10) 80px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* ── Marker dots at grid intersections ── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, var(--ink-20) 0.8px, transparent 0.8px);
    background-size: 80px 80px;
    background-position: -0.5px -0.5px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* ── Nav ── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(246, 244, 240, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ink-10);
}
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mark {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}
.mark-icon {
    width: 28px; height: 28px;
    border: 2px solid var(--ink);
    border-radius: 6px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mark-icon::before {
    content: '';
    width: 3px; height: 3px;
    background: var(--copper);
    border-radius: 50%;
    box-shadow: 6px 0 0 var(--copper), -6px 0 0 var(--copper);
}
.mark-name {
    font-family: var(--body);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.3px;
}
.mark-name em {
    font-style: normal;
    color: var(--copper);
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}
.topbar-right a {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-40);
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: color 0.2s;
}
.topbar-right a:hover { color: var(--ink); }
.topbar-right .pill--copper { color: #fff; }
.topbar-right .pill--copper:hover { color: #fff; }
.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 100px;
    font-family: var(--body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.25s;
}
.pill--copper {
    background: var(--copper);
    color: #fff;
}
.pill--copper:hover {
    background: var(--copper-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(44,95,196,0.3);
}
.pill--ghost {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--ink-20);
}
.pill--ghost:hover {
    border-color: var(--ink-40);
    background: var(--paper);
}

/* ── Hero ── */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 40px 60px;
}
.hero-layout {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 80px;
    align-items: center;
}
.hero-left {
    animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-overline {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero-overline::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--copper);
}
.hero-title {
    font-family: var(--display);
    font-size: clamp(2.25rem, 4.6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 28px;
    font-optical-sizing: auto;
}
.hero-title .em {
    font-style: normal;
    color: var(--copper);
}
.hero-title .em-block {
    display: block;
}
.hero-desc {
    font-size: 17px;
    font-weight: 300;
    line-height: 1.75;
    color: var(--ink-70);
    max-width: 520px;
    margin-bottom: 40px;
}
.hero-desc strong {
    font-weight: 500;
    color: var(--ink);
}

/* ── Waitlist ── */
.wl-group {
    max-width: 460px;
}
.wl-form {
    display: flex;
    gap: 8px;
}
.wl-form input {
    flex: 1;
    padding: 14px 18px;
    border: 1.5px solid var(--ink-20);
    border-radius: 100px;
    font-family: var(--body);
    font-size: 15px;
    font-weight: 400;
    background: var(--paper);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wl-form input::placeholder { color: var(--ink-20); }
.wl-form input:focus {
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(44,95,196,0.1);
}
.wl-form button {
    padding: 14px 28px;
    background: var(--copper);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: var(--body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s;
}
.wl-form button:hover {
    background: var(--copper-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(44,95,196,0.25);
}
.wl-form button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.wl-msg {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
    min-height: 20px;
}
.wl-msg.ok { color: var(--copper-dark); }
.wl-msg.err { color: #c0392b; }
.wl-note {
    margin-top: 12px;
    font-size: 12px;
    color: var(--ink-40);
    letter-spacing: 0.2px;
}

/* ── Hero right — UK outline ── */
.hero-right {
    animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
    position: relative;
}
.uk-schematic {
    width: 100%;
    aspect-ratio: 340 / 480;
}
.uk-schematic svg {
    width: 100%;
    height: 100%;
}
.schematic-path {
    fill: none;
    stroke: var(--ink-20);
    stroke-width: 1.2;
    stroke-dasharray: 2400;
    stroke-dashoffset: 2400;
    animation: drawLine 4s ease-out 0.6s forwards;
}
.schematic-fill {
    fill: var(--copper-wash);
    opacity: 0;
    animation: fadeIn 1s ease 2.5s forwards;
}
@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}
@keyframes pingPop {
    0%   { opacity: 0; }
    15%  { opacity: 0.7; }
    60%  { opacity: 0.5; }
    100% { opacity: 0; }
}
@keyframes pingRing {
    0%   { r: 0; opacity: 0; }
    15%  { r: 6; opacity: 0.4; }
    60%  { r: 6; opacity: 0.2; }
    100% { r: 12; opacity: 0; }
}
.hero-right .float-tag {
    position: absolute;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.5px;
    color: var(--ink-40);
    background: var(--bg);
    padding: 4px 10px;
    border: 1px solid var(--ink-10);
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}
.float-tag--1 { top: 28%; right: -10px; animation-delay: 2.8s; }
.float-tag--2 { top: 55%; left: -20px; animation-delay: 3.2s; }
.float-tag--3 { bottom: 22%; right: 5%; animation-delay: 3.6s; }

/* ── Ruler divider ── */
.ruler {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}
.ruler-line {
    height: 1px;
    background: var(--ink-10);
    position: relative;
}
.ruler-line::before, .ruler-line::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 7px; height: 7px;
    border: 1px solid var(--ink-20);
    border-radius: 50%;
    background: var(--bg);
}
.ruler-line::before { left: 0; }
.ruler-line::after { right: 0; }

/* ── Sections ── */
.section {
    position: relative;
    z-index: 1;
    padding: 100px 40px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── What is PlanAPI — large narrative ── */
.narrative {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
}
.narrative-label {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--copper);
    padding-top: 8px;
}
.narrative-body h2 {
    font-family: var(--display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.8px;
    margin-bottom: 20px;
}
.narrative-body p {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--ink-70);
    max-width: 580px;
}
.narrative-body p + p { margin-top: 16px; }

/* ── Capabilities — horizontal scroll-like row ── */
.caps {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    margin-top: 0;
}
.caps-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--ink-10);
    border-radius: 12px;
    overflow: hidden;
}
.cap {
    background: var(--paper);
    padding: 36px 28px;
    transition: background 0.2s;
}
.cap:hover { background: var(--copper-wash); }
.cap-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--ink-20);
    margin-bottom: 16px;
    letter-spacing: 1px;
}
.cap h3 {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}
.cap p {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.65;
    color: var(--ink-70);
}

/* ── Who it's for — offset cards ── */
.who-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px 16px;
}
.who-card {
    background: var(--paper);
    border: 1px solid var(--ink-10);
    border-radius: 10px;
    padding: 32px 24px 28px;
    transition: all 0.25s;
    position: relative;
}
.who-card:nth-child(even) { transform: translateY(20px); }
.who-card:hover {
    border-color: var(--copper-light);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(27,32,48,0.06);
}
.who-card:nth-child(even):hover { transform: translateY(18px); }
.who-card .tag {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 14px;
    display: block;
}
.who-card h4 {
    font-family: var(--display);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}
.who-card p {
    font-size: 13.5px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--ink-70);
}

/* ── Founder section ── */
.founder {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
}
.founder-body blockquote {
    font-family: var(--display);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.6;
    color: var(--ink-70);
    max-width: 580px;
    margin-bottom: 16px;
}
.founder-body .founder-name {
    font-family: var(--body);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
}
.founder-body .founder-role {
    font-family: var(--body);
    font-size: 13px;
    font-weight: 300;
    color: var(--ink-40);
}

/* ── FAQ section ── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--ink-10);
    border-radius: 12px;
    overflow: hidden;
}
.faq-item {
    background: var(--paper);
    padding: 24px 28px;
    cursor: pointer;
    user-select: none;
}
.faq-item:hover { background: var(--copper-wash); }
.faq-item h4 {
    font-family: var(--display);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 0;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.faq-icon {
    font-family: var(--body);
    font-size: 20px;
    font-weight: 300;
    color: var(--ink-40);
    flex-shrink: 0;
    transition: transform 0.3s ease;
    line-height: 1;
}
.faq-item.open .faq-icon {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}
.faq-item.open .faq-answer {
    max-height: 200px;
    margin-top: 12px;
}
.faq-answer p {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--ink-70);
}

/* ── Bottom CTA ── */
.cta-band {
    position: relative;
    z-index: 1;
    padding: 80px 40px 100px;
}
.cta-box {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.cta-box h2 {
    font-family: var(--display);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}
.cta-box h2 .em {
    font-style: normal;
    color: var(--copper);
}
.cta-box p {
    font-size: 16px;
    font-weight: 300;
    color: var(--ink-70);
    margin-bottom: 32px;
}
.cta-box .wl-form { justify-content: center; }
.cta-box .wl-group { margin: 0 auto; }

/* ── Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(27, 32, 48, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--paper);
    border-radius: 16px;
    padding: 40px 36px 36px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--ink-40);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--ink); }
.modal h3 {
    font-family: var(--display);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}
.modal p.modal-sub {
    font-size: 14px;
    color: var(--ink-40);
    margin-bottom: 24px;
    font-weight: 300;
}
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.modal-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-70);
    font-family: var(--body);
}
.modal-form label .optional {
    font-weight: 400;
    color: var(--ink-20);
}
.modal-form input,
.modal-form textarea,
.modal-form select {
    padding: 12px 14px;
    border: 1.5px solid var(--ink-10);
    border-radius: 10px;
    font-family: var(--body);
    font-size: 14px;
    background: var(--bg);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    border-color: var(--copper);
    box-shadow: 0 0 0 3px rgba(44,95,196,0.1);
}
.modal-form input::placeholder,
.modal-form textarea::placeholder { color: var(--ink-20); }
.modal-form textarea {
    resize: vertical;
    min-height: 70px;
}
.modal-form .char-count {
    font-size: 11px;
    color: var(--ink-20);
    text-align: right;
    margin-top: -8px;
}
.modal-form button[type="submit"] {
    padding: 14px 28px;
    background: var(--copper);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: var(--body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.25s;
}
.modal-form button[type="submit"]:hover {
    background: var(--copper-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(44,95,196,0.25);
}
.modal-form button[type="submit"]:disabled {
    opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none;
}
.modal .wl-msg { margin-top: 10px; font-size: 13px; font-weight: 500; min-height: 20px; }
.modal .wl-msg.ok { color: var(--copper-dark); }
.modal .wl-msg.err { color: #c0392b; }
/* Honeypot — hidden from real users */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* ── Footer ── */
.foot {
    position: relative;
    z-index: 1;
    padding: 0 40px 48px;
    text-align: center;
    font-size: 12px;
    color: var(--ink-20);
}

/* ── Animations ── */
@keyframes revealUp {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    to { opacity: 1; }
}
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hero { padding: 100px 24px 60px; }
    .hero-layout { grid-template-columns: 1fr; gap: 48px; }
    .hero-right { max-width: 300px; margin: 0 auto; order: 1; }
    .hero-left { order: 2; }
    .narrative { grid-template-columns: 1fr; gap: 12px; }
    .caps { grid-template-columns: 1fr; gap: 12px; }
    .caps-list { grid-template-columns: 1fr; }
    .who-grid { grid-template-columns: 1fr 1fr; }
    .who-card:nth-child(even) { transform: none; }
    .who-card:nth-child(even):hover { transform: translateY(-2px); }
    .founder { grid-template-columns: 1fr; gap: 12px; }
    .section, .ruler, .foot { padding-left: 24px; padding-right: 24px; }
    .cta-band { padding-left: 24px; padding-right: 24px; }
    .topbar-inner { padding: 0 24px; }
}
@media (max-width: 600px) {
    .who-grid { grid-template-columns: 1fr; }
    .wl-form { flex-direction: column; }
    .wl-form button { width: 100%; }
    .topbar-right a:not(.pill) { display: none; }
    .float-tag { display: none; }
}
