/* Direction 1e — "Safn"
   Editorial gallery: warm off-white canvas, Instrument Serif display against
   Instrument Sans UI, hairline architecture, no radii and no shadows.
   Tokens follow uploads/DESIGN.md. */

:root {
  --ink: #1a1a1e;
  --canvas: #f3f3f2;
  --paper: #ffffff;
  --ash: #d1d1d2;
  --linen: #e7e6e4;
  --graphite: #4d4942;
  --mist: #8d8d8f;
  --bronze: #9a682c;
  --slate: #4a626f;

  --sans: "Instrument Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, Cambria, "Times New Roman", serif;

  --page: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --section-gap: clamp(56px, 9vw, 96px);
  --card-pad: 24px;

  --text-caption: 15px;
  --text-body-lg: 18px;
  --text-subheading: clamp(26px, 4vw, 32px);
  --text-heading: clamp(34px, 6vw, 52px);
  --text-display: clamp(40px, 7.5vw, 74px);
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

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

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

picture {
  display: block;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

p {
  margin: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--canvas);
  padding: 12px 18px;
  font: 500 var(--text-caption) / 1 var(--sans);
  z-index: 10;
}

.skip:focus {
  left: 0;
}

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

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

.rule {
  max-width: var(--page);
  margin: var(--section-gap) auto 0;
  padding-inline: var(--gutter);
}

.rule > div {
  height: 1px;
  background: var(--ash);
}

/* Small uppercase placard that opens every editorial section. */
.label {
  font: 500 var(--text-caption) / 1.2 var(--sans);
  letter-spacing: 0.09em;
}

.serif-display {
  font: 400 var(--text-display) / 1 var(--serif);
}

.serif-heading {
  font: 400 var(--text-heading) / 1.05 var(--serif);
}

.serif-sub {
  font: 400 var(--text-subheading) / 1.1 var(--serif);
}

.lede {
  font: 400 var(--text-body-lg) / 1.55 var(--sans);
}

.lede--muted {
  color: var(--graphite);
}

.ghost {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 12px 24px;
  font: 500 var(--text-caption) / 1.2 var(--sans);
  letter-spacing: 0.05em;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.ghost:hover {
  background: var(--ink);
  color: var(--canvas);
}

/* Category chip — the coloured dot is the system's only chromatic punctuation. */
.tag {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: var(--linen);
  padding: 4px 8px;
  width: fit-content;
}

.tag i {
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  color: var(--bronze);
}

.tag--slate i {
  color: var(--slate);
}

.tag span {
  font: 500 var(--text-caption) / 1.2 var(--sans);
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------- nav */

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 28px;
  height: auto;
}

.brand span {
  font: 500 16px/1.2 var(--sans);
  letter-spacing: 0.06em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 16px/1.2 var(--sans);
  letter-spacing: 0.04em;
}

.topnav i {
  font-style: normal;
  color: var(--mist);
}

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

.hero {
  position: relative;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ink);
}

/* Two-up below 640px, so all four tiles stay on the page as a 2x2 gallery
   rather than being hidden — a hidden tile still costs the download. */
.hero-grid img {
  width: 100%;
  height: clamp(150px, 24vw, 220px);
  object-fit: cover;
}

.hero-plate {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: var(--gutter);
}

.hero-plate > div {
  background: var(--canvas);
  border: 1px solid var(--ink);
  padding: clamp(20px, 4vw, 40px) clamp(24px, 5vw, 56px);
  text-align: center;
  max-width: 100%;
}

.hero-word {
  font: 400 clamp(44px, 11vw, 122px) / 1 var(--serif);
  letter-spacing: 0.02em;
}

.hero-sub {
  font: 500 clamp(11px, 1.6vw, 15px) / 1.2 var(--sans);
  letter-spacing: 0.34em;
  margin-top: 14px;
}

/* --------------------------------------------------------- editorial duo */

.duo {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.duo-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.duo-body .ghost {
  align-self: flex-start;
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card {
  background: var(--paper);
  padding: var(--card-pad);
}

.card p {
  margin-top: 8px;
  font: 400 16px/1.5 var(--sans);
  color: var(--graphite);
}

/* -------------------------------------------------------------- verkefni */

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
}

.section-head a {
  font: 500 var(--text-caption) / 1.2 var(--sans);
  letter-spacing: 0.05em;
}

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
  margin-top: 40px;
}

.feature > picture > img {
  width: 100%;
  height: clamp(240px, 42vw, 520px);
  object-fit: cover;
  border: 1px solid var(--ink);
}

.feature-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.feature-thumbs img {
  width: 100%;
  height: clamp(110px, 16vw, 150px);
  object-fit: cover;
}

/* ------------------------------------------------------------ card grid */

.grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.grid3 img {
  width: 100%;
  height: clamp(200px, 23vw, 280px);
  object-fit: cover;
  border: 1px solid var(--ink);
}

.grid3 .card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.grid3 .place {
  font: 400 var(--text-caption) / 1.2 var(--sans);
  color: var(--mist);
}

.grid3 .serif-sub {
  margin-top: 8px;
}

.grid3 .tag {
  margin-top: 24px;
}

/* --------------------------------------------------------------- samband */

.contact-card {
  background: var(--paper);
  padding: var(--card-pad);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-card dt {
  font: 400 var(--text-caption) / 1.2 var(--sans);
  color: var(--mist);
  margin-bottom: 8px;
}

.contact-card dd {
  margin: 0;
}

.contact-card dd a,
.contact-card dd span {
  font: 400 var(--text-subheading) / 1.1 var(--serif);
  /* Long addresses must not push the card wider than its column. */
  overflow-wrap: anywhere;
}

.contact-card .addr {
  font: 400 var(--text-body-lg) / 1.4 var(--sans);
  font-style: normal;
}

.colophon {
  max-width: var(--page);
  margin: var(--section-gap) auto 0;
  padding: 24px var(--gutter) 40px;
  border-top: 1px solid var(--ash);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font: 400 var(--text-caption) / 1.4 var(--sans);
  color: var(--mist);
}

/* --------------------------------------------------------- 640px and up */

@media (min-width: 640px) {
  .hero-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-grid img {
    height: clamp(220px, 36vw, 520px);
  }
}

/* --------------------------------------------------------- 900px and up */

@media (min-width: 900px) {
  .duo {
    grid-template-columns: 1.1fr 1fr;
  }

  .duo-body--offset {
    padding-top: 44px;
  }

  .feature {
    grid-template-columns: 2fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
