@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); }

:root {
  --bg: #ffffff;
  --fg: #0b0b0b;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --gutter: clamp(16px, 4vw, 48px);
  --ts: 1; /* text scale: multiplies the vw part of fluid sizes */
  color-scheme: light;
}

/* Theme: "system" (no data-theme) follows the OS; data-theme forces light or dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0b;
    --fg: #f2f2f2;
    --muted: #9a9a9a;
    --line: #262626;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0b;
  --fg: #f2f2f2;
  --muted: #9a9a9a;
  --line: #262626;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header { position: relative; z-index: 50; background: var(--bg); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
.wordmark { font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; }
.site-menu { display: flex; align-items: center; gap: 28px; }
.site-nav { display: flex; gap: clamp(14px, 3vw, 32px); font-size: 0.9375rem; }
.site-menu:focus { outline: none; }
.display-controls { display: flex; align-items: center; gap: 8px; padding-left: 24px; border-left: 1px solid var(--line); }

/* Menu button (mobile only): two bars of different length that cross into an X. */
.menu-toggle {
  appearance: none;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.menu-toggle-bar { display: block; width: 24px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, width .25s ease; }
.menu-toggle-bar:last-child { width: 14px; }
.menu-toggle:hover .menu-toggle-bar:last-child { width: 24px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:last-child { width: 24px; transform: translateY(-4px) rotate(-45deg); }
.menu-toggle:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 720px) {
  .site-header { position: sticky; top: 0; }
  .js .menu-toggle { display: inline-flex; }
  .js .site-menu {
    position: fixed;
    inset: 72px 0 0 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 40px;
    padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--bg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .js .site-header[data-menu-open] .site-menu { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease; }
  .js .site-nav { flex-direction: column; gap: 0; font-size: clamp(2rem, calc(9vw * var(--ts)), 2.75rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
  .js .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .js .display-controls { justify-content: space-between; padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  /* Without JS the menu stays inline and may wrap under the wordmark. */
  html:not(.js) .site-header .wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
  html:not(.js) .site-menu { flex-wrap: wrap; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle-bar, .js .site-menu { transition: none !important; }
}

/* Hero */
.hero { padding: clamp(80px, 16vw, 200px) 0 clamp(64px, 12vw, 160px); }
.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-weight: 500;
  font-size: clamp(2.5rem, calc(8.4vw * var(--ts)), 7rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

/* Products */
.section-label {
  margin: 0 0 24px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
.products { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.products li { border-bottom: 1px solid var(--line); }
.products a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 9rem;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
}
.products a:hover, .products a:focus-visible { text-decoration: none; }
.products a:hover .name, .products a:focus-visible .name { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 2px; }
.products .name { font-size: clamp(1.75rem, calc(4.4vw * var(--ts)), 3.5rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; }
.products .desc { color: var(--muted); font-size: 1.0625rem; }
.products .domain { color: var(--muted); font-size: 0.9375rem; white-space: nowrap; text-align: right; }

@media (max-width: 720px) {
  .products a { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .products .domain { text-align: left; }
}

/* Contact */
.contact { padding: clamp(80px, 12vw, 160px) 0; }
.contact p { margin: 0; font-size: clamp(1.5rem, calc(3.6vw * var(--ts)), 2.75rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; }
.contact a { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 2px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 40px;
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer nav { display: flex; gap: 24px; }

/* Legal page */
.legal { padding: clamp(48px, 8vw, 96px) 0 clamp(64px, 10vw, 120px); max-width: 720px; }
.legal h1 { margin: 0 0 40px; font-size: clamp(2.25rem, calc(5vw * var(--ts)), 3.5rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1.05; }
.legal h2 { margin: 48px 0 12px; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.legal p, .legal li { color: var(--fg); }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
@media (max-width: 560px) {
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 10px; }
}
.legal a { text-decoration: underline; text-underline-offset: 0.15em; }

/* Larger text (accessibility). Every font size is in rem, so 125% on the root
   scales them all; --ts scales the vw part of the fluid headings too. */
:root[data-text="large"] { font-size: 125%; --ts: 1.25; }

/* Theme switcher (footer) */
.theme-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.theme-switch button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}
.theme-switch button:hover, .text-toggle:hover { color: var(--fg); }
.text-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.text-toggle[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.text-toggle:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.text-toggle .icon { display: block; }
.theme-switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.theme-switch .icon { display: block; }
.theme-switch button:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

/* In-page anchors land below the sticky mobile header. */
section[id], h2[id] { scroll-margin-top: 88px; }
