/* TenKeyLabs
   Dark by default. Light when [data-theme="light"] is set, or when the OS
   prefers light and nothing has been chosen. Only the tokens change. */

:root {
  --bg: #151413;
  --bg-2: #1b1a18;
  --bg-3: #242220;
  --text: #ebe7df;
  --muted: #a39d92;
  --border: rgba(235, 231, 223, 0.12);
  --border-2: rgba(235, 231, 223, 0.24);
  --accent: #8fb3ff;
  --glow: rgba(143, 179, 255, 0.22);
  --btn-bg: #ebe7df;
  --btn-fg: #151413;
  --error: #f0857f;
  --ok: #8fd19b;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 4px;
  --wrap: 1080px;
  --header-h: 60px;
}

[data-theme="light"] {
  --bg: #f8f6f1;
  --bg-2: #f0ede6;
  --bg-3: #e7e3da;
  --text: #1d1c1a;
  --muted: #66625a;
  --border: rgba(29, 28, 26, 0.12);
  --border-2: rgba(29, 28, 26, 0.28);
  --accent: #2455c4;
  --glow: rgba(36, 85, 196, 0.16);
  --btn-bg: #1d1c1a;
  --btn-fg: #f8f6f1;
  --error: #b93a34;
  --ok: #2f7a3e;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f8f6f1;
    --bg-2: #f0ede6;
    --bg-3: #e7e3da;
    --text: #1d1c1a;
    --muted: #66625a;
    --border: rgba(29, 28, 26, 0.12);
    --border-2: rgba(29, 28, 26, 0.28);
    --accent: #2455c4;
    --glow: rgba(36, 85, 196, 0.16);
    --btn-bg: #1d1c1a;
    --btn-fg: #f8f6f1;
    --error: #b93a34;
    --ok: #2f7a3e;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 400; line-height: 1.1; letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(64px, 8vw, 112px); }
.section--line { border-top: 1px solid var(--border); }
.section--tint { background: var(--bg-2); border-top: 1px solid var(--border); }

/* Two-column section: heading on the left, content on the right. */
.split { display: grid; gap: 32px; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 2fr; gap: 64px; } }
.split > * { min-width: 0; }
.split__head p { margin-top: 12px; color: var(--muted); max-width: 36ch; }

.eyebrow { font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  padding: 8px 12px; background: var(--btn-bg); color: var(--btn-fg);
}
.skip:focus { left: 8px; }

/* Icon strokes, shared */
.icon-btn svg, .btn svg {
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- links & buttons ---------- */
.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-2); text-underline-offset: 4px; }
.link:hover { text-decoration-color: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border-radius: var(--r); border: 1px solid transparent;
  font-size: 0.9375rem; font-weight: 500; line-height: 1;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn svg { width: 15px; height: 15px; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { opacity: 0.85; }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--border); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.logo { font-family: var(--serif); font-size: 1.375rem; letter-spacing: -0.01em; }

.header__right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 0; background: transparent; cursor: pointer; color: var(--muted);
  transition: color 0.15s;
}
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
/* theme toggle shows the icon of the mode it switches TO */
.i-moon { display: none; }
[data-theme="light"] .i-moon { display: block; }
[data-theme="light"] .i-sun { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .i-moon { display: block; }
  :root:not([data-theme="dark"]) .i-sun { display: none; }
}
.i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-menu { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: block; }

.nav {
  position: absolute; top: 100%; left: 0; right: 0;
  display: none; flex-direction: column;
  padding: 8px 24px 16px;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.nav.is-open { display: flex; }
.nav a { padding: 10px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 1rem; }
.nav a:first-child { border-top: 0; }
.nav a:hover { color: var(--text); }

@media (min-width: 768px) {
  .nav { position: static; display: flex; flex-direction: row; align-items: center; gap: 28px; padding: 0; background: none; border: 0; }
  .nav a { padding: 0; border: 0; font-size: 0.9375rem; }
  .menu-btn { display: none; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(72px, 11vw, 144px) 0 clamp(56px, 8vw, 96px); }
.hero h1 {
  margin-top: 20px;
  font-size: clamp(2.75rem, 1.6rem + 5.2vw, 5.25rem);
  letter-spacing: -0.02em;
  line-height: 1.02;
  max-width: 18ch;
}
.hero__sub { margin-top: 28px; max-width: 52ch; font-size: 1.1875rem; line-height: 1.55; color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 36px; }
.hero__note { margin-top: clamp(48px, 7vw, 88px); padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.9375rem; color: var(--muted); max-width: 60ch; }

/* ---------- principles ---------- */
.principles { border-top: 1px solid var(--border); }
.principles li { display: grid; grid-template-columns: 3rem 1fr; gap: 8px 16px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.principles__n { font-family: var(--serif); font-size: 1.125rem; color: var(--muted); padding-top: 4px; }
.principles h3 { font-size: 1.375rem; }
.principles p { grid-column: 2; color: var(--muted); max-width: 56ch; }

/* ---------- products ---------- */
.product { display: grid; gap: 32px; align-items: center; padding: clamp(32px, 5vw, 56px) 0; border-top: 1px solid var(--border); }
.product:last-child { border-bottom: 1px solid var(--border); }
@media (min-width: 860px) { .product { grid-template-columns: 1.15fr 0.85fr; gap: 64px; } }
.product--soon { grid-template-columns: 1fr; }
.product--soon .product__text { max-width: 60ch; }
.product__text { min-width: 0; }
.product__brand { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.product__title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.product__logo { width: 40px; height: 40px; object-fit: contain; flex: none; }
.product h3 { font-size: 2rem; }
.product__status { font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.product__tagline { margin-top: 12px; font-family: var(--serif); font-style: italic; font-size: 1.25rem; }
.product__text > p:not(.product__tagline) { margin-top: 14px; color: var(--muted); max-width: 58ch; }
.product__text a:not(.btn) { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-2); text-underline-offset: 4px; }
.product__text a:not(.btn):hover { text-decoration-color: currentColor; }
.product__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; margin-top: 20px; font-size: 0.9375rem; }
.product__list li { display: flex; align-items: baseline; gap: 10px; }
.product__list li::before { content: "—"; color: var(--muted); flex: none; }
.product .btn { margin-top: 28px; }

.product__visual { display: flex; justify-content: center; }
.shot { display: block; width: 100%; max-width: 240px; height: auto; border: 1px solid var(--border-2); border-radius: 22px; }

/* ---------- contact ---------- */
.contact__mail { margin-top: 20px; font-size: 0.9375rem; color: var(--muted); }

.form { display: grid; gap: 24px; }
.form__grid { display: grid; gap: 24px; }
@media (min-width: 560px) { .form__grid { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; align-content: start; position: relative; }
.field label { font-size: 0.875rem; color: var(--muted); }
.field input, .field textarea {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--border-2); border-radius: var(--r);
  background: transparent; transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__err { position: absolute; top: 100%; left: 0; margin-top: 4px; font-size: 0.8125rem; line-height: 1.2; color: var(--error); }
.field__err:empty { display: none; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.form__status { font-size: 0.875rem; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-error { color: var(--error); }

/* ---------- footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 48px 0 40px; font-size: 0.875rem; color: var(--muted); }
.footer__in { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer__in { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; } }
.footer .logo { color: var(--text); }
.footer__tag { margin-top: 10px; }
.footer__nav { display: grid; gap: 8px; align-content: start; }
.footer__nav a:hover, .footer__legal a:hover { color: var(--text); }
.footer__legal p + p { margin-top: 6px; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
