/* FencingAI landing/auth design */
:root {
    --paper: #f4f1ea;
    --paper-2: #ece8de;
    --ink: #0a0a0a;
    --ink-2: #1a1a1a;
    --ink-mute: #5a5853;
    --rule: #d8d4c7;
    --serif: "Instrument Serif", "Times New Roman", serif;
    --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;
    --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.paper-grain::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.04 0 0 0 0 0.04 0 0 0 0 0.04 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 240px 240px;
}

.brandmark {
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    flex: 0 0 auto;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 14px 28px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
}

.brand,
.nav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.brand-word {
    font-family: var(--serif);
    font-size: 20px;
    letter-spacing: 0.01em;
    text-transform: none;
    line-height: 1;
}

.brand-word em { font-style: italic; opacity: 0.85; }

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

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 8px 16px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    white-space: nowrap;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.nav-link:hover { background: var(--ink); color: var(--paper); }
.nav-link.solid { background: var(--ink); color: var(--paper); }
.nav-link.solid:hover { background: var(--paper); color: var(--ink); }

.hero {
    position: relative;
    height: 320vh;
}

.hero-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.hero-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-sword {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    will-change: opacity, left, top, width, height;
}

.tagline {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 84px 28px 48px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transform: translateY(16px);
}

.tagline-rule {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 28px;
}

.tagline h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(40px, 6.5vw, 92px);
    line-height: 1.02;
    margin: 0;
    max-width: 20ch;
}

.tagline h1 em { font-style: italic; }

.tagline p {
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.5;
    color: var(--ink-2);
    margin: 24px 0 0;
    max-width: 52ch;
}

.hero-cta {
    margin-top: 28px;
    padding: 12px 18px;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    pointer-events: auto;
    transition: background 0.15s, color 0.15s;
}

.hero-cta:hover { background: var(--paper); color: var(--ink); }

.hero-meta {
    position: absolute;
    bottom: 28px;
    left: 28px;
    right: 28px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    opacity: 0.55;
    pointer-events: none;
}

.hero-meta .col {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hero-meta .col.right {
    text-align: right;
    align-items: end;
}

.scroll-cue {
    position: absolute;
    bottom: 28px;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transform: translateX(-50%);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink);
    opacity: 0.6;
}

.scroll-cue .bar {
    width: 1px;
    height: 32px;
    background: currentColor;
    animation: cue 1.8s ease-in-out infinite;
    transform-origin: top;
}

@keyframes cue {
    0%, 100% { transform: scaleY(0.2); }
    50% { transform: scaleY(1); }
}

.section {
    position: relative;
    padding: 140px 28px;
    border-top: 1px solid var(--rule);
}

.section-features { padding-top: 0; }

.section .label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 28px;
}

.section .grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    max-width: 1280px;
    margin: 0 auto;
}

.feature-heading { margin-bottom: 80px; }

.section h2 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(40px, 6vw, 84px);
    line-height: 0.98;
    margin: 0;
}

.section h2 em { font-style: italic; }

.section p {
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-2);
    max-width: 56ch;
}

.section p + p { margin-top: 16px; }

.features {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--rule);
}

.feature {
    min-height: 220px;
    padding: 36px 28px 48px 0;
    border-right: 1px solid var(--rule);
}

.feature:last-child {
    border-right: 0;
    padding-right: 0;
}

.feature .num {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--ink-mute);
    margin-bottom: 24px;
}

.feature h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 28px;
    line-height: 1.1;
    margin: 0 0 12px;
}

.feature p {
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-2);
    margin: 0;
    max-width: 28ch;
}

.foot {
    border-top: 1px solid var(--rule);
    padding: 40px 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 48px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.foot .big {
    font-family: var(--serif);
    font-size: clamp(80px, 14vw, 220px);
    line-height: 0.85;
    text-transform: none;
    color: var(--ink);
}

.foot .big em { font-style: italic; }

.foot-cols {
    display: flex;
    gap: 64px;
}

.foot-cols .col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.foot-cols span { color: var(--ink); }
.foot-cols a:hover { text-decoration: underline; text-underline-offset: 4px; }

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

.auth-art {
    position: relative;
    background: var(--ink);
    color: var(--paper);
    overflow: hidden;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-linework {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

.auth-linework path {
    stroke-width: 0.7;
    opacity: 0.55;
}

.auth-sword {
    position: absolute;
    left: 8%;
    top: 48%;
    width: 84%;
    opacity: 0.38;
    transform: translateY(-50%);
    filter: invert(1);
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--serif);
    font-size: 22px;
}

.auth-brand em { font-style: italic; }

.auth-quote {
    position: relative;
    z-index: 1;
    font-family: var(--serif);
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.1;
    max-width: 16ch;
}

.auth-quote em { font-style: italic; }

.auth-meta {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.6;
}

.auth-form {
    padding: 64px clamp(28px, 6vw, 96px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--paper);
}

.home-link {
    margin-bottom: 40px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--ink-mute);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-form h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1;
    margin: 0 0 8px;
}

.auth-form h1 em { font-style: italic; }

.auth-form .sub {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: 40px;
}

.oauth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
}

.oauth button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 14px;
    border: 1px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.oauth button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.field label,
.weapon-field legend {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-mute);
}

.field input {
    width: 100%;
    font-family: var(--sans);
    font-size: 16px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--ink);
    padding: 10px 0;
    color: var(--ink);
    outline: none;
}

.field input::placeholder { color: rgba(90, 88, 83, 0.68); }

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 24px;
    font-family: var(--mono);
    font-size: 11px;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-mute);
    cursor: pointer;
}

.check input { accent-color: var(--ink); }
.link-mute { color: var(--ink-mute); }

.weapon-field {
    margin: 2px 0 20px;
    padding: 0;
    border: 0;
}

.weapon-options {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.weapon-options label { flex: 1; cursor: pointer; }
.weapon-options input { position: absolute; opacity: 0; pointer-events: none; }

.weapon-options span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 12px 10px;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: background 0.15s, color 0.15s;
}

.weapon-options input:checked + span {
    background: var(--ink);
    color: var(--paper);
}

.terms-row { margin-top: 12px; }

.form-error {
    margin-bottom: 16px;
    padding: 8px 11px;
    border-left: 2px solid var(--ink);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 11px;
}

.btn-primary {
    width: 100%;
    padding: 16px 20px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    border-radius: 0;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--paper);
    color: var(--ink);
}

.btn-primary .arrow {
    font-family: var(--serif);
    font-size: 14px;
}

.foot-note {
    margin-top: 28px;
    text-align: center;
    color: var(--ink-mute);
    font-family: var(--mono);
    font-size: 11px;
}

.foot-note a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 820px) {
    .nav {
        height: auto;
        min-height: 64px;
        padding: 12px 16px;
    }

    .nav-right { gap: 6px; }
    .nav-link { padding: 8px 10px; font-size: 10px; }
    .nav-link:first-child { display: none; }

    .hero { height: 280vh; }
    .hero-meta { display: none; }
    .tagline { padding-inline: 18px; }
    .tagline-rule { font-size: 9px; letter-spacing: 0.18em; }

    .section {
        padding: 84px 18px;
    }

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

    .features {
        grid-template-columns: 1fr;
    }

    .feature {
        border-right: 0;
        border-bottom: 1px solid var(--rule);
        padding: 28px 0;
    }

    .feature:last-child { border-bottom: 0; }

    .foot {
        display: block;
        padding: 40px 18px 32px;
    }

    .foot-cols {
        margin-top: 36px;
        gap: 28px;
        flex-wrap: wrap;
    }

    .auth {
        grid-template-columns: 1fr;
    }

    .auth-art {
        min-height: 36vh;
    }

    .auth-form {
        padding: 42px 22px 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .scroll-cue .bar { animation: none; }
}
