/* Obradoiro's landing page (obradoiro.dev, ADR-0027 and ADR-0028). One ink, as on Sargadelos
   porcelain: cobalt on white by day, white on cobalt by night. Above the marker: this site's
   colours, sizes and its own elements. Below it: the house base, held to the template by the audit. */

:root {
  --paper: #f6f7f9;
  --ink: #1b3c9e;
  --ink-soft: #4b63ab;
  --accent: #1b3c9e;
  --band: #1b3c9e;
  --band-ink: #f6f7f9;

  --mark: 22px;
  --t-display: clamp(2.9rem, 9.4vw, 10.5rem);
  --h1-width: 10.5ch;
  --giant-size: 21.3vw;

  /* The frieze tile: the mason's mark, a ring, a half moon. */
  --tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 192 64'%3E%3Cpath d='M12 12h40L12 52h40z'/%3E%3Crect x='30.5' y='6' width='3' height='52'/%3E%3Ccircle cx='96' cy='32' r='19' fill='none' stroke='%23000' stroke-width='3'/%3E%3Ccircle cx='96' cy='32' r='6'/%3E%3Cpath d='M140 52a20 20 0 0 1 40 0z'/%3E%3Cpath d='M140 12a20 20 0 0 0 40 0' fill='none' stroke='%23000' stroke-width='3'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #102160;
    --ink: #eef1f8;
    --ink-soft: #b4bfe2;
    --accent: #eef1f8;
    --band: #eef1f8;
    --band-ink: #102160;
  }
}

/* The frieze: a ceramic band of the mason's mark, the one thing that moves. */

.frieze {
  position: relative;
  height: clamp(56px, 7vw, 96px);
  margin-top: var(--section);
  overflow: hidden;
  background-color: var(--band);
}

.frieze::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 300%;
  background-color: var(--band-ink);
  -webkit-mask: var(--tile) repeat-x left center / auto 100%;
  mask: var(--tile) repeat-x left center / auto 100%;
  animation: slide 90s linear infinite;
}

@keyframes slide {
  to {
    transform: translateX(-33.333%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .frieze::before {
    animation: none;
  }
}

/* The word, as a dictionary entry */

.pron {
  display: block;
  margin-top: 0.4rem;
  font-size: var(--t-body);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.ipa {
  font-family: system-ui, sans-serif; /* the display face has no phonetic letters */
}

.senses {
  padding: 0;
  list-style: none;
  counter-reset: sense;
}

.senses li {
  display: grid;
  grid-template-columns: 1.6em 1fr;
}

.senses li::before {
  counter-increment: sense;
  content: counter(sense) ".";
  font-weight: 600;
  color: var(--ink);
}

.senses li + li {
  margin-top: 0.6rem;
}

/* --- 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;
}

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, one link at the end. */

.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;
}

/* 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);
}

/* Footer: the name, too big for the page. */

footer {
  padding-top: var(--section);
  overflow: hidden;
}

.giant {
  display: block;
  margin-bottom: -0.13em;
  padding-left: calc(var(--gutter) - 0.05em);
  font-size: var(--giant-size);
  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;
  }
}

/* The 404 page */

.lost {
  min-height: 60vh;
}
