/* Foodienita's site (ADR-0001, obradoiro ADR-0028). Above the marker: this site's colours, a few
   sizes and its own elements. Below it: the house base, the same on every site, held to the
   template by the audit's `site` check. The map's own styles are in /map/map.css. */

:root {
  --paper: #fbf3f1;     /* the background: a cream with a blush of pink */
  --ink: #3a1c24;       /* text and rules: a dark plum brown */
  --ink-soft: #7d4554;  /* secondary text, 6.7:1 on the paper */
  --accent: #a8335a;    /* link underlines, focus, the giant name: a wine pink, 5.8:1 */

  --mark: 26px;                               /* the mark in the header */
  --t-display: clamp(2.9rem, 9vw, 9.5rem);    /* the headline */
  --h1-width: 11ch;                           /* where the headline wraps */
  --giant-em: 5.12;                           /* "foodienita"'s width in em */
  --button: var(--accent);
  --button-ink: #fff8f6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1215;
    --ink: #f8e9ec;
    --ink-soft: #dcb3be;
    --accent: #f08aa8;
    --button-ink: #1c1215;
  }
}

/* The four lines every post has, as in the caption. */
.item .icon {
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: -0.12em;
  color: var(--accent);
}

/* A strip of covers under the hero: the latest posts, drawn from the map's photos by hand. */
.covers {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.covers a {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, var(--paper));
}

.covers img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 48rem) {
  .covers {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* --- From obradoiro standard/templates/site/styles.css: edit the lines above, not below. --- */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-variable.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --gutter: clamp(16px, 4vw, 48px);
  --gap: clamp(12px, 2vw, 24px);
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --row: clamp(1.25rem, 2.4vw, 1.9rem);

  /* A scale of about 1.25 from an 18 px body. */
  --t-body: 1.125rem;
  --t-lead: clamp(1.25rem, 1.9vw, 1.6rem);
  --t-item: clamp(1.4rem, 2.3vw, 1.95rem);
  --t-section: clamp(1.9rem, 3.6vw, 3rem);
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
dl,
dd,
ol {
  margin: 0;
}

/* Lists are rows on the grid, not indented text: no indent and no markers unless a site sets them. */
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 3px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Layout: 12 columns; every two-sided row splits at column 6, the same line all down the page. */

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding-inline: var(--gutter);
}

.left,
.right,
.full {
  grid-column: 1 / -1;
}

/* Header: the mark and the name, an optional motto in the middle, and one link at the end: on a
   page in two languages, the other one (.lang, ADR-0045); the action lives in the hero. */

.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: var(--gap);
  padding: 20px var(--gutter);
}

.brand {
  display: flex;
  grid-column: 1;
  justify-self: start;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
}

.brand svg,
.brand img {
  flex: none;
  width: var(--mark);
  height: var(--mark);
  margin-left: calc(var(--mark) * -0.18); /* the mark's own margin, so it lines up with the headline */
}

.motto {
  grid-column: 2;
  color: var(--ink-soft);
  text-align: center;
}

.top .out {
  grid-column: 3;
  justify-self: end;
}

/* The other language: a globe and its code, quiet until pointed at. */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-decoration: none;
}

.lang:hover {
  color: var(--ink);
}

.lang svg {
  width: 1.15em;
  height: 1.15em;
}

/* Hero: the statement, and what it means right under it. */

.hero {
  padding-top: var(--section);
}

h1 {
  grid-column: 1 / -1;
  max-width: var(--h1-width);
  margin-left: -0.055em; /* the display size's side bearing */
  font-size: var(--t-display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.lead {
  grid-column: 1 / -1;
  max-width: 33em;
  margin-top: clamp(1.75rem, 4vw, 3rem);
  font-size: var(--t-lead);
  line-height: 1.42;
  letter-spacing: -0.012em;
}

.lead + .lead {
  margin-top: 0.9em;
  color: var(--ink-soft);
}

/* Sections: a title, then rows that fill both sides of the line. */

.section {
  padding-top: var(--section);
}

h2 {
  grid-column: 1 / -1;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
  font-size: var(--t-section);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
}

.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 0.45rem;
  padding-block: var(--row);
  border-top: 1.5px solid var(--ink);
}

.row:last-child {
  border-bottom: 1.5px solid var(--ink);
}

.item {
  font-size: var(--t-item);
  font-weight: 600;
  font-style: normal;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.text {
  max-width: 34em;
  color: var(--ink-soft);
}

/* The action: one link that reads as a button, a row of them, and the fine print under them. */

.get {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(1.75rem, 4vw, 3rem);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.8em 1.35em;
  border: 1.5px solid var(--button, var(--ink));
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button.primary {
  background: var(--button, var(--ink));
  color: var(--button-ink, var(--paper));
}

.button.primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.button .size {
  font-weight: 400;
  opacity: 0.7;
}

.fine {
  grid-column: 1 / -1;
  max-width: 40em;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Steps are a sequence: their rows are numbered. */

.steps {
  counter-reset: step;
}

.steps .item::before {
  counter-increment: step;
  content: counter(step) ". ";
  color: var(--accent);
}

/* Footer: the name, as wide as the page. */

footer {
  padding-top: var(--section);
  overflow: hidden;
  container-type: inline-size;
}

/* As wide as the line, from gutter to gutter, until a short name would grow too tall (ADR-0045). */
.giant {
  display: block;
  margin-bottom: -0.13em;
  padding-left: calc(var(--gutter) - 0.05em);
  font-size: min((100cqi - 2 * var(--gutter)) / var(--giant-em), var(--giant-max, 20rem));
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.065em;
  white-space: nowrap;
  color: var(--accent);
}

/* From tablets up, every row splits at column 6. */

@media (min-width: 48rem) {
  .left {
    grid-column: 1 / 6;
  }

  .right {
    grid-column: 6 / 13;
    padding-top: 0.3rem;
  }

  .lead {
    grid-column: 1 / 11;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}

/* The 404 page */

.lost {
  min-height: 60vh;
}
