/* ============================================================================
   Kuntry Kreations — public site
   Deliberately self-contained: this file shares nothing with site.css or the
   KuntryTime theme files, so the marketing site and the utility app cannot
   affect each other's styling.

   Palette idea: amber is the past (phosphor terminals, warmth, workshop light);
   teal is the future. The conversion is the gradient between them.
   ========================================================================== */

:root {
    --ink:          #0A0D12;
    --ink-2:        #11161F;
    --ink-3:        #1A212C;
    --paper:        #F7F2E7;
    --paper-2:      #EFE7D6;
    --amber:        #E9A23B;
    --amber-soft:   #F5C97A;
    --teal:         #3FD0C9;
    --teal-deep:    #17968F;
    --rust:         #C4623A;

    --on-ink:       #EDE7DA;
    --on-ink-mute:  #9AA3B2;
    --on-paper:     #171C24;
    --on-paper-mute:#5C6472;

    --line-ink:     rgba(237, 231, 218, 0.14);
    --line-paper:   rgba(23, 28, 36, 0.12);

    --display: "Fraunces", "Iowan Old Style", Georgia, serif;
    --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --shell: min(1200px, 92vw);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    background: var(--ink);
    color: var(--on-ink);
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.65;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* A whisper of grain so the flat areas read as printed rather than sterile. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.22;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
    font-family: var(--display);
    font-weight: 600;
    font-variation-settings: "SOFT" 20, "WONK" 1;
    line-height: 1.05;
    letter-spacing: -0.018em;
    margin: 0 0 0.5em;
    text-wrap: balance;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
a { color: inherit; }

.shell { width: var(--shell); margin-inline: auto; }

.eyebrow {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 0 0 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
}

.lede { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--on-ink-mute); max-width: 58ch; }
section.paper .lede { color: var(--on-paper-mute); }

.gradient-text {
    background: linear-gradient(100deg, var(--amber) 0%, var(--amber-soft) 32%, var(--teal) 78%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---- buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
}
.btn svg { transition: transform 0.35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(3px); }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

.btn-primary {
    background: linear-gradient(100deg, var(--amber) 0%, var(--amber-soft) 100%);
    color: #1A1206;
    box-shadow: 0 10px 30px -12px rgba(233, 162, 59, 0.75);
}
.btn-primary:hover { box-shadow: 0 18px 40px -14px rgba(233, 162, 59, 0.9); }

.btn-ghost { border-color: var(--line-ink); color: var(--on-ink); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
section.paper .btn-ghost { border-color: var(--line-paper); color: var(--on-paper); }
section.paper .btn-ghost:hover { border-color: var(--teal-deep); color: var(--teal-deep); }

/* ---- header ------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(10, 13, 18, 0.72);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, background 0.3s;
}
.site-header.is-stuck { border-bottom-color: var(--line-ink); }

.site-header .shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 76px;
}

.brand { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-mark { flex: 0 0 auto; }
.brand-name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.brand-name span { display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--on-ink-mute); font-weight: 500; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
/* :not(.btn) matters — a bare `.site-nav a` rule (specificity 0,1,1) outranks
   `.btn-primary` (0,1,0) and was repainting the header call to action's dark
   text in muted grey, on amber. */
.site-nav a:not(.btn) { text-decoration: none; font-size: 0.93rem; color: var(--on-ink-mute); transition: color 0.25s; }
.site-nav a:not(.btn):hover { color: var(--on-ink); }
.site-nav a.btn { text-decoration: none; }

/* Sign in sits apart from the marketing links: it is for people who already have
   an account, so it gets a divider rather than competing with the call to action. */
.nav-signin {
    position: relative;
    padding-left: 2rem;
    font-weight: 500;
    color: var(--on-ink) !important;
}
.nav-signin::before {
    content: "";
    position: absolute;
    left: 0.85rem; top: 50%;
    width: 1px; height: 18px;
    transform: translateY(-50%);
    background: var(--line-ink);
}
.nav-signin:hover { color: var(--teal) !important; }
@media (max-width: 880px) {
    .nav-signin { padding-left: 0; }
    .nav-signin::before { display: none; }
}
.nav-toggle { display: none; }

@media (max-width: 880px) {
    .site-nav { display: none; }
    .site-nav.is-open {
        display: flex;
        position: absolute;
        inset: 76px 0 auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem var(--gutter, 4vw) 1.5rem;
        background: var(--ink-2);
        border-bottom: 1px solid var(--line-ink);
    }
    .site-nav.is-open a { padding: 0.85rem 0; border-bottom: 1px solid var(--line-ink); }
    .site-nav.is-open .btn { margin-top: 1rem; justify-content: center; }
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: 0;
        padding: 10px;
        cursor: pointer;
    }
    .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--on-ink); transition: transform 0.3s var(--ease), opacity 0.2s; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---- hero --------------------------------------------------------------- */
.hero { position: relative; padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero::after {
    content: "";
    position: absolute;
    width: 900px; height: 900px;
    right: -280px; top: -380px;
    background: radial-gradient(circle, rgba(63, 208, 201, 0.16) 0%, rgba(63, 208, 201, 0) 62%);
    pointer-events: none;
}
.hero::before {
    content: "";
    position: absolute;
    width: 720px; height: 720px;
    left: -300px; bottom: -320px;
    background: radial-gradient(circle, rgba(233, 162, 59, 0.14) 0%, rgba(233, 162, 59, 0) 65%);
    pointer-events: none;
}
.hero .shell { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 980px) { .hero .shell { grid-template-columns: 1fr; } }

.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); margin-bottom: 0.4em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

.hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-top: 3.2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line-ink);
}
.hero-proof div strong {
    display: block;
    font-family: var(--display);
    font-size: 1.7rem;
    line-height: 1;
    color: var(--amber);
    margin-bottom: 0.35rem;
}
.hero-proof div span { font-size: 0.86rem; color: var(--on-ink-mute); }

/* ---- the conversion graphic --------------------------------------------- */
.conversion-figure { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 60px rgba(0,0,0,0.45)); }
.cf-legacy-cell { animation: cf-flicker 3.4s ease-in-out infinite; }
.cf-stream { stroke-dasharray: 4 8; animation: cf-flow 1.6s linear infinite; }
.cf-node { animation: cf-pulse 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes cf-flicker { 0%, 100% { opacity: 0.85; } 45% { opacity: 0.42; } 70% { opacity: 0.95; } }
@keyframes cf-flow { to { stroke-dashoffset: -24; } }
@keyframes cf-pulse { 0%, 100% { opacity: 0.55; r: 2.4; } 50% { opacity: 1; r: 3.6; } }
@media (prefers-reduced-motion: reduce) {
    .cf-legacy-cell, .cf-stream, .cf-node { animation: none; }
}

/* ---- generic section ---------------------------------------------------- */
section { padding: clamp(4rem, 9vw, 8rem) 0; position: relative; }
section.paper { background: var(--paper); color: var(--on-paper); }
section.paper h1, section.paper h2, section.paper h3 { color: var(--on-paper); }
section.paper .eyebrow { color: var(--rust); }

.section-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }

/* ---- legacy marquee ----------------------------------------------------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line-paper); padding: 1.1rem 0; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 42s linear infinite; }
.marquee span {
    font-family: var(--mono);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-paper-mute);
    white-space: nowrap;
    opacity: 0.75;
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---- cards -------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.4rem; }

.card {
    padding: 1.9rem 1.7rem;
    border-radius: 18px;
    border: 1px solid var(--line-paper);
    background: rgba(255, 255, 255, 0.55);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 24px 50px -28px rgba(23, 28, 36, 0.45); border-color: rgba(23,28,36,0.22); }
.card h3 { font-size: 1.24rem; margin-bottom: 0.5rem; }
.card p { color: var(--on-paper-mute); margin: 0; font-size: 0.97rem; }
.card-icon {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 12px;
    margin-bottom: 1.1rem;
    background: linear-gradient(135deg, rgba(233,162,59,0.2), rgba(63,208,201,0.2));
    color: var(--rust);
}

/* ---- the pipeline ------------------------------------------------------- */
.pipeline { display: grid; gap: 1px; background: var(--line-ink); border: 1px solid var(--line-ink); border-radius: 20px; overflow: hidden; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .pipeline { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .pipeline { grid-template-columns: 1fr; } }

.step { background: var(--ink-2); padding: 2rem 1.5rem; position: relative; transition: background 0.35s; }
.step:hover { background: var(--ink-3); }
.step-no { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--teal); margin-bottom: 1.1rem; display: block; }
.step h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }
.step p { font-size: 0.92rem; color: var(--on-ink-mute); margin: 0; }
.step::after {
    content: "";
    position: absolute; left: 0; top: 0; height: 2px; width: 100%;
    background: linear-gradient(90deg, var(--amber), var(--teal));
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.55s var(--ease);
}
.step.is-visible::after, html:not(.js) .step::after { transform: scaleX(1); }

/* ---- split feature ------------------------------------------------------ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.ledger {
    border-radius: 18px;
    border: 1px solid var(--line-ink);
    background: linear-gradient(160deg, var(--ink-2), var(--ink));
    padding: 1.6rem;
    font-family: var(--mono);
    font-size: 0.86rem;
    box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7);
}
.ledger-row { display: flex; align-items: center; gap: 0.9rem; padding: 0.72rem 0; border-bottom: 1px solid var(--line-ink); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row .tick { flex: 0 0 auto; color: var(--teal); }
.ledger-row .who { margin-left: auto; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 999px; border: 1px solid var(--line-ink); color: var(--on-ink-mute); }
.ledger-row .who.ai { color: var(--amber); border-color: rgba(233,162,59,0.35); }
.ledger-row .who.human { color: var(--teal); border-color: rgba(63,208,201,0.35); }

/* ---- outcomes ----------------------------------------------------------- */
.outcome-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.outcome-list li { display: flex; gap: 1rem; align-items: flex-start; padding-bottom: 1rem; border-bottom: 1px solid var(--line-paper); }
.outcome-list li:last-child { border-bottom: 0; }
.outcome-list strong { display: block; font-family: var(--display); font-size: 1.1rem; margin-bottom: 0.15rem; }
.outcome-list span { color: var(--on-paper-mute); font-size: 0.96rem; }
.outcome-list .num { font-family: var(--mono); font-size: 0.75rem; color: var(--rust); padding-top: 0.35rem; }

/* ---- contact ------------------------------------------------------------ */
.contact { background: linear-gradient(165deg, var(--ink-2) 0%, var(--ink) 65%); }
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.form-card {
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--line-ink);
    border-radius: 20px;
    padding: clamp(1.6rem, 3vw, 2.4rem);
    backdrop-filter: blur(6px);
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.82rem; letter-spacing: 0.04em; color: var(--on-ink-mute); margin-bottom: 0.45rem; }
.field input, .field textarea {
    width: 100%;
    background: rgba(10,13,18,0.55);
    border: 1px solid var(--line-ink);
    border-radius: 11px;
    color: var(--on-ink);
    font-family: var(--body);
    font-size: 1rem;
    padding: 0.85rem 1rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(63, 208, 201, 0.16);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field-error { color: #FF9E80; font-size: 0.84rem; margin-top: 0.35rem; display: block; }
.form-note { font-size: 0.84rem; color: var(--on-ink-mute); margin: 1rem 0 0; }

/* ---- footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line-ink); padding: 3.5rem 0 2.5rem; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.site-footer a { color: var(--on-ink-mute); text-decoration: none; font-size: 0.9rem; transition: color 0.25s; }
.site-footer a:hover { color: var(--teal); }
.footer-legal { width: 100%; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-ink); font-size: 0.82rem; color: var(--on-ink-mute); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* ---- scroll reveal ------------------------------------------------------ */
/* Content is visible by default. It is only hidden for the animation when the
   inline head script has confirmed JS is running, so a script failure, a strict
   CSP or a text browser still gets the whole page. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- status banners ----------------------------------------------------- */
.notice {
    display: flex; gap: 0.85rem; align-items: flex-start;
    padding: 1rem 1.2rem; border-radius: 14px;
    border: 1px solid rgba(63,208,201,0.4);
    background: rgba(63,208,201,0.09);
    margin-bottom: 1.6rem;
    font-size: 0.95rem;
}
.notice.error { border-color: rgba(255,158,128,0.45); background: rgba(255,158,128,0.09); }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--amber); color: #1A1206;
    padding: 0.8rem 1.2rem; border-radius: 0 0 10px 0; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* Honeypot wrapper. Moved off-screen rather than display:none, which some
   form-filling scripts detect and skip. Never shown to a person. */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
