/* Cognax site — shared design system. Page-specific styles go in css/<page>.css, not here. */
:root {
  --bg: #ffffff;
  --bg-soft: #f4f5f9;
  --bg-deep: #0e1020;          /* used for one dark band per page at most */
  --ink: #0e1020;
  --ink-2: #3a3e55;
  --muted: #6b7088;
  --line: #e3e5ee;
  --brand: #4f46e5;            /* app indigo */
  --brand-ink: #3b33c9;
  --brand-soft: #eeedff;
  --accent: #ff5c00;           /* logo orange: use sparingly */
  --ok: #0f8a5f;
  --r-sm: 10px; --r-md: 16px; --r-lg: 28px;
  --wrap: 1240px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 44px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 7vw, 6rem); font-weight: 600; letter-spacing: -0.045em; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.8rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -0.025em; line-height: 1.2; }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.lede { font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: var(--ink-2); line-height: 1.55; max-width: 52ch; text-wrap: pretty; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 200; }
.skip:focus { left: 8px; }

/* nav: Apple-style slim translucent bar, logo left, flat links centred, sign in right */
.nav { position: sticky; top: 0; z-index: 60; background: rgba(255, 255, 255, .8); border-bottom: 1px solid rgba(0, 0, 0, .08); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--nav-h); width: min(1024px, 100% - 48px); margin-inline: auto; }
.brand { display: flex; align-items: center; }
.brand img { width: 96px; height: auto; }
.links { display: flex; gap: clamp(14px, 2.2vw, 28px); align-items: center; justify-content: center; flex: 1; }
.links a, .nav-signin { text-decoration: none; font-size: .75rem; font-weight: 400; letter-spacing: -0.005em; color: rgba(29, 29, 31, .8); transition: color .2s; white-space: nowrap; }
.links a:hover, .nav-signin:hover, .links a[aria-current="page"] { color: #000; }
.links a[aria-current="page"] { font-weight: 500; }
.nav-cta { display: flex; gap: 8px; align-items: center; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; place-items: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 12px; font: inherit; font-weight: 600; font-size: .98rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .25s; white-space: nowrap; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(14, 16, 32, .55); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-ink); transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(79, 70, 229, .6); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1.03rem; border-radius: 14px; }
.btn:active { transform: scale(.98); }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; color: var(--brand); text-decoration: none; }
.link-arrow::after { content: "→"; transition: transform .3s var(--ease); }
.link-arrow:hover::after { transform: translateX(4px); }

/* hero pattern: copy left, 3D right. Pages may override in css/<page>.css */
.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(48px, 7vw, 104px); position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: min(720px, calc(100dvh - var(--nav-h) - 24px)); }
.hero h1 { margin-bottom: 24px; }
.hero .lede { margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 20px; font-size: .92rem; color: var(--muted); }

/* 3D stage: a canvas inside a positioned box. three/stage.js mounts into [data-stage] */
.stage3d { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 720px; }
.stage3d canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; outline: none; }
.stage3d.wide { aspect-ratio: 16 / 10; }
.stage3d .fallback { position: absolute; inset: 0; display: none; place-items: center; color: var(--muted); font-size: .9rem; }
.no-webgl .stage3d .fallback { display: grid; }

/* sections */
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section.soft { background: var(--bg-soft); }
.section.deep { background: var(--bg-deep); color: #f3f4fb; }
.section.deep .lede, .section.deep .muted { color: #a9adc7; }
.section-head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head p { margin-top: 20px; color: var(--ink-2); font-size: 1.2rem; max-width: 56ch; }

/* feature rows (copy + visual) */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(32px, 7vw, 110px); align-items: center; padding: clamp(32px, 5vw, 72px) 0; }
.row.flip .row-copy { order: 2; }
.row-copy p { margin-top: 18px; color: var(--ink-2); font-size: 1.12rem; max-width: 46ch; }
.ticks { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.ticks li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* UI mock primitives (flat, product-like; used inside 3D tilt cards) */
.ui { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 30px 70px -30px rgba(14, 16, 32, .3); overflow: hidden; font-size: .92rem; }
.ui-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.ui-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.ui-body { padding: 18px; display: grid; gap: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-weight: 500; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.tag.ok { background: #e2f6ee; color: var(--ok); }

/* CTA: one dark band */
.cta-band { background: var(--bg-deep); color: #fff; border-radius: var(--r-lg); padding: clamp(48px, 8vw, 104px) clamp(24px, 6vw, 88px); display: grid; gap: 24px; justify-items: start; position: relative; overflow: hidden; }
.cta-band h2 { max-width: 16ch; }
.cta-band p { color: #b4b8d0; max-width: 46ch; font-size: 1.18rem; }
.cta-band .btn-primary { background: #fff; color: var(--ink); }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.cta-band .btn-ghost:hover { border-color: #fff; }

/* footer */
.foot { margin-top: clamp(72px, 9vw, 130px); border-top: 1px solid var(--line); padding: 64px 0 36px; background: var(--bg-soft); }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 36px; }
.foot h4 { font-size: .95rem; margin-bottom: 16px; letter-spacing: 0; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a { text-decoration: none; color: var(--muted); font-size: .96rem; }
.foot a:hover { color: var(--ink); }
.foot-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .88rem; color: var(--muted); }

/* prose pages & forms */
.page-head { padding: clamp(56px, 8vw, 112px) 0 24px; }
.page-head h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); margin-bottom: 20px; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.7rem; margin: 44px 0 12px; letter-spacing: -0.02em; }
.prose p { color: var(--ink-2); margin-bottom: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field textarea { font: inherit; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); min-height: 50px; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field textarea { min-height: 130px; resize: vertical; }
.field small { color: var(--muted); }
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.steps-list b { display: block; font-size: 1.1rem; letter-spacing: -0.01em; }
.steps-list span { color: var(--muted); }

@media (max-width: 980px) {
  .hero-grid, .row, .two { grid-template-columns: 1fr; min-height: 0; }
  .row.flip .row-copy { order: 0; }
  .stage3d { max-height: 520px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .links { position: absolute; top: var(--nav-h); left: 0; right: 0; flex: none; flex-direction: column; align-items: stretch; gap: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(20px); padding: 8px 24px 24px; display: none; height: calc(100dvh - var(--nav-h)); overflow: auto; }
  .links.open { display: flex; }
  .links a { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, .08); }
  .burger { display: grid; }
  .nav-signin { display: none; }
}
@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; }
  .wrap { width: min(var(--wrap), 100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
