/* Hardel — site styles. Tokens, base, layout, components. No JavaScript anywhere on the site. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

:root {
  color-scheme: dark;

  --bg: #0D0C0A;          /* exact plate colour of the brand assets */
  --surface: #151311;
  --rule: #2B2722;
  --rule-strong: #6B6259; /* 3:1 on both grounds, for enabled button borders */
  --text: #E8E1D5;
  --text-2: #A39B8F;
  --gold: #B8873A;        /* exact brand amber */
  --gold-hover: #CDA05A;
  --ink-on-gold: #0D0C0A;
  --cream: #F2EDDD;       /* Mise tile only */

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step--1: 0.9rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.5rem + 1.75vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: clamp(4rem, 3rem + 4vw, 6.5rem);

  --wrap: 1100px;
  --measure: 66ch;
  --radius: 12px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0) / 1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column; /* footer sits at the bottom on short pages */
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
h1, h2 { font-family: var(--font-serif); font-weight: 400; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); margin-bottom: var(--space-4); }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0 0 var(--space-2); max-width: var(--measure); }
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--gold-hover); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--gold); color: var(--ink-on-gold); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: absolute; top: -100%; left: var(--space-2); z-index: 10;
  padding: 0.5rem 0.75rem; border-radius: 6px;
  background: var(--gold); color: var(--ink-on-gold); text-decoration: none;
}
.skip:focus { top: var(--space-2); }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-4); padding-block: var(--space-3);
}
.brand { display: inline-block; }
.brand img { height: 30px; width: auto; }
nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); font-size: var(--step--1); }
nav a { color: var(--text-2); text-decoration: none; }
nav a:hover { color: var(--gold-hover); }

.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap { padding-block: var(--space-5); }
.footer-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-3) var(--space-4); margin-bottom: var(--space-4);
}
.site-footer .brand img { height: 22px; }
.legal { font-size: var(--step--1); color: var(--text-2); margin: 0; max-width: none; }
.legal + .legal { margin-top: var(--space-1); }

/* Sections */
.hero .wrap { padding-block: clamp(4.5rem, 3rem + 6vw, 8.5rem) var(--space-6); }
.lede { font-size: var(--step-1); color: var(--text-2); margin-block: var(--space-3) var(--space-4); }
.section { border-top: 1px solid var(--rule); }
.section .wrap { padding-block: var(--space-6); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.btn {
  display: inline-flex; align-items: center;
  padding: 0.6em 1.1em; border: 1px solid var(--rule-strong); border-radius: 8px;
  font-weight: 500; text-decoration: none; color: var(--text);
}
.btn:hover { border-color: var(--gold); color: var(--text); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink-on-gold); }
.btn-primary:hover { background: var(--gold-hover); border-color: var(--gold-hover); color: var(--ink-on-gold); }
.btn[aria-disabled="true"] { color: var(--text-2); border-color: var(--rule); cursor: not-allowed; }
.btn[aria-disabled="true"]:hover { border-color: var(--rule); }

/* Products */
.cards { display: grid; grid-template-columns: 1fr; gap: var(--space-3); }
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4); border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--surface);
}
.card p { margin: 0; }
.card .actions { margin-top: auto; padding-top: var(--space-2); }
.product-head { display: flex; align-items: flex-start; gap: var(--space-2); }
.name-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.tile { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 10px; background: var(--cream); }
.tile img { width: 30px; height: auto; }
.tagline { color: var(--text-2); }
.pill {
  padding: 0.25em 0.7em;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: 0.8rem; letter-spacing: 0.02em; white-space: nowrap; color: var(--text-2);
}

/* Founder */
.founder { display: grid; grid-template-columns: 1fr; gap: var(--space-4); align-items: start; }
.avatar { width: 112px; height: 112px; border-radius: 50%; border: 1px solid var(--rule); object-fit: cover; }
.avatar-initials {
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 2rem; color: var(--text-2); background: var(--surface);
}
.role { color: var(--text-2); }

/* Contact */
.email { margin-block: var(--space-3); }
.email a { font-size: var(--step-2); }
.small { font-size: var(--step--1); color: var(--text-2); }

@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .founder { grid-template-columns: 112px 1fr; }
}

/* Motion: one fade-up on section headings, CSS only, and hover transitions. Off under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, .btn, .card { transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease; }
  @supports (animation-timeline: view()) {
    .section h2 { animation: fade-up linear both; animation-timeline: view(); animation-range: entry 0% entry 35%; }
  }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media print {
  .section h2 { animation: none; }
}

/* Inner pages: privacy, terms, support, 404 */
.page .wrap { padding-block: var(--space-5) var(--space-6); }
.page h1 { font-size: var(--step-3); margin-bottom: var(--space-2); }
.page h2 { font-size: var(--step-2); margin: var(--space-5) 0 var(--space-2); }
.page ul, .page ol { max-width: var(--measure); margin: 0 0 var(--space-2); padding-left: 1.25em; }
.page li { margin-bottom: var(--space-1); }
.meta { font-size: var(--step--1); color: var(--text-2); margin-bottom: var(--space-4); }
.toc {
  max-width: var(--measure); margin: var(--space-4) 0 var(--space-2); padding: var(--space-3);
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface);
}
.toc ol { margin: 0; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--gold-hover); }
[id] { scroll-margin-top: var(--space-4); }
@media (min-width: 720px) {
  .toc ol { columns: 2; column-gap: var(--space-4); }
  .toc li { break-inside: avoid; }
}
