/* Carmine Coffee Co. Colours: the four brand values only. */
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --carmine-red: #9D0620;
  --cream: #FCF5E5;
  --ash-green: #86836D; /* large text and graphics only */
  --black: #020202;

  --font-display: "Satoshi", sans-serif;
  --font-body: "Montserrat", sans-serif;

  --gutter: 16px;
  --max: 1120px;
  --section-y: clamp(56px, 10vw, 112px);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

.theme-cream { --bg: var(--cream); --fg: var(--carmine-red); }
.theme-red { --bg: var(--carmine-red); --fg: var(--cream); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--carmine-red);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul.plain, ol.plain { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 1em; max-width: 62ch; }
h1, h2, h3 { margin: 0; font-weight: 700; }

.display { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; }
h1.display { font-size: clamp(2.5rem, 9vw, 5rem); margin-bottom: .4em; }
h2.display { font-size: clamp(1.9rem, 5.5vw, 3.1rem); margin-bottom: .45em; }
h3.display { font-size: clamp(1.25rem, 3vw, 1.6rem); margin-bottom: .35em; }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); line-height: 1.55; max-width: 44ch; margin-bottom: 1.6em; }
.label { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 1em; }
.small { font-size: .85rem; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 700px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

section { background: var(--bg); color: var(--fg); }
.section { padding-block: var(--section-y); }

:focus-visible { outline: 2px solid var(--fg, var(--carmine-red)); outline-offset: 4px; }
.skip { position: absolute; left: var(--gutter); top: -100px; background: var(--cream); color: var(--carmine-red); padding: 10px 16px; z-index: 10; }
.skip:focus { top: 8px; outline: 2px solid var(--carmine-red); }

/* ---------- logo ----------
   Logo file already carries ~9% padding. Clear space = height of the C (~16% of width),
   so add the remaining ~7% of the logo width around it. */
.logo { display: inline-block; --lw: 150px; padding: calc(var(--lw) * .07); line-height: 0; }
.logo-img { width: var(--lw); height: auto; }
.logo-hero { --lw: min(62vw, 280px); margin: calc(var(--lw) * -.07) 0 .6rem calc(var(--lw) * -.1575); }
.logo-footer { --lw: 170px; margin: calc(var(--lw) * -.07) 0 calc(var(--lw) * -.07) calc(var(--lw) * -.1575); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); color: var(--fg); border-bottom: 1px solid var(--fg); }
.header-in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 24px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.nav a { text-decoration: none; font-size: .95rem; display: inline-block; padding: 12px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.nav-toggle { display: none; }

@media (max-width: 759px) {
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; background: none; border: 1px solid currentColor;
    color: inherit; font: inherit; font-size: .9rem; padding: 10px 14px; cursor: pointer; border-radius: 0;
  }
  .js .nav { display: none; flex-basis: 100%; padding-bottom: 12px; }
  .js .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-top: 1px solid currentColor; }
  .nav a { display: block; padding: 14px 0; border-bottom: 0; }
  .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
  .nav-toggle[aria-expanded="true"] .bar-a { transform: translateY(4px) rotate(45deg); transform-origin: center; transform-box: fill-box; }
  .nav-toggle[aria-expanded="true"] .bar-b { transform: translateY(-4px) rotate(-45deg); transform-origin: center; transform-box: fill-box; }
}
.bar { transition: transform .4s var(--ease); }
@media (min-width: 760px) { .header-in { flex-wrap: nowrap; } }

/* ---------- buttons and links ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; text-decoration: none;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); font-size: .95rem; line-height: 1.2;
  transition: background .5s var(--ease), color .5s var(--ease);
}
.btn .icon { transition: transform .5s var(--ease); flex: none; }
.btn:hover .icon { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn:hover { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }
.text-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: underline; text-underline-offset: 6px; }
.icon { flex: none; }

/* ---------- hero ---------- */
.hero-grid { display: grid; gap: 40px; align-items: center; }
.tagline { font-size: clamp(2.2rem, 8vw, 4.2rem); margin-bottom: .45em; }
.hero-photo { overflow: hidden; border: 1px solid var(--fg); }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 62% 50%; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}

/* ---------- cards / gallery ---------- */
.cards { display: grid; gap: 0 40px; margin-bottom: 56px; }
.card { border-top: 1px solid var(--fg); padding: 22px 0 28px; }
.card p { margin-bottom: .6em; }
.price { font-size: .95rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }

ul.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 40px; }
.gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--fg); }
@media (min-width: 900px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* ---------- challenge ---------- */
.challenge-grid { display: grid; gap: 48px; align-items: center; }
.line-art { width: 100%; max-width: 560px; height: auto; }
@media (min-width: 900px) { .challenge-grid { grid-template-columns: 1.1fr 1fr; gap: 64px; } }

/* ---------- two-col ---------- */
.two-col { display: grid; gap: 40px; align-items: center; }
.two-col img { width: 100%; border: 1px solid var(--fg); }
.two-col img.line-art { border: 0; }
.two-col img.portrait { max-height: 640px; object-fit: cover; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 64px; } }

.photo-pair { display: grid; gap: 16px; }
.photo-pair img { width: 100%; border: 1px solid var(--fg); }
@media (min-width: 700px) { .photo-pair { grid-template-columns: 1fr 1fr; gap: 24px; } }

.status { border: 1px solid currentColor; display: inline-block; padding: 8px 14px; }
.hours h3 { display: flex; align-items: center; gap: 12px; }

/* ---------- menu ---------- */
.rows { max-width: 760px; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 2px 24px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--fg); }
.rows .row:last-child { border-bottom: 1px solid var(--fg); }
.row-name { font-size: clamp(1.15rem, 2.6vw, 1.4rem); }
.row-note { grid-column: 1; grid-row: 2; font-size: .88rem; max-width: 52ch; }
.row-price { grid-column: 2; grid-row: 1; text-align: right; white-space: nowrap; }
.house { display: grid; gap: 40px; align-items: center; }
.house-photo img { max-width: 273px; margin-inline: auto; }
.blend { mix-blend-mode: multiply; }
@media (min-width: 900px) { .house { grid-template-columns: 1.4fr 1fr; gap: 64px; } .house-photo img { max-width: 360px; } }
.notes { display: grid; gap: 28px 40px; }
.note { border-top: 1px solid var(--fg); padding-top: 18px; }
@media (min-width: 700px) { .notes { grid-template-columns: repeat(2, 1fr); } }

/* ---------- about ---------- */
.passions { display: grid; gap: 0 40px; }
.passion { border-top: 1px solid var(--fg); padding: 22px 0 28px; }
.num { display: block; font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; line-height: 1; margin-bottom: 12px; }
.theme-cream .num { color: var(--ash-green); }
@media (min-width: 640px) { .passions { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .passions { grid-template-columns: repeat(4, 1fr); gap: 0 32px; } }
.values { display: grid; gap: 28px 48px; }
.values > div { border-top: 1px solid var(--fg); padding-top: 18px; }
@media (min-width: 700px) { .values { grid-template-columns: 1fr 1fr; } }

/* ---------- contact ---------- */
.contact-blocks { display: grid; gap: 0; }
.contact-block a { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; align-items: center; padding: 28px 0; border-top: 1px solid var(--fg); text-decoration: none; }
.contact-blocks .contact-block:last-child a { border-bottom: 1px solid var(--fg); }
.contact-block .label { margin: 0; grid-column: 2; }
.contact-text { grid-column: 2; font-size: clamp(1.05rem, 4.9vw, 2.4rem); overflow-wrap: anywhere; }
.contact-block .icon { grid-row: 1 / span 2; width: 32px; height: 32px; }
.contact-block a:hover .contact-text { text-decoration: underline; text-underline-offset: 8px; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg); color: var(--fg); padding-top: var(--section-y); }
.footer-grid { display: grid; gap: 40px; }
.footer-tag { font-size: 1.3rem; max-width: 18ch; margin: 12px 0 0; }
.plain a { text-decoration: none; }
.plain a:hover { text-decoration: underline; text-underline-offset: 5px; }
.site-footer nav li a { display: inline-block; padding: 6px 0; }
.contact-list li { margin-bottom: 10px; }
.contact-list a, .contact-static { display: inline-flex; gap: 12px; align-items: flex-start; padding: 4px 0; overflow-wrap: anywhere; }
.contact-list .icon { margin-top: 2px; }
.footer-base { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: 56px; padding-block: 24px; font-size: .82rem; }
.footer-base::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid var(--fg); }
.footer-base p { margin: 0; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.3fr .8fr 1.5fr; gap: 64px; } }

/* ---------- motion: slow and subtle ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .btn .icon, .bar { transition: none; }
}

/* ---------- landing additions ---------- */
section[id], #top { scroll-margin-top: 0; }
.hero .status { margin-top: 0; }
.hours-line { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; margin-bottom: 1.6em; }
.hours-line .icon { margin-top: 2px; }
ul.story-passions { margin-top: clamp(48px, 8vw, 88px); }
.contact-addr { display: flex; gap: 12px; align-items: flex-start; margin-top: 32px; }
.contact-addr .icon { margin-top: 3px; }
.footer-slim { padding-top: clamp(40px, 7vw, 72px); }
.footer-slim-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.footer-slim .footer-tag { margin: 0; }
.footer-slim .footer-base { margin-top: 32px; }

.opening .lead { margin-bottom: 1.4em; }
.opening .status { margin-bottom: 1.2em; }
