/* friddigital.com
 *
 * Plain CSS on top of the Frid Digital brand kit 1.1. tokens.css, fonts/ and
 * logo/ are COPIES from the frid-digital-brand repo and must not be edited
 * here — change them there, rebuild, and copy the outputs back.
 *
 * Mobile first: everything outside a media query is the phone layout, and the
 * queries only add space and columns. Light and dark both come from the
 * tokens, following the visitor's system setting.
 *
 * The logo is used as supplied artwork, never retyped. Its colours are fixed
 * (charcoal/ivory + copper), so each mark ships in a light and a dark file and
 * is swapped by theme below, mirroring tokens.css's own theme logic.
 *
 * Kit minimums that constrain this file: horizontal lockup 200px wide,
 * standalone symbol 24px high. That is why the header falls back to the
 * monogram on narrow screens rather than shrinking the lockup.
 */

* { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- layout ------------------------------------------------------------ */

.wrap {
  width: 100%;
  max-width: var(--measure-page);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

@media (min-width: 720px) {
  .wrap { padding-inline: var(--space-7); }
}

.prose { max-width: var(--measure-prose); }

section.band {
  padding-block: var(--space-7);
  border-top: 1px solid var(--rule);
}

@media (min-width: 720px) {
  section.band { padding-block: var(--space-8); }
}

/* ---- type -------------------------------------------------------------- */

h1 {
  font-size: clamp(38px, 7.5vw, 56px);
  line-height: 1.0;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-5);
  text-wrap: balance;
}

h2 {
  font-size: clamp(27px, 4.5vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 var(--space-5);
  text-wrap: balance;
}

h3 {
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 var(--space-3);
  color: var(--ink);
}

p { margin: 0 0 var(--space-4); color: var(--ink-muted); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.55;
  color: var(--ink);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 var(--space-4);
}

ul { margin: 0 0 var(--space-4); padding-left: var(--space-5); color: var(--ink-muted); }
li { margin-bottom: var(--space-2); }
strong { color: var(--ink); font-weight: 700; }

a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.small { font-size: 14px; line-height: 1.5; color: var(--ink-faint); }

/* ---- the logo ---------------------------------------------------------- */

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; width: auto; }

/* Monogram below 560px, lockup above: the kit's 200px lockup minimum is wider
   than a phone header can carry beside navigation. */
.brand .lockup { height: 40px; }      /* 611:120 -> ~204px wide, at the minimum */
.brand .mono   { height: 32px; }      /* symbol minimum is 24px */

.brand .lockup { display: none; }
.brand .mono { display: block; }

@media (min-width: 560px) {
  .brand .lockup { display: block; }
  .brand .mono { display: none; }
}

/* Fixed-colour artwork: swap the file, never recolour it. Mirrors the theme
   logic in tokens.css so the two can never disagree. */
.brand .dark { display: none !important; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .light { display: none !important; }
  :root:not([data-theme="light"]) .brand .lockup.dark { display: none !important; }
  :root:not([data-theme="light"]) .brand .mono.dark { display: block !important; }
  @media (min-width: 560px) {
    :root:not([data-theme="light"]) .brand .lockup.dark { display: block !important; }
    :root:not([data-theme="light"]) .brand .mono.dark { display: none !important; }
  }
}

:root[data-theme="dark"] .brand .light { display: none !important; }
:root[data-theme="dark"] .brand .mono.dark { display: block !important; }

@media (min-width: 560px) {
  :root[data-theme="dark"] .brand .lockup.dark { display: block !important; }
  :root[data-theme="dark"] .brand .mono.dark { display: none !important; }
}

/* ---- header ------------------------------------------------------------ */

header.site {
  border-bottom: 1px solid var(--rule);
  padding-block: var(--space-4);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

nav.top { display: flex; gap: var(--space-5); font-size: 15px; flex-wrap: wrap; }
nav.top a { color: var(--ink-muted); text-decoration: none; }
nav.top a:hover,
nav.top a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* ---- hero -------------------------------------------------------------- */

.hero { padding-block: var(--space-8) var(--space-7); }

@media (min-width: 960px) {
  .hero { padding-block: calc(var(--space-8) * 1.5) var(--space-8); }
}

.hero .lede { max-width: 56ch; }

/* ---- services ---------------------------------------------------------- */

.services { display: grid; gap: var(--space-5); margin-top: var(--space-6); }

@media (min-width: 720px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .services { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); } }

.service { border-top: 2px solid var(--rule-strong); padding-top: var(--space-4); }
.service h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: var(--space-3); }
.service p { font-size: 16px; }

/* ---- product gallery --------------------------------------------------- */

.gallery {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.product {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  height: 100%;
  padding: var(--space-5);
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
}

.product:hover { border-color: var(--accent); }
.product:hover .product-name { color: var(--accent-ink); }

/* The app icon slots in here as an <img> first child once one exists. Nothing
   stands in for it meanwhile: a grey square would be a placeholder, and this
   site ships none. Product icons belong to the product's own identity, so they
   come from the app, not from the Frid Digital brand kit. */
.product img {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.product-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.product-meta { font-size: 14px; color: var(--ink-faint); }

/* ---- buttons ----------------------------------------------------------- */

.btn {
  display: inline-block;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary { background: var(--ink); color: var(--surface); }
.btn.primary:hover { background: var(--accent-ink); color: var(--surface-raised); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.secondary:hover { border-color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }

/* ---- notice ------------------------------------------------------------ */

.notice {
  background: var(--surface-raised);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
  max-width: var(--measure-prose);
}

.notice p:last-child { margin-bottom: 0; }

/* ---- policy documents -------------------------------------------------- */

.doc h2 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: var(--space-7) 0 var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
}

.doc h2:first-of-type { margin-top: var(--space-6); }
.updated { font-size: 14px; color: var(--ink-faint); margin-bottom: var(--space-6); }

/* ---- footer ------------------------------------------------------------ */

footer.site {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-7) var(--space-8);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-faint);
}

footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  font-size: 15px;
}

footer.site nav a { color: var(--ink-muted); text-decoration: none; }
footer.site nav a:hover { color: var(--ink); text-decoration: underline; }

.legal { display: grid; gap: var(--space-2); }

@media (min-width: 720px) {
  .legal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2) var(--space-6);
    max-width: 720px;
  }
}

.legal a { color: var(--ink-faint); }
.legal strong { color: var(--ink-muted); }

/* ---- skip link --------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--surface);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--radius-md) 0;
  z-index: 10;
  text-decoration: none;
}

.skip:focus { left: 0; }
