/* ==========================================================================
   Rookery Coffee — stylesheet
   Palette: warm paper, espresso ink, burnt clay. One family, no cool tones.
   ========================================================================== */

:root {
  --paper:       #f2e9da;
  --paper-deep:  #e6d8c0;
  --paper-shade: #dccbaf;
  --ink:         #241a14;
  --ink-soft:    #5f4b3e;
  --ink-faint:   #8b7666;
  --clay:        #a8481c;
  --clay-deep:   #7d3413;
  --olive:       #6b6242;

  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --rule: 1px solid var(--paper-shade);

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Karla", "Avenir Next", "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  background-image:
    radial-gradient(120% 80% at 8% -10%, #fbf5ea 0%, transparent 55%),
    radial-gradient(90% 70% at 100% 10%, #ecdcc4 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fixed grain sheet — never inside a scrolling container. */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
}

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

::selection { background: var(--clay); color: var(--paper); }

a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.1rem;
  z-index: 999;
  font-size: 0.9rem;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

/* --- Reveal ---------------------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.eyebrow, h1, .lede, .hero__lines, .hero__photo,
.panel__index, .panel__body {
  animation: rise 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--d, 0ms);
}

.panel__body { --d: 90ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Masthead --------------------------------------------------------- */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: clamp(1.1rem, 3vw, 2rem) var(--gutter);
  border-bottom: var(--rule);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.mark__glyph {
  width: 30px;
  height: 30px;
  flex: none;
  fill: var(--clay);
  transform: translateY(2px);
}
.mark__glyph .stroke {
  fill: none;
  stroke: var(--clay);
  stroke-width: 1.7;
  stroke-linecap: round;
}
.mark__glyph .steam { opacity: 0.55; }

.mark__word {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 40;
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
}

.masthead__nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
}

.masthead__nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 0.2rem;
  background-image: linear-gradient(var(--clay), var(--clay));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.25s;
}
.masthead__nav a:hover { color: var(--clay); background-size: 100% 1px; }

/* --- Hero ------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(3rem, 8vw, 6.5rem) var(--gutter) clamp(3rem, 7vw, 5.5rem);
}

.eyebrow {
  margin: 0 0 1.5rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--clay);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2.2rem;
  height: 1px;
  background: var(--clay);
  vertical-align: 0.28em;
  margin-right: 0.75rem;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 144;
  font-weight: 500;
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
h1 em {
  font-style: italic;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 144;
  color: var(--clay);
}

.lede {
  max-width: 34ch;
  margin: 1.9rem 0 0;
  font-size: 1.06em;
  color: var(--ink-soft);
}

.hero__lines {
  margin: 1.8rem 0 0;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}
.hero__lines .dot { margin: 0 0.6rem; color: var(--ink-faint); }

.link {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--paper-shade);
  padding-bottom: 1px;
  transition: border-color 0.25s, color 0.25s;
}
.link:hover { color: var(--clay); border-color: var(--clay); }

.hero__photo {
  margin: 0;
  position: relative;
  transform: rotate(-1.4deg);
}
.hero__photo img {
  width: 100%;
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255, 253, 248, 0.7) inset,
    0 24px 48px -28px rgba(36, 26, 20, 0.55),
    0 3px 0 var(--paper-deep);
}
.hero__photo::after {
  /* paper edge behind the print */
  content: "";
  position: absolute;
  inset: -0.9rem -0.9rem 0.9rem 0.9rem;
  border: 1px solid var(--paper-shade);
  border-radius: 3px;
  z-index: -1;
}
.hero__photo figcaption {
  margin-top: 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  font-style: italic;
  transform: rotate(1.4deg);
}

/* --- Panels ----------------------------------------------------------- */
.panel {
  display: grid;
  grid-template-columns: minmax(9rem, 15%) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(2.75rem, 6vw, 4.75rem) var(--gutter);
  border-top: var(--rule);
}

.panel--menu { background: rgba(230, 216, 192, 0.42); }

.panel__index {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--ink-faint);
  align-self: start;
  position: sticky;
  top: 2rem;
}
.panel__index span {
  display: block;
  font-family: var(--display);
  font-variation-settings: "opsz" 20;
  font-size: 1.6rem;
  letter-spacing: 0;
  color: var(--clay);
  opacity: 0.55;
  margin-bottom: 0.15rem;
}

.panel__body { max-width: 62ch; }
.panel--menu .panel__body { max-width: 68ch; }

.panel__title {
  margin: -0.35rem 0 1.9rem;
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 72;
  font-weight: 500;
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
  line-height: 1.05;
  letter-spacing: -0.022em;
}

/* --- Leader-dot rows (hours + menu) ----------------------------------- */
.leaders { margin: 0; }

.leaders__row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.55rem 0;
}
.leaders--tight .leaders__row { padding: 0.4rem 0; }

.leaders__row dt {
  font-weight: 500;
  flex: 0 1 auto;
}
.leaders__row dt em {
  font-style: italic;
  color: var(--ink-faint);
  font-size: 0.88em;
}

.leaders__row::after {
  /* the filler between name and price */
  content: "";
  order: 1;
  flex: 1 1 auto;
  min-width: 1.5rem;
  align-self: center;
  border-bottom: 1px dotted var(--paper-shade);
  transform: translateY(-0.15em);
}

.leaders__row dd {
  order: 2;
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  color: var(--ink-soft);
  white-space: nowrap;
}

.leaders__row.is-quiet dt,
.leaders__row.is-quiet dd { color: var(--ink-faint); }

.menu .leaders__row dd::before { content: "£"; color: var(--ink-faint); }

/* --- Menu columns ----------------------------------------------------- */
.menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.25rem);
}

.menu__head {
  margin: 0 0 0.5rem;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--clay);
}
.menu__head + .leaders + .menu__head { margin-top: 2rem; }

/* --- Notes ------------------------------------------------------------ */
.note {
  margin: 1.8rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.note--boxed {
  border-left: 2px solid var(--clay);
  padding-left: 1.1rem;
  font-style: italic;
}

/* --- Find us ---------------------------------------------------------- */
.address {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "opsz" 30;
  font-style: normal;
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 0 0 2rem;
}

.facts {
  list-style: none;
  margin: 0 0 2.25rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  max-width: 48ch;
}
.facts li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-top: 0.85rem;
  border-top: var(--rule);
}
.facts__key {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--ink-faint);
  margin-bottom: 0.15rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border-radius: 2px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s;
}
.button:hover { background: var(--clay-deep); transform: translateY(-2px); }
.button:active { transform: translateY(0); }

.button__arrow {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Footer ----------------------------------------------------------- */
.footer {
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) clamp(3rem, 7vw, 4.5rem);
  border-top: 2px solid var(--ink);
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.footer p { margin: 0 0 0.4rem; }

.footer__mark {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 40;
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.footer__small {
  margin-top: 1.4rem;
  max-width: 44ch;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
    padding-top: clamp(2.5rem, 8vw, 4rem);
  }
  .hero__photo { transform: none; order: 2; }
  .hero__photo::after { inset: -0.6rem -0.6rem 0.6rem 0.6rem; }
  .hero__photo figcaption { transform: none; }

  .panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
  }
  .panel__index { position: static; }
  .panel__index span { display: inline; font-size: 1rem; margin-right: 0.4rem; }
}

@media (max-width: 620px) {
  .menu { grid-template-columns: minmax(0, 1fr); }
  .menu__col + .menu__col { margin-top: 0.5rem; }
  .masthead { gap: 0.9rem; }
}

@media (min-width: 1500px) {
  .hero, .panel, .masthead, .footer {
    padding-left: max(var(--gutter), calc((100vw - 1420px) / 2));
    padding-right: max(var(--gutter), calc((100vw - 1420px) / 2));
  }
}

@media print {
  .grain, .masthead__nav, .button { display: none; }
  body { background: #fff; }
}
