/* ============================================================
   Callow Oils — producer's catalogue
   Newsreader (editorial serif) · Fragment Mono (metadata)
   ============================================================ */

:root {
  --ground: #131009;
  --ground-2: #17130b;
  --bone: #eae3d6;
  --bone-dim: rgba(234, 227, 214, 0.6);
  --bone-faint: rgba(234, 227, 214, 0.38);
  --hair: rgba(234, 227, 214, 0.16);
  --hair-soft: rgba(234, 227, 214, 0.09);
  --accent: #cfc4ae; /* soft bone; oil colours live in the range section */
  --shell: 1180px;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono: "Fragment Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 18px;
  font-variation-settings: "opsz" 16;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--accent); color: var(--ground); }

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

h1, h2, h3 {
  margin: 0;
  font-weight: 480;
  font-variation-settings: "opsz" 60;
  line-height: 1.06;
  letter-spacing: 0.002em;
}

p { margin: 0; }

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

.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.dim { color: var(--bone-dim); }
.dim-text { color: var(--bone-dim); }

.text-link {
  color: var(--bone);
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}
.text-link:hover { color: var(--accent); }

/* ============================================================
   Masthead
   ============================================================ */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
  padding: 26px 0 22px;
  border-bottom: 1px solid var(--hair);
}
.brand {
  font-size: 1.25rem;
  font-variation-settings: "opsz" 60;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--bone-dim);
  text-decoration: none;
}
.nav a:hover { color: var(--accent); }

/* ============================================================
   Plates (framed photographs with catalogue captions)
   ============================================================ */
.plate { margin: 0; }
.plate img {
  width: 100%;
  border: 1px solid var(--hair);
}
.plate figcaption {
  padding-top: 12px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-top: clamp(28px, 5vh, 56px);
  padding-bottom: clamp(56px, 9vh, 110px);
}
.dateline {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hair);
}
.hero h1 {
  position: relative;
  z-index: 2;
  margin-top: clamp(28px, 5vh, 54px);
  font-size: clamp(3rem, 8.2vw, 7.6rem);
  font-variation-settings: "opsz" 72;
  line-height: 0.98;
  letter-spacing: -0.015em;
}
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.94fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.hero-copy { padding-top: clamp(28px, 6vh, 64px); }
.hero-plate {
  margin-top: calc(-1 * clamp(20px, 4.5vw, 66px));
}
.lead {
  max-width: 42ch;
  font-size: 1.15rem;
  color: var(--bone-dim);
}
.hero-links {
  display: flex;
  gap: 32px;
  margin-top: 40px;
}
.hero-links a {
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
}
.hero-links a:hover { color: var(--accent); }
.hero-plate img {
  aspect-ratio: 4 / 4.3;
  object-fit: cover;
  object-position: 62% 30%;
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding-top: clamp(56px, 8vh, 88px);
  padding-bottom: clamp(56px, 8vh, 96px);
  border-top: 1px solid var(--hair);
}
.section-rule {
  margin-bottom: clamp(36px, 6vh, 60px);
}

/* ---- about ---- */
.prose-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.prose-large {
  font-size: clamp(1.7rem, 3.1vw, 2.7rem);
  font-variation-settings: "opsz" 40;
  line-height: 1.24;
  max-width: 24em;
}
.prose-side {
  color: var(--bone-dim);
  max-width: 40ch;
  padding-top: 0.55em;
}

/* ============================================================
   Range catalogue
   ============================================================ */
.range {
  --accent: #c1502e; /* chilli selected by default; JS retints on selection */
  position: relative;
  isolation: isolate;
}
.range::before {
  content: "";
  position: absolute;
  inset: 0 auto;
  left: calc(50% - 50vw);
  width: 100vw;
  z-index: -1;
  background: color-mix(in srgb, var(--accent) 6%, var(--ground));
  transition: background 0.6s ease;
}
.range .feature img { border-color: color-mix(in srgb, var(--accent) 35%, var(--hair)); }
.range-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: start;
}

.oil-list {
  display: grid;
  border-top: 1px solid var(--hair);
}
.oil {
  display: grid;
  grid-template-columns: 3.2ch minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 18px;
  padding: 20px 14px;
  border: 0;
  border-bottom: 1px solid var(--hair);
  background: transparent;
  color: var(--bone);
  text-align: left;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.oil-no { color: var(--bone-faint); transition: color 0.3s ease; }
.oil-name {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-variation-settings: "opsz" 60;
  line-height: 1.05;
  transition: color 0.3s ease;
}
.oil-pair { color: var(--bone-faint); transition: color 0.3s ease; }
.oil-soon {
  display: inline-block;
  margin-left: 12px;
  padding: 3px 8px;
  border: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 4px;
  white-space: nowrap;
  color: var(--bone-faint);
  transition: color 0.3s ease, border-color 0.3s ease;
}
.oil.is-active .oil-soon {
  color: rgba(19, 16, 9, 0.7);
  border-color: rgba(19, 16, 9, 0.35);
}
.oil:hover { background: color-mix(in srgb, var(--oil) 14%, transparent); }
.oil:hover .oil-name { color: var(--oil); }
.oil.is-active {
  background: var(--oil);
  color: var(--ground);
}
.oil.is-active .oil-no,
.oil.is-active .oil-pair { color: rgba(19, 16, 9, 0.72); }
.oil.is-active .oil-name {
  color: var(--ground);
  font-style: italic;
}

.feature {
  position: sticky;
  top: 32px;
}
.feature img {
  aspect-ratio: 4 / 4.4;
  object-fit: cover;
  object-position: 55% 28%;
  transition: opacity 0.3s ease;
}
.feature img.is-swapping { opacity: 0; }
.feature img.is-seal { aspect-ratio: 1; object-position: center; }
.feature figcaption { max-width: 46ch; }

.range-foot {
  margin-top: clamp(36px, 6vh, 56px);
  max-width: 62ch;
}

/* ============================================================
   Craft
   ============================================================ */
.craft-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}
.craft-no {
  font-style: italic;
  font-size: 2.6rem;
  font-variation-settings: "opsz" 60;
  line-height: 1;
  color: var(--bone-dim);
}
.craft-step h3 {
  margin: 14px 0 10px;
  font-size: 1.6rem;
  font-variation-settings: "opsz" 40;
}
.craft-step p.dim-text { max-width: 34ch; }

/* ============================================================
   Statement band
   ============================================================ */
.band {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--hair);
}
.band-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.band-strip img {
  width: 100%;
  height: clamp(420px, 74vh, 720px);
  object-fit: cover;
}
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(19, 16, 9, 0.3), rgba(19, 16, 9, 0.12) 45%, rgba(19, 16, 9, 0.55));
  pointer-events: none;
}
.band-line {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 0 24px;
  font-style: italic;
  font-size: clamp(2.6rem, 7vw, 6rem);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.01em;
  text-align: center;
  text-shadow: 0 2px 40px rgba(19, 16, 9, 0.65);
}
.band-cap {
  position: absolute;
  right: clamp(20px, 3vw, 44px);
  bottom: 20px;
  z-index: 1;
  color: var(--bone-dim);
}

/* ============================================================
   Seals
   ============================================================ */
.seals-note {
  max-width: 44ch;
  margin: -20px 0 44px;
  color: var(--bone-dim);
}
.seal-grid {
  --seal-gap: clamp(16px, 2.4vw, 28px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--seal-gap);
}
.seal-grid figure {
  margin: 0;
  flex: 0 1 calc(25% - var(--seal-gap) * 3 / 4);
}
.seal-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--hair);
  filter: brightness(0.94);
  transition: filter 0.3s ease;
}
.seal-grid figure:hover img { filter: none; }
.seal-grid figcaption { padding-top: 12px; }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  max-width: 12em;
  text-wrap: balance;
}
.contact-copy p {
  margin-top: 20px;
  max-width: 42ch;
}

.form { display: grid; gap: 26px; }
.form label { display: grid; gap: 8px; }
.form input,
.form textarea {
  width: 100%;
  padding: 8px 2px 12px;
  border: 0;
  border-bottom: 1px solid var(--hair);
  border-radius: 0;
  background: transparent;
  color: var(--bone);
  font-family: var(--serif);
  font-size: 1.05rem;
  transition: border-color 0.25s ease;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.form textarea { resize: vertical; }
.submit {
  width: fit-content;
  margin-top: 6px;
  padding: 13px 26px;
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--bone);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.submit:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
  padding: 26px 0 34px;
  border-top: 1px solid var(--hair);
}
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.flag {
  height: 14px;
  width: auto;
  border: 1px solid var(--hair);
  opacity: 0.85;
}
.flag + .flag { margin-left: -4px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero-row,
  .prose-grid,
  .range-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .hero-plate { order: 2; max-width: 560px; margin-top: 8px; }
  .hero-copy { padding-top: 20px; }
  .feature { position: static; max-width: 560px; }
  .craft-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  .shell, .masthead, .footer { width: calc(100% - 36px); }
  .nav { gap: 18px; }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .hero-links { flex-direction: column; gap: 16px; }
  .dateline span:last-child { display: none; }
  .band-strip { grid-template-columns: repeat(3, 1fr); }
  .band-strip img { height: 380px; }
  .band-cap { display: none; }
  .band-strip img:nth-child(n + 4) { display: none; }
  .seal-grid figure { flex-basis: calc(50% - var(--seal-gap) / 2); }
  .oil { grid-template-columns: 3.2ch minmax(0, 1fr); padding-inline: 10px; }
  .oil-pair { grid-column: 2; }
}

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