/* ================================================================
   Duku Technologies
   Black and white like Apple, one accent per division.
   ================================================================ */
:root {
  --black: #000;
  --graphite: #1d1d1f;
  --white: #fff;
  --mist: #f5f5f7;
  --line-l: #d2d2d7;
  --line-d: #2c2c2e;
  --muted-l: #6e6e73;
  --muted-d: #a1a1a6;

  --c-biz: #3b74ff;
  --c-health: #1cc7a0;
  --c-sec: #9a7bff;
  --ink-biz: #1f55d6;
  --ink-health: #0a7f66;
  --ink-sec: #5b3fd0;

  --accent: var(--c-biz);
  --accent-ink: var(--ink-biz);

  --font: "Geist", ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1120px;
  --nav-h: 56px;
}
body.theme-software { --accent: var(--c-biz); --accent-ink: var(--ink-biz); }
body.theme-health { --accent: var(--c-health); --accent-ink: var(--ink-health); }
body.theme-security { --accent: var(--c-sec); --accent-ink: var(--ink-sec); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.55; color: var(--graphite); background: var(--white); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #000; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.ico { width: 20px; height: 20px; flex: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 780px; }

/* type scale */
h1 { font-size: clamp(2.7rem, 7.4vw, 6.2rem); font-weight: 600; line-height: 1.02; letter-spacing: -.045em; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); font-weight: 600; line-height: 1.07; letter-spacing: -.038em; }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.lede { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.5; letter-spacing: -.012em; max-width: 30em; }
.lede.wide { max-width: 36em; }

/* sections: light / dark surfaces */
.section { padding: clamp(72px, 10vw, 132px) 0; }
.section.light { background: var(--mist); }
.dark { background: var(--black); color: var(--white); }
.section-title { max-width: 18em; margin-bottom: clamp(36px, 5vw, 64px); }
.dark .lede, .dark p { color: var(--muted-d); }
.dark h1, .dark h2, .dark h3, .dark dt { color: var(--white); }
.light p, .section p { color: var(--muted-l); }
.section h2 + .lede { margin-top: -28px; margin-bottom: 48px; }

/* ───────── buttons and links ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 999px; border: 0; font-weight: 500; font-size: 1.02rem; line-height: 1.2; transition: transform .2s, background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.btn-sm { padding: 8px 18px; font-size: .92rem; }
.btn-solid { background: var(--white); color: var(--black); }
.btn-solid:hover { background: #e8e8ed; transform: translateY(-1px); }
.btn-pill { background: rgba(255, 255, 255, .14); color: var(--white); }
.btn-pill:hover { background: rgba(255, 255, 255, .24); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #2a2a2d; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--graphite); box-shadow: inset 0 0 0 1.5px var(--line-l); }
.btn-ghost:hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--graphite); }
.link { display: inline-block; font-weight: 500; color: var(--accent); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .25s; padding-bottom: 2px; }
.link:hover { background-size: 100% 1.5px; }
.light .link, .section .link { color: var(--accent-ink); }
.dark .link { color: var(--accent); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 34px; }
.center-row { justify-content: center; }

/* ───────── header ───────── */
.site-header { position: sticky; top: 0; z-index: 60; background: rgba(0, 0, 0, .9); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff; }
.bar { height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 1.35rem; letter-spacing: -.04em; color: #fff; }
.mark { width: 26px; height: 26px; color: #fff; }
.nav { display: flex; gap: 6px; margin: 0 auto; }
.nav a { padding: 8px 14px; font-size: .92rem; color: rgba(255, 255, 255, .78); border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.bar-end { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; place-items: center; }
.drawer { background: #000; border-top: 1px solid rgba(255, 255, 255, .1); padding: 10px 0 24px; }
.drawer a { display: block; padding: 16px 0; font-size: 1.5rem; font-weight: 600; letter-spacing: -.03em; border-bottom: 1px solid var(--line-d); }

/* ───────── hero ───────── */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 112px) 0 0; text-align: center; }
.hero-inner { position: relative; z-index: 2; }
.hero h1 { max-width: 12em; margin: 0 auto; }
.hero h1 span { display: block; }
.hero-sub { max-width: 34em; margin: 26px auto 0; font-size: clamp(1.12rem, 1.8vw, 1.4rem); line-height: 1.45; color: var(--muted-d); letter-spacing: -.012em; }
.glow { position: absolute; left: 50%; top: 52%; width: min(1100px, 130vw); height: 620px; transform: translate(-50%, 0); border-radius: 50%; filter: blur(110px); opacity: 0; transition: opacity .7s ease; z-index: 1; pointer-events: none; }
.glow.is-on { opacity: .34; }
.glow-biz { background: var(--c-biz); }
.glow-health { background: var(--c-health); }
.glow-sec { background: var(--c-sec); }
.glow-page { background: var(--accent); top: 10%; left: 75%; width: 720px; height: 520px; }
.glow-page.is-on { opacity: .28; }

/* the one orchestrated moment: headline lines settle in */
@media (prefers-reduced-motion: no-preference) {
  .hero h1 span { opacity: 0; transform: translateY(18px); animation: line .9s cubic-bezier(.2, .7, .2, 1) forwards; }
  .hero h1 .l2 { animation-delay: .16s; }
  .hero h1 .l3 { animation-delay: .32s; }
  .hero-sub, .hero .cta-row, .switcher, .stage { opacity: 0; animation: line .9s cubic-bezier(.2, .7, .2, 1) .55s forwards; }
  .hero .cta-row { animation-delay: .65s; }
  .switcher { animation-delay: .75s; }
  .stage { animation-delay: .85s; }
  @keyframes line { to { opacity: 1; transform: none; } }
}

/* switcher + stage */
.switcher { display: inline-flex; gap: 4px; padding: 5px; margin-top: clamp(44px, 6vw, 72px); background: rgba(255, 255, 255, .1); backdrop-filter: blur(14px); border-radius: 999px; }
.switcher button { border: 0; background: transparent; color: rgba(255, 255, 255, .72); padding: 10px 22px; border-radius: 999px; font-weight: 500; font-size: .98rem; transition: background .25s, color .25s; }
.switcher button:hover { color: #fff; }
.switcher button.is-active { background: #fff; color: #000; }
.stage { position: relative; margin: 26px auto 0; max-width: 1000px; text-align: left; }
.stage-pane { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; align-items: stretch; background: #0b0b0c; border: 1px solid rgba(255, 255, 255, .12); border-bottom: 0; border-radius: 28px 28px 0 0; overflow: hidden; }
.stage-pane.is-active { animation: swap .5s ease both; }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stage-ui { padding: 28px; }
.stage-copy { padding: 44px 40px 44px 12px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.stage-copy h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.03em; line-height: 1.12; }
.stage-copy p { color: var(--muted-d); font-size: 1.02rem; }
.stage-copy .link { margin-top: 8px; align-self: flex-start; }

/* ───────── illustrative UI ───────── */
.ui { background: #111113; border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; color: #fff; overflow: hidden; display: grid; min-height: 300px; font-size: .92rem; }
.ui-biz { grid-template-columns: 54px minmax(0, 1fr); }
.ui-side { background: #0a0a0b; padding: 20px 14px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid rgba(255, 255, 255, .07); }
.ui-side b { height: 9px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
.ui-side b:first-child { background: var(--c-biz); }
.ui-main { padding: 20px 22px 22px; min-width: 0; }
.ui-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ui-head strong { font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: rgba(255, 255, 255, .08); color: #d1d1d6; }
.pill .ico { width: 13px; height: 13px; }
.pill-ok { background: rgba(28, 199, 160, .14); color: #5fe3c3; }
.pill-warn { background: rgba(154, 123, 255, .16); color: #c3b2ff; }
.feed, .finds { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.feed li, .finds li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: rgba(255, 255, 255, .05); border-radius: 12px; }
.feed li > span, .finds li > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-biz); flex: none; }
.feed em, .finds em { font-style: normal; font-size: .78rem; color: var(--muted-d); }
.is-active .feed li, .is-active .finds li, .is-active .journey li { animation: rowin .5s ease both; animation-delay: calc(var(--d) * 70ms + 150ms); }
@keyframes rowin { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.journey { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 6px 0 22px; position: relative; }
.journey li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: .72rem; color: var(--muted-d); position: relative; }
.journey li::before { content: ""; position: absolute; top: 7px; left: -50%; width: 100%; height: 2px; background: rgba(255, 255, 255, .12); }
.journey li:first-child::before { display: none; }
.journey li.is-done::before, .journey li.is-now::before { background: var(--c-health); }
.journey i { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: #1c1c1f; border: 2px solid rgba(255, 255, 255, .2); }
.journey .is-done i { background: var(--c-health); border-color: var(--c-health); }
.journey .is-now i { background: #000; border-color: var(--c-health); box-shadow: 0 0 0 5px rgba(28, 199, 160, .2); }
.journey .is-now { color: #fff; font-weight: 500; }
.record { display: grid; gap: 10px; padding: 16px; background: rgba(255, 255, 255, .05); border-radius: 14px; }
.record-row { display: flex; justify-content: space-between; gap: 18px; }
.record-row b { height: 10px; width: 34%; background: rgba(255, 255, 255, .22); border-radius: 6px; }
.record-row i { height: 10px; width: 42%; background: rgba(255, 255, 255, .1); border-radius: 6px; }
.sev { width: 8px; height: 26px; border-radius: 4px; flex: none; }
.sev-hi { background: #ff6b6b; } .sev-md { background: #ffb454; } .sev-lo { background: #6fa8ff; }
.tag { padding: 3px 10px; border-radius: 999px; }
.tag-hi { background: rgba(255, 107, 107, .16); color: #ff9a9a !important; }
.tag-md { background: rgba(255, 180, 84, .16); color: #ffc98a !important; }
.tag-lo { background: rgba(111, 168, 255, .16); color: #9ec4ff !important; }

/* ───────── chapters (home) ───────── */
.chapter { padding: clamp(72px, 10vw, 128px) 0; }
.chapter.software { background: var(--mist); --accent: var(--ink-biz); }
.chapter.health { background: #fff; --accent: var(--ink-health); }
.chapter.security { background: #000; color: #fff; --accent: var(--c-sec); }
.chapter.security h2 { color: #fff; }
.chapter.security p, .chapter.security span { color: var(--muted-d); }
.chapter.security .plain-list li { border-color: var(--line-d); }
.chapter.security .plain-list strong { color: #fff; }
.chapter-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(36px, 7vw, 96px); align-items: start; }
.chapter .lede { margin: 22px 0 28px; color: var(--muted-l); }
.chapter.security .lede { color: var(--muted-d); }
.chapter .link { color: var(--accent); }
.plain-list li { display: grid; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line-l); }
.plain-list li:last-child { border-bottom: 1px solid var(--line-l); }
.chapter.security .plain-list li:last-child { border-bottom-color: var(--line-d); }
.plain-list strong { font-size: 1.12rem; font-weight: 600; letter-spacing: -.015em; color: var(--graphite); }
.plain-list span { color: var(--muted-l); }

/* rules (3 columns of plain text) */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 5vw, 64px); }
.rules h3 { margin-bottom: 12px; font-size: 1.35rem; }
.rules p { max-width: 24em; }

/* spec list (capabilities) */
.spec { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 88px); }
.spec > div { display: grid; gap: 6px; padding: 24px 0; border-top: 1px solid var(--line-l); }
.spec dt { font-weight: 600; font-size: 1.15rem; letter-spacing: -.015em; color: var(--graphite); }
.spec dd { color: var(--muted-l); max-width: 28em; }
.spec-dark > div { border-color: var(--line-d); }
.spec-dark dt { color: #fff; }

/* sequence */
.sequence { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; counter-reset: none; }
.sequence li { position: relative; padding-top: 30px; border-top: 1px solid var(--line-l); }
.sequence li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.dark .sequence li { border-color: var(--line-d); }
.sequence .n { display: block; font-family: var(--mono); font-size: .8rem; color: var(--muted-l); margin-bottom: 10px; }
.dark .sequence .n { color: var(--muted-d); }
.sequence h3 { font-size: 1.25rem; margin-bottom: 8px; }
.sequence p { font-size: .98rem; }

/* terminal */
.term-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.term-wrap .section-title { margin-bottom: 20px; }
.term-wrap .section-title + .lede { margin: 0; }
.term-wrap > * { min-width: 0; }
.term { background: #0d0d0f; border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a3d; }
.term-bar span { margin-left: 10px; font-family: var(--mono); font-size: .76rem; color: var(--muted-d); }
.term pre { margin: 0; padding: 22px; overflow-x: auto; font-family: var(--mono); font-size: .86rem; line-height: 1.85; color: #e5e5ea; }
.c-dim { color: #6e6e73; } .c-ok { color: #5fe3c3; } .c-warn { color: #ffb454; } .c-hi { color: #ff6b6b; } .c-md { color: #ffb454; }

/* FAQ */
.faq { border-top: 1px solid var(--line-l); }
.faq details { border-bottom: 1px solid var(--line-l); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 2px; cursor: pointer; font-size: 1.18rem; font-weight: 500; letter-spacing: -.015em; color: var(--graphite); }
.faq summary::-webkit-details-marker { display: none; }
.faq-ico { color: var(--muted-l); transition: transform .25s; }
.faq details[open] .faq-ico { transform: rotate(180deg); }
.faq details p { padding: 0 48px 26px 2px; max-width: 36em; }

/* CTA */
.cta { padding: clamp(80px, 11vw, 140px) 0; text-align: center; position: relative; overflow: hidden; }
.cta h2 { max-width: 14em; margin: 0 auto; }
.cta p { margin: 20px auto 0; max-width: 28em; font-size: 1.2rem; }
.cta .cta-row { justify-content: center; }

/* ───────── service page hero ───────── */
.hero-page { text-align: left; padding: clamp(64px, 9vw, 112px) 0 clamp(64px, 8vw, 104px); }
.page-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.page-hero-copy h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.hero-page .hero-sub { margin: 24px 0 0; max-width: 30em; }
.page-hero-visual .stage-ui { padding: 0; }
.page-hero-visual .ui { box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.contact-hero .hero-sub { margin-left: 0; }
.contact-hero .container { position: relative; z-index: 2; }

/* ───────── contact ───────── */
.contact-sec { padding-top: clamp(56px, 8vw, 96px); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(32px, 7vw, 96px); align-items: start; }
.contact-side h2 { font-size: 1.8rem; margin-bottom: 22px; }
.contact-link { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 12px; background: #fff; border-radius: 18px; transition: transform .2s, box-shadow .2s; }
.contact-link:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.contact-link .ico { width: 26px; height: 26px; color: var(--accent-ink); }
.contact-link b { display: block; color: var(--graphite); font-weight: 600; }
.contact-link small { color: var(--muted-l); font-size: .92rem; }
.note { font-size: .93rem; margin-top: 18px; color: var(--muted-l); max-width: 28em; }
.form { background: #fff; border-radius: 24px; padding: clamp(22px, 4vw, 40px); display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: .95rem; color: var(--graphite); }
.field input, .field select, .field textarea { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line-l); border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 4px rgba(59, 116, 255, .16); }
.field .has-err { border-color: #d92d20; }
.form-err { color: #b42318 !important; font-weight: 500; font-size: .95rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form .note { margin: 0; }

/* ───────── footer ───────── */
.site-footer { background: #000; color: var(--muted-d); padding: 72px 0 36px; border-top: 1px solid var(--line-d); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand p { margin-top: 16px; max-width: 18em; font-size: .98rem; }
.site-footer h4 { color: #fff; font-size: .92rem; font-weight: 600; margin-bottom: 16px; }
.site-footer li { margin-bottom: 11px; font-size: .95rem; }
.site-footer li a:hover { color: #fff; }
.foot-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-d); font-size: .88rem; }

/* ───────── responsive ───────── */
@media (max-width: 960px) {
  .nav { display: none; }
  .bar-end { margin-left: auto; }
  .menu-btn { display: grid; }
  .stage-pane { grid-template-columns: 1fr; }
  .stage-copy { padding: 4px 28px 36px; }
  .chapter-grid, .term-wrap, .contact-grid, .page-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .rules { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .sequence { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sequence li { padding: 24px 0 26px 30px; border-top: 0; border-left: 1px solid var(--line-l); }
  .dark .sequence li { border-left-color: var(--line-d); }
  .sequence li::before { top: 30px; left: -5px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .glow-page { left: 50%; top: 40%; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .container { padding: 0 20px; }
  .switcher { display: flex; width: 100%; }
  .switcher button { flex: 1; padding: 10px 6px; font-size: .9rem; }
  .stage-ui { padding: 16px; }
  .stage-copy { padding: 4px 20px 30px; }
  .ui-biz { grid-template-columns: 38px minmax(0, 1fr); }
  .ui-main { padding: 16px; }
  .journey li { font-size: .6rem; }
  .cta-row .btn { width: 100%; }
  .form-actions .btn { width: 100%; }
  .faq details p { padding-right: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition-duration: .01ms !important; }
}
