/* Haldir brand page. Values follow haldir.si (haldir-website src/styles/tokens.css): oatmeal surface, umber text,
   ivy green, Gelasio headings, Figtree body. Fonts are self-hosted; the CSP in _headers allows nothing external. */
@font-face {
  font-family: "Gelasio";
  src: url("/fonts/gelasio.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --surface: #faf8f5;
  --card: #ffffff;
  --tint: #ece7de;
  --line: #d7cec6;
  --text: #2b2723;
  --muted: #6f6055;
  --ivy: #5c6f2d;
  --ivy-hover: #3c481d;
  --on-ivy: #f6ffde;
  --link: #3f7a12;
  --ink: #0b0b0c;
  --dark: #1e1c1b;
  --serif: "Gelasio", Georgia, serif;
  --sans: "Figtree", Arial, sans-serif;
  --gutter: 16px;
  --max: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

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

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ivy-hover);
}

:focus-visible {
  outline: 2px solid var(--ivy);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}

.bar,
main,
.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.bar-link {
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
}

.hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: clamp(40px, 7vw, 72px);
}

.lead {
  max-width: 612px;
  margin: 20px 0 32px;
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.45;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 4px;
  background: var(--ivy);
  color: var(--on-ivy);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

.button:hover {
  background: var(--ivy-hover);
  color: var(--on-ivy);
}

.button span {
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.block {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.block:last-child {
  border-bottom: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 20px;
}

h3 {
  font-size: 20px;
}

.reading {
  max-width: 612px;
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}

.hint {
  max-width: 612px;
  margin: -4px 0 28px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.grid + .grid {
  margin-top: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.card h3 {
  margin: 20px 8px 6px;
}

.card > p {
  margin: 0 8px;
  color: var(--muted);
  font-size: 15px;
}

.preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 168px;
  border-radius: 4px;
}

.preview img {
  width: 60%;
  max-width: 240px;
}

.preview .mark {
  width: 38px;
}

.preview .word {
  width: 55%;
  max-width: 200px;
}

.preview.icons img {
  width: 64px;
}

.light {
  background: var(--surface);
}

.dark {
  background: var(--dark);
}

.green {
  background: var(--ivy);
}

.card .dl {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: auto;
  padding-top: 16px;
}

.dl a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  font-weight: 500;
}

.swatches {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.swatch h3 {
  margin: 14px 0 4px;
}

.swatch p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.chip {
  display: block;
  height: 96px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.chip.ink {
  background: #0b0b0c;
}

.chip.paper {
  background: #ffffff;
}

.chip.ivy {
  background: #5c6f2d;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  color: var(--text);
}

.rules {
  max-width: 720px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.55;
}

.rules li:first-child {
  border-top: 0;
  padding-top: 0;
}

.foot {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 40px;
  /* The rule spans the content, not the gutters. */
  background: linear-gradient(var(--line), var(--line)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat;
  color: var(--muted);
  font-size: 14px;
}

.foot a {
  color: var(--muted);
}

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }

  .grid.two {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Three marks side by side from tablet up, so none is left alone on a row. */
  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }

  .swatches {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  :root {
    --gutter: 60px;
  }

  .hero {
    padding: 96px 0 72px;
  }

  .block {
    padding: 72px 0;
  }

  .grid {
    gap: 20px;
  }

  .grid + .grid {
    margin-top: 20px;
  }
}
