/* ── Kibo public site — custom CSS (no framework) ───────────────────────────
   Palette: deep green + gold on off-white, with cream sections.
   Fonts (DM Serif Display + aa) are loaded via <link> in _Layout.       */

:root {
    --g0: #0d1f16;          /* near-black green */
    --ink: #0a0f0c;         /* black-green */
    --g2: #1e3d2f;
    --g3: #2d6147;
    --g4: #4a8c6a;
    --g5: #8fbfa0;
    --gold: #c9a96e;
    --gold-l: #e8d5a3;
    --gold-d: #a8884f;
    --cream: #faf7f0;
    --cream-2: #f6f2e8;
    --white: #ffffff;
    --line: rgba(45, 97, 71, .10);
    --maxw: 1240px;
    --header-h: 72px;       /* approx sticky-header height (img + padding + border) */
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--white);
    color: var(--g2);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.6;
}
a { color: var(--g3); text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 3.5rem; }
.site-muted { color: var(--g5); }

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 100;
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    background: rgba(255, 255, 255, .72);
    border-bottom: 1px solid var(--line);
}
.site-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--maxw); margin: 0 auto; padding: 1.05rem 3.5rem;
}
.site-brand { display: flex; align-items: center; gap: .6rem; }
.site-brand img { height: 30px; width: auto; display: block; }
.logo-text { font-family: 'DM Serif Display', serif; font-style: italic; font-size: 1.45rem; color: var(--gold); letter-spacing: .04em; }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.nav-link { font-size: .9rem; font-weight: 500; color: var(--g3); position: relative; letter-spacing: .01em; transition: color .2s; }
.nav-link::after { content: ''; position: absolute; left: 0; bottom: -5px; width: 0; height: 1.5px; background: var(--gold); transition: width .25s ease; }
.nav-link:hover { color: var(--g0); }
.nav-link:hover::after { width: 100%; }

.nav-right { display: flex; align-items: center; gap: 1.3rem; }
.beta-pill {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid rgba(201, 169, 110, .35); background: rgba(201, 169, 110, .07);
    color: var(--gold-d); font-size: .68rem; font-weight: 600; letter-spacing: .12em;
    text-transform: uppercase; padding: .4rem .9rem; border-radius: 100px;
}
.beta-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: pulse 2.2s ease infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(1.6); } }

.site-cta {
    background: var(--ink); color: var(--gold-l); font-size: .85rem; font-weight: 600;
    padding: .6rem 1.25rem; border-radius: 100px; transition: all .25s;
    box-shadow: 0 4px 18px rgba(13, 31, 22, .14);
}
.site-cta:hover { background: var(--gold); color: var(--ink); transform: translateY(-1px); box-shadow: 0 6px 26px rgba(201, 169, 110, .32); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn { display: inline-block; padding: .85rem 1.7rem; border-radius: 100px; font-weight: 600; font-size: .9rem; cursor: pointer; border: 1.5px solid transparent; transition: all .25s; }
.btn-primary { background: var(--ink); color: var(--gold-l); box-shadow: 0 4px 20px rgba(13, 31, 22, .15); }
.btn-primary:hover { background: var(--gold); color: var(--ink); transform: translateY(-1px); box-shadow: 0 6px 30px rgba(201, 169, 110, .3); }
.btn-ghost { background: transparent; color: var(--g2); border-color: rgba(45, 97, 71, .22); }
.btn-ghost:hover { border-color: var(--gold); color: var(--g0); }

main::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 55% 70% at 100% 40%, rgba(74, 140, 106, .08) 0%, transparent 68%),
        radial-gradient(ellipse 40% 55% at 0% 100%, rgba(201, 169, 110, .07) 0%, transparent 60%);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 4rem;
    max-width: var(--maxw); margin: 0 auto; padding: 5.5rem 3.5rem 6rem;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .6rem; font-size: .72rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase; color: var(--g4); margin-bottom: 1.6rem;
    animation: fadeUp .6s ease both;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--g4); }
.hero h1 {
    font-family: 'DM Serif Display', serif; font-size: clamp(2.6rem, 4.6vw, 4.2rem);
    line-height: 1.06; color: var(--ink); margin-bottom: 1.4rem; animation: fadeUp .7s ease .08s both;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-sub { font-size: 1.05rem; font-weight: 300; line-height: 1.75; color: var(--g3); max-width: 460px; margin-bottom: 2.2rem; animation: fadeUp .7s ease .16s both; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.4rem; animation: fadeUp .7s ease .22s both; }
.chip { display: inline-flex; align-items: center; background: var(--cream); border: 1px solid var(--line); color: var(--g3); font-size: .76rem; padding: .38rem .85rem; border-radius: 100px; transition: all .2s; }
.chip:hover { border-color: var(--gold); color: var(--g0); background: var(--white); transform: translateY(-1px); }

.hero-actions { display: flex; gap: .7rem; flex-wrap: wrap; animation: fadeUp .7s ease .28s both; }

/* ── Beta waitlist form ──────────────────────────────────────────────────── */
/* Offset the in-page jump (#join) so it lands below the sticky header, not under it. */
#join { scroll-margin-top: calc(var(--header-h) * 2); }
.beta-form { max-width: 460px; animation: fadeUp .7s ease .28s both; }
.waitlist-row { display: flex; gap: .55rem; flex-wrap: wrap; margin-bottom: .7rem; }
.waitlist-row input {
    flex: 1; min-width: 210px; padding: .85rem 1.25rem; border-radius: 100px;
    border: 1.5px solid rgba(45, 97, 71, .2); background: var(--white);
    font-family: inherit; font-size: .9rem; color: var(--g0); outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.waitlist-row input::placeholder { color: var(--g5); }
.waitlist-row input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 169, 110, .12); }
.waitlist-row .btn { white-space: nowrap; }
.form-note { font-size: .74rem; color: var(--g5); }
.form-err { font-size: .82rem; color: #b4452f; margin-bottom: .5rem; }
.form-ok {
    display: flex; align-items: center; gap: .6rem; max-width: 460px;
    background: rgba(74, 140, 106, .08); border: 1px solid rgba(74, 140, 106, .25);
    color: var(--g2); padding: .9rem 1.2rem; border-radius: 14px; font-size: .92rem;
    animation: fadeUp .6s ease both;
}
.form-ok::before { content: '✓'; color: var(--g4); font-weight: 700; }

/* Respect the [hidden] attribute even on flex/grid elements (e.g. .form-ok). */
[hidden] { display: none !important; }

/* ── Beta waitlist — full form (single insert) ───────────────────────────── */
.wl-form-full { max-width: 460px; animation: fadeUp .5s ease both; }
#wl-open { animation: fadeUp .7s ease .28s both; }
.wl-q-label { display: block; font-size: .8rem; font-weight: 600; color: var(--g3); margin: 1rem 0 .5rem; }
.wl-q-label:first-child { margin-top: 0; }
.wl-input, .wl-select, .wl-textarea {
    width: 100%; padding: .75rem 1rem; border-radius: 12px; font-family: inherit; font-size: .88rem;
    color: var(--g0); background: var(--white); border: 1.5px solid rgba(45, 97, 71, .2);
    outline: none; transition: border-color .2s, box-shadow .2s;
}
.wl-input::placeholder, .wl-textarea::placeholder { color: var(--g5); }
.wl-select { cursor: pointer; }
.wl-textarea { margin-top: .6rem; resize: vertical; }
.wl-input:focus, .wl-select:focus, .wl-textarea:focus {
    border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 169, 110, .12);
}
.wl-checks { display: grid; gap: .5rem; }
.wl-check {
    display: flex; align-items: flex-start; gap: .6rem; padding: .65rem .8rem; cursor: pointer;
    border: 1px solid var(--line); border-radius: 12px; background: var(--cream);
    transition: border-color .2s, background .2s;
}
.wl-check:hover { border-color: rgba(201, 169, 110, .4); background: var(--white); }
.wl-check input { margin-top: .15rem; accent-color: var(--g3); width: 16px; height: 16px; flex: none; }
.wl-check-text { display: flex; flex-direction: column; line-height: 1.35; }
.wl-check-text strong { font-size: .85rem; font-weight: 600; color: var(--g0); }
.wl-check-text em { font-size: .74rem; font-style: normal; color: var(--g5); }
.wl-submit { margin-top: 1.2rem; }
.wl-form-full .form-err { margin-top: 1rem; }
.wl-form-full .form-note { margin-top: .7rem; }

/* ── Pricing — invite-only beta panel ────────────────────────────────────── */
.beta-panel {
    max-width: 640px; margin: 1rem auto 3rem; padding: 2.6rem; text-align: center;
    border: 1px solid var(--line); border-radius: 24px; background: var(--cream);
    background-image: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(201, 169, 110, .08) 0%, transparent 70%);
}
.beta-panel h2 {
    font-family: 'DM Serif Display', serif; font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--ink); margin: 1.1rem 0 1rem;
}
.beta-lead { font-size: 1rem; font-weight: 300; line-height: 1.7; color: var(--g3); margin-bottom: 1.6rem; }
.beta-points { list-style: none; display: inline-flex; flex-direction: column; gap: .55rem; text-align: left; margin: 0 auto 1.8rem; }
.beta-points li { position: relative; padding-left: 1.6rem; font-size: .9rem; color: var(--g2); }
.beta-points li::before { content: '✓'; position: absolute; left: 0; color: var(--g4); font-weight: 700; }
.beta-panel-note { margin-top: 1rem; }

/* ── Orbital visual (text pips, no emoji) ────────────────────────────────── */
.visual::before {
        content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-color: transparent;
  background-image: radial-gradient(#7f8c8d 1px, transparent 1px);
  background-size: 12px 12px;
  -webkit-mask-image: radial-gradient(circle, black 30%, transparent 70%);
  mask-image: radial-gradient(circle, black 30%, transparent 70%);
}
.visual { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; animation: fadeIn .9s ease .2s both; }
.orb-wrap { position: relative; width: 420px; height: 420px; }
.orb-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 96px; height: 96px; z-index: 10; filter: drop-shadow(0 8px 34px rgba(201, 169, 110, .25)); }
.orb-core img { width: 100%; height: 100%; object-fit: contain; }
.ring { position: absolute; top: 50%; left: 50%; border-radius: 50%; transform: translate(-50%, -50%); animation: spin linear infinite; }
.ring-1 { width: 220px; height: 220px; border: 1px dashed rgba(74, 140, 106, .28); animation-duration: 26s; }
.ring-2 { width: 340px; height: 340px; border: 1px dashed rgba(201, 169, 110, .22); animation-duration: 40s; animation-direction: reverse; }
.ring-3 { width: 420px; height: 420px; border: 1px dashed rgba(74, 140, 106, .12); animation-duration: 56s; }
@keyframes spin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

.pip {
    position: absolute; transform: translate(-50%, -50%);
    background: var(--white); border: 1px solid rgba(45, 97, 71, .12);
    box-shadow: 0 4px 16px rgba(45, 97, 71, .08); border-radius: 100px;
    padding: .32rem .7rem; font-size: .72rem; font-weight: 500; color: var(--g3); white-space: nowrap;
    transition: box-shadow .3s, color .2s, border-color .2s;
}
.pip:hover { color: var(--g0); border-color: var(--gold); box-shadow: 0 8px 24px rgba(201, 169, 110, .22); }
.ring-1 .pip { animation: spin 26s linear infinite reverse; }
.ring-2 .pip { animation: spin 40s linear infinite; }
.ring-3 .pip { animation: spin 56s linear infinite reverse; }
/* cardinal placement on the ring edge; the .pip / spin keyframe both use
   translate(-50%,-50%) for centering, so positioning is just top/left. */
.pos-t { top: 0;    left: 50%; }
.pos-b { top: 100%; left: 50%; }
.pos-l { top: 50%;  left: 0; }
.pos-r { top: 50%;  left: 100%; }

/* ── Features ────────────────────────────────────────────────────────────── */
.features { position: relative; background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 5.5rem 0 6rem; }
.features-head { text-align: center; max-width: 620px; margin: 0 auto 3.4rem; }
.features-head .eyebrow { justify-content: center; }
.features-head h2 { font-family: 'DM Serif Display', serif; font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.12; color: var(--ink); }
.features-head h2 em { font-style: italic; color: var(--gold); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; max-width: var(--maxw); margin: 0 auto; }
.feature-card { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 2.2rem 2rem; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.feature-card::before { content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, var(--g4), var(--gold)); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(13, 31, 22, .1); border-color: rgba(201, 169, 110, .4); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, var(--g0), var(--g2)); margin-bottom: 1.4rem; box-shadow: 0 6px 20px rgba(13, 31, 22, .16); }
.feature-icon svg { width: 26px; height: 26px; stroke: var(--gold-l); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature-card h3 { font-family: 'DM Serif Display', serif; font-size: 1.4rem; color: var(--ink); margin-bottom: .7rem; }
.feature-card p { font-size: .95rem; font-weight: 300; line-height: 1.7; color: var(--g3); }

/* ── CTA band ────────────────────────────────────────────────────────────── */
.cta-band { text-align: center; padding: 5rem 0; }
.cta-band h2 { font-family: 'DM Serif Display', serif; font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--ink); margin-bottom: 1.6rem; }

/* ── Page head + prose (legal pages) ─────────────────────────────────────── */
.page-head { padding: 3.5rem 0 1rem; }
.page-head h1 { font-family: 'DM Serif Display', serif; font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--ink); }
.prose { padding: 1rem 0 4.5rem; max-width: 760px; }
.prose h2 { font-family: 'DM Serif Display', serif; margin-top: 2rem; font-size: 1.4rem; color: var(--ink); }
.prose h3 { margin-top: 1.4rem; font-size: 1.08rem; color: var(--g2); }
.prose p, .prose li { color: var(--g2); font-weight: 300; }
.prose a { color: var(--gold-d); text-decoration: underline; }
.prose code { background: var(--cream); padding: .1rem .35rem; border-radius: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: .7rem .85rem; border-bottom: 1px solid var(--line); font-size: .92rem; line-height: 1.55; }
.prose th { color: var(--g0); font-weight: 600; background: var(--cream); }
.prose tbody tr:nth-child(even) { background: rgba(250, 247, 240, .5); }
/* First column = the row label (e.g. tokushoho item names): emphasized, kept narrow. */
.prose td:first-child { color: var(--g0); font-weight: 500; width: 30%; min-width: 9rem; }
.prose td:first-child strong { font-weight: 600; }

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.plan-grid { display: grid; gap: 1.5rem; padding: 1.5rem 0; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plan-card { border: 1px solid var(--line); border-radius: 20px; padding: 2rem; display: flex; flex-direction: column; background: var(--white); transition: transform .3s, box-shadow .3s, border-color .3s; }
.plan-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(13, 31, 22, .1); border-color: rgba(201, 169, 110, .4); }
.plan-name { font-family: 'DM Serif Display', serif; font-size: 1.4rem; color: var(--ink); margin-bottom: .6rem; }
.plan-price { display: flex; align-items: baseline; gap: .35rem; margin-bottom: .2rem; }
.plan-amount { font-family: 'DM Serif Display', serif; font-size: 2.1rem; color: var(--g0); }
.plan-period { color: var(--g5); }
.plan-yearly { font-size: .9rem; margin-bottom: .8rem; }
.plan-features { list-style: none; margin: 1rem 0 1.4rem; }
.plan-features li { padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; color: var(--g3); }
.plan-cta { margin-top: auto; text-align: center; }
.pricing-note { padding-bottom: 3rem; }

/* ── Footer (our structure, recoloured) ──────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--g5); padding: 4rem 0 2rem; margin-top: 0; }
.site-footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(143, 191, 160, .12); }
.site-footer-col .logo-text { color: var(--gold); }
.site-footer-col img { height: 26px; margin-bottom: .9rem; }
/* Footer brand: logo image + "kibo" wordmark, vertically centred. */
.site-footer-logo { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: .9rem; }
.site-footer-logo img { height: 30px; margin-bottom: 0; }
.site-footer-logo .logo-text { font-size: 1.4rem; line-height: 1; }
.site-footer-col h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); margin-bottom: 1rem; }
.site-footer-col a { display: block; color: var(--g5); padding: .25rem 0; font-size: .92rem; transition: color .2s; }
.site-footer-col a:hover { color: var(--gold-l); }
.site-footer-col a.active { color: var(--gold-l); font-weight: 600; }
.site-footer-brand p { font-size: .92rem; font-weight: 300; line-height: 1.7; color: var(--g5); max-width: 260px; }
.site-copyright { padding-top: 1.6rem; font-size: .78rem; color: rgba(143, 191, 160, .6); }

/* ── Reveal on scroll ────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 980px) {
    .feature-grid { grid-template-columns: 1fr; max-width: 460px; }
    .site-footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .site-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    .container, .site-header-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
    .site-header-inner { padding-top: .9rem; padding-bottom: .9rem; }
    .site-nav .nav-link { display: none; }
    .beta-pill { display: none; }
    .hero { grid-template-columns: 1fr; padding: 2.5rem 1.5rem 3.5rem; gap: 2.2rem; }
    .hero-copy { order: 2; }
    .visual { order: 1; }
    .orb-wrap { width: min(74vw, 320px); height: min(74vw, 320px); }
    .ring-3 { display: none; }
    .ring-1 { width: min(38vw, 170px); height: min(38vw, 170px); }
    .ring-2 { width: min(60vw, 270px); height: min(60vw, 270px); }
    .features { padding: 3.5rem 0 4rem; }
    .cta-band { padding: 3.5rem 0; }
}
