/* Counterfactual — sameatoms.com
   One stylesheet for the whole site. No build step, no third-party requests. */

@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/literata.woff2") format("woff2");
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/literata-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
}

:root {
  --paper: #f1f2ee;
  --paper-2: #e3e5df;
  --ink: #1c2430;
  --ink-2: #4a5261;
  --blue: #2038c8;
  --blue-deep: #16289a;
  --blue-paper: #dfe4fb;

  --serif: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* type scale, ratio ≈ 1.27 */
  --t-1: 1.0625rem;  /* 17 */
  --t-2: 1.3125rem;  /* 21 */
  --t-3: 1.625rem;   /* 26 */
  --t-4: 2.0625rem;  /* 33 */
  --t-5: 2.625rem;   /* 42 */
  --t-6: 3.375rem;   /* 54 */
  --t-7: 4.25rem;    /* 68 */

  --measure: 34em;
  --gutter: 1.5rem;
  --max: 70rem;
}

@media (min-width: 48em) {
  :root { --gutter: 3rem; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-size: var(--t-1);
  line-height: 1.6;
  font-optical-sizing: auto;
}

h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
p { margin: 0; }
p + p { margin-top: 1em; }

a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
a:hover { color: var(--blue-deep); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

img, svg { display: block; max-width: 100%; height: auto; }

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

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

.site-header {
  padding-block: 1.25rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand svg { width: 1.6rem; height: 1.6rem; }
.brand:hover { color: var(--blue); }

.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  border-bottom-color: currentColor;
}
.site-nav a[aria-current="page"] { color: var(--blue); }

.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  font: inherit;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}
@media (max-width: 40em) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 4.25rem;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--paper-2);
    border-bottom: 1px solid var(--paper-2);
    padding: 0.5rem var(--gutter);
    z-index: 10;
  }
  .site-nav a { padding-block: 0.75rem; border-bottom: 0; }
  .site-header.is-open .site-nav { display: flex; }
  .site-header { position: relative; }
}

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

.hero {
  padding-block: clamp(3rem, 10vw, 7.5rem) clamp(3rem, 8vw, 6rem);
}
.hero h1 {
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.375rem, 6.4vw, var(--t-7));
  max-width: 17ch;
  letter-spacing: -0.02em;
}
.hero .lede {
  margin-top: 1.75rem;
  font-size: clamp(var(--t-1), 1.8vw, var(--t-2));
  max-width: var(--measure);
  color: var(--ink-2);
}
.hero .lede a { color: var(--ink); }

/* ---------- sections ---------- */

.section { padding-block: clamp(3rem, 8vw, 6rem); }
.section-head { max-width: var(--measure); }
.section-head h2 { font-size: clamp(var(--t-4), 4vw, var(--t-5)); }
.section-head p { margin-top: 1rem; color: var(--ink-2); font-size: var(--t-2); }

/* ---------- product rows ---------- */

.products { margin-top: clamp(2rem, 5vw, 4rem); }
.product {
  display: grid;
  gap: 1.5rem 3rem;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--paper-2);
}
.product:last-child { border-bottom: 1px solid var(--paper-2); }
@media (min-width: 52em) {
  .product { grid-template-columns: 5fr 7fr; align-items: start; }
}
.product figure { margin: 0; }
@media (max-width: 52em) {
  .product figure { max-width: 20rem; }
}
.product figure svg {
  width: 100%;
  aspect-ratio: 4 / 3;
  color: var(--ink);
}
.product h3 {
  font-size: clamp(var(--t-3), 3vw, var(--t-4));
}
.product h3 a { color: inherit; text-decoration: none; }
.product h3 a:hover { color: var(--blue); }
.product .tag {
  margin-top: 0.5rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.product .desc { margin-top: 1.25rem; max-width: var(--measure); }
.product .more {
  margin-top: 1.25rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

/* ---------- principles ---------- */

.principles {
  display: grid;
  gap: 2rem 3rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}
@media (min-width: 52em) {
  .principles { grid-template-columns: repeat(3, 1fr); }
}
.principles h3 { font-size: var(--t-2); }
.principles p { margin-top: 0.75rem; color: var(--ink-2); }

/* ---------- company block ---------- */

.company {
  background: var(--blue);
  color: var(--paper);
  padding-block: clamp(3rem, 8vw, 6rem);
}
.company .wrap {
  display: grid;
  gap: 2rem 3rem;
}
@media (min-width: 52em) {
  .company .wrap { grid-template-columns: 5fr 7fr; }
}
.company h2 { font-size: clamp(var(--t-4), 4vw, var(--t-5)); }
.company p { max-width: var(--measure); }
.company .body { font-size: var(--t-2); }
.company a { color: inherit; }
.company dl {
  margin: 2rem 0 0;
  font-family: var(--sans);
  font-size: 0.9375rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.5rem;
}
.company dt { opacity: 0.75; }
.company dd { margin: 0; }

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

.site-footer {
  padding-block: 2.5rem 3rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-2);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--blue); }

/* ---------- inner pages (about, support, legal) ---------- */

.page { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem); }
.page-head { max-width: 40em; }
.page-head h1 { font-size: clamp(var(--t-5), 5.5vw, var(--t-6)); }
.page-head .lede { margin-top: 1.25rem; font-size: var(--t-2); color: var(--ink-2); }
.page-head .meta { margin-top: 1rem; font-family: var(--sans); font-size: 0.9375rem; color: var(--ink-2); }

.prose { max-width: var(--measure); margin-top: clamp(2rem, 5vw, 3.5rem); }
.prose h2 {
  font-size: var(--t-3);
  margin-top: 2.75rem;
}
.prose h3 { font-size: var(--t-2); margin-top: 2rem; }
.prose h2 + p, .prose h3 + p, .prose h2 + ul, .prose h3 + ul { margin-top: 0.75rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0.75rem 0 0; }
.prose ol + p, .prose ul + p, .prose dl + p, .prose table + p { margin-top: 1.25rem; }
.prose li + li { margin-top: 0.4rem; }
.prose dl { margin: 0.75rem 0 0; }
.prose dt { font-weight: 500; margin-top: 1rem; }
.prose dd { margin: 0.2rem 0 0; color: var(--ink-2); }
.prose .note {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-2);
  border-left: 2px solid var(--blue);
  padding-left: 1rem;
  margin-top: 1.5rem;
}
.prose table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
}
.prose th, .prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid var(--paper-2);
}
.prose th { font-weight: 500; color: var(--ink-2); white-space: nowrap; padding-right: 1.5rem; }

/* product detail page */

.product-hero {
  display: grid;
  gap: 2rem 3rem;
  align-items: center;
}
@media (min-width: 52em) {
  .product-hero { grid-template-columns: 6fr 6fr; }
}
.product-hero figure { margin: 0; }
.product-hero figure svg { width: 100%; aspect-ratio: 4 / 3; color: var(--ink); }
.product-hero figure img { width: 100%; }
.product-hero figcaption {
  margin-top: 0.75rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--ink-2);
}
.shots-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 34rem;
  margin-inline: auto;
}
.shots-2 img {
  width: 100%;
  border-radius: 1.25rem;
  border: 1px solid var(--paper-2);
}

.button {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--paper);
  background: var(--blue);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
}
.button:hover { background: var(--blue-deep); color: var(--paper); }
.button.secondary {
  color: var(--ink);
  background: none;
  border: 1px solid var(--ink);
}
.button.secondary:hover { color: var(--blue); border-color: var(--blue); background: none; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  align-items: center;
}

.facts {
  display: grid;
  gap: 1.5rem 3rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}
@media (min-width: 52em) {
  .facts { grid-template-columns: repeat(3, 1fr); }
}
.facts h3 { font-size: var(--t-2); }
.facts p { margin-top: 0.5rem; color: var(--ink-2); }

.crumb {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-2);
  margin-bottom: 1.5rem;
}
.crumb a { color: inherit; }

/* ---------- utilities ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
