/* site-safety */
/* Margin Books. Swiss editorial: strict grid, huge grotesk, one red. */
:root {
  --paper: #f4f2ee;
  --paper-2: #ebe7df;
  --white: #ffffff;
  --ink: #111111;
  --muted: #555555;
  --red: #e63b2e;
  --red-ink: #c0281c;
  --display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: 16px;
  --pad: 20px;
  --radius: 22px;
  --radius-lg: 32px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { scrollbar-width: none; }
::-webkit-scrollbar { display: none; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
.red { color: var(--red-ink); }
:focus-visible { outline: 3px solid rgba(230, 59, 46, .55); outline-offset: 3px; border-radius: 10px; }

.icon { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 12px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-inline: var(--pad);
  max-width: 1440px;
  margin-inline: auto;
}
.label {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sample-tag {
  display: inline-block;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper-2);
  padding: 4px 10px;
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
}

/* Header */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--pad);
}
.top::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px;
  font-family: var(--display); font-weight: 800; font-size: 17px; line-height: .95;
  letter-spacing: -.02em; text-decoration: none;
  position: relative; z-index: 2;
}
.brand-mark {
  width: 30px; height: 30px; background: var(--red); border-radius: 9px;
  transition: transform .5s var(--spring);
}
@supports (corner-shape: squircle) { .brand-mark { corner-shape: squircle; border-radius: 14px; } }
.brand:hover .brand-mark { transform: rotate(90deg) scale(.9); }

.menu-toggle {
  position: relative; z-index: 2;
  width: 48px; height: 48px; margin-right: -10px;
  display: grid; place-items: center;
  background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.burger line { stroke: currentColor; stroke-width: 2; stroke-linecap: round; transform-origin: 12px 12px; transition: transform .45s var(--spring), opacity .2s ease; }
.menu-open .burger .b1 { transform: translateY(6px) rotate(45deg); }
.menu-open .burger .b2 { opacity: 0; transform: scaleX(.2); }
.menu-open .burger .b3 { transform: translateY(-6px) rotate(-45deg); }

.nav {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: center; gap: 32px;
  padding: 96px var(--pad) 40px;
  background: var(--paper);
  opacity: 0; visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .3s ease, transform .45s var(--spring), visibility 0s linear .3s;
  overflow-y: auto;
}
.menu-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .45s var(--spring), visibility 0s; }
.nav ol { display: grid; gap: 4px; }
.nav a {
  display: flex; align-items: baseline; gap: 14px;
  font-family: var(--display); font-weight: 700; font-size: clamp(40px, 12vw, 64px);
  letter-spacing: -.04em; line-height: 1.05; text-decoration: none;
  padding: 6px 0;
  transition: color .2s ease, transform .4s var(--spring);
}
.nav a:hover { color: var(--red-ink); transform: translateX(6px); }
.nav-num { font-family: var(--body); font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--red-ink); }
.nav-note { color: var(--muted); font-size: 15px; }
body.menu-open { overflow: hidden; }

/* Hero */
.hero { padding: 28px 0 56px; }
.hero-grid { row-gap: 24px; align-items: end; }
.hero-index, .hero-title, .hero-lede, .hero-figure, .hero-meta { grid-column: 1 / -1; }
.hero-index { font-size: 14px; font-weight: 500; color: var(--muted); }
.hero-index .red { font-weight: 700; margin-right: 8px; }
.hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(52px, 16.4vw, 188px);
  line-height: .86;
  letter-spacing: -.055em;
  margin-left: -.04em;
}
.hero-title .line { display: block; white-space: nowrap; }
.hero-title .line:nth-child(2) { padding-left: .3em; }
@media (min-width: 720px) { .hero-title { font-size: 13vw; } .hero-title .line:nth-child(2) { padding-left: 1.1em; } }
.hero-lede p { font-size: 18px; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }
.star-wrap { display: inline-flex; }
.star-wrap, .star-wrap .star-border {
  min-height: 52px;
  font-weight: 600; font-size: 16px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--ink); color: var(--paper);
  align-items: center; text-decoration: none;
}
.star-wrap:has(.star-border) { padding: 0; background: none; }
.star-wrap .star-border { transition: transform .45s var(--spring); }
.star-wrap .star-border:hover { transform: translateY(-3px) scale(1.03); }
.star-wrap .star-border:active { transform: scale(.97); }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; text-decoration: none;
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size .35s var(--ease);
}
.text-link:hover { background-size: 100% 2px; }
.text-link .icon { transition: transform .4s var(--spring); }
.text-link:hover .icon { transform: translateX(5px); }

.hero-figure { position: relative; }
.hero-figure img, .cafe-photo img {
  width: 100%; object-fit: cover; border-radius: var(--radius);
}
.hero-figure img { aspect-ratio: 4 / 3; }
@supports (corner-shape: squircle) {
  .hero-figure img, .cafe-photo img, .event, .menu, .club-form .field, .pick-card .tilted-card__face { corner-shape: squircle; }
  .hero-figure img, .cafe-photo img { border-radius: 44px; }
}
figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
figcaption .red { font-weight: 700; margin-right: 6px; }
.hero-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); padding-top: 8px; }
.hero-meta div { background: var(--white); border-radius: 16px; padding: 12px 14px; }
.hero-meta dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); }
.hero-meta dd { font-size: 14px; font-weight: 500; line-height: 1.3; margin-top: 4px; }

/* Ribbon */
.ribbon { padding: 24px 0 8px; background: var(--paper); }
.ribbon-head { row-gap: 6px; }
.ribbon-head .label { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.6); opacity: .5; } }
.ribbon-list { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
.ribbon-loop { height: clamp(170px, 24vw, 330px); margin-top: 4px; overflow: hidden; display: flex; align-items: center; }
.ribbon-loop > * { flex: none; width: 100%; }

/* Section heads */
section { position: relative; }
.picks, .events, .cafe { padding: 72px 0; }
.section-head { row-gap: 10px; margin-bottom: 36px; }
.section-num { grid-column: 1 / -1; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--red-ink); }
.section-title {
  grid-column: 1 / -1;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 14vw, 140px); line-height: .9; letter-spacing: -.05em;
}
.section-intro { grid-column: 1 / -1; font-size: 17px; color: #333; max-width: 46ch; }

/* Picks */
.pick-list { row-gap: 56px; }
.pick { grid-column: 1 / -1; display: grid; gap: 18px; }
.pick-card { height: 400px; display: grid; place-items: center; }
.pick-card:not([data-ai-code-use-state]) { background: var(--paper-2); border-radius: var(--radius); }
.pick-card .tilted-card__face { border-radius: 18px; }
.pick-text { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: baseline; }
.pick-num { grid-row: span 3; font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--red-ink); line-height: 1; }
.pick h3 { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -.03em; line-height: 1.05; }
.pick-author { font-size: 15px; color: var(--muted); font-weight: 500; }
.pick-note { margin-top: 8px; font-size: 16px; max-width: 36ch; }

/* Events */
.events { background: var(--white); }
.events .sample-tag { background: var(--paper); }
.event-list { display: grid; gap: 10px; padding-inline: var(--pad); max-width: 1440px; margin-inline: auto; }
.event {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--paper);
  transition: transform .5s var(--spring), background-color .3s ease, box-shadow .4s ease;
}
.event:hover{transform:translateY(-4px);background:#f8f6f2;box-shadow:0 12px 28px rgb(17 24 39 / 0.1)}
.event-date { grid-row: span 2; display: flex; align-items: flex-start; gap: 6px; }
.event-day { font-family: var(--display); font-weight: 700; font-size: 48px; line-height: .85; letter-spacing: -.05em; transition: color .3s ease; }
.event:hover .event-day { color: var(--red-ink); }
.event-month { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; line-height: 1.2; padding-top: 2px; }
.event-body h3 { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1.15; }
.event-body p { font-size: 15px; color: #3c3c3c; margin-top: 4px; }
.event-time { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.event-time .icon { color: var(--red); }

/* Café */
.cafe-grid { row-gap: 20px; }
.cafe-photo { grid-column: 1 / -1; }
.cafe-photo-a img { aspect-ratio: 4 / 3; }
.cafe-photo-b img { aspect-ratio: 4 / 5; }
.cafe-photo-b { grid-column: 2 / -1; margin-top: -72px; position: relative; z-index: 1; }
.cafe-photo-b img{box-shadow:0 8px 24px rgb(17 24 39 / 0.08)}
.menu { grid-column: 1 / -1; background: var(--white); border-radius: var(--radius-lg); padding: 26px 22px; }
.menu-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.03em; margin-bottom: 14px; }
.menu-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 12px 0;
  font-size: 17px;
}
.menu-list li + li { box-shadow: inset 0 2px 0 var(--paper); }
.price { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.menu-note { display: flex; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.menu-note .icon { color: var(--red); margin-top: 3px; }

/* Club */
.club { background: var(--ink); color: var(--paper); padding: 80px 0 88px; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
@supports (corner-shape: squircle) { .club { corner-shape: squircle; border-radius: 56px 56px 0 0; } }
.club::before {
  content: ""; position: absolute; right: -16vw; top: -22vw;
  width: 46vw; height: 46vw; max-width: 520px; max-height: 520px;
  background: var(--red); border-radius: 50%;
  opacity: .95;
  transform: translateY(calc(var(--club-shift, 0) * 1px));
}
.club-grid { position: relative; row-gap: 22px; }
.club-num { color: var(--red); }
.club-num, .club-title, .club-copy { grid-column: 1 / -1; }
.club-title { font-family: var(--display); font-weight: 700; font-size: clamp(46px, 13vw, 132px); line-height: .9; letter-spacing: -.05em; }
.dot-end { color: var(--red); }
.club-copy > p { font-size: 18px; max-width: 40ch; color: #e9e6df; }
.club-points { display: grid; gap: 12px; margin: 24px 0 30px; }
.club-points li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.club-points .icon { font-size: 22px; color: var(--red); }
.club-form label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.club-form .field {
  display: flex; flex-wrap: wrap; gap: 8px;
  background: #222222; border-radius: 22px; padding: 6px;
  transition: box-shadow .3s ease;
}
.club-form .field:focus-within { box-shadow: 0 0 0 3px rgba(230, 59, 46, .6); }
.club-form input {
  flex: 1 1 180px; min-width: 0; min-height: 50px;
  background: transparent; border: 0; color: var(--paper);
  font: inherit; font-size: 17px; padding: 0 14px;
}
.club-form input::placeholder { color: #9a968f; }
.club-form input:focus { outline: none; }
.club-form button {
  flex: 1 0 auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px;
  border: 0; border-radius: 17px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .45s var(--spring), background-color .2s ease, color .2s ease;
}
.club-form button:hover { transform: translateY(-2px) scale(1.03); background: var(--red); color: var(--white); }
.club-form button:active { transform: scale(.96); }
.form-note { min-height: 1.6em; margin-top: 12px; font-weight: 500; color: #f4f2ee; }
.form-note.error { color: #ff8f86; }

/* Footer */
.footer { background: var(--ink); color: var(--paper); padding: 8px 0 32px; overflow: hidden; }
.footer-grid { row-gap: 28px; }
.footer-word {
  grid-column: 1 / -1; order: 9;
  font-family: var(--display); font-weight: 800;
  font-size: 30vw; line-height: .78; letter-spacing: -.07em;
  color: var(--red); margin: 24px 0 0 -.05em;
  white-space: nowrap;
}
.footer-col { grid-column: span 2; }
.footer-col .label { color: #b5b1a9; margin-bottom: 8px; }
.footer-col p { font-size: 15px; color: #e9e6df; }
.footer-links li a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; text-decoration: none; transition: color .2s ease, transform .4s var(--spring); }
.footer-links li a:hover { color: #ff8f86; transform: translateX(4px); }
.footer-small { grid-column: 1 / -1; font-size: 13px; color: #b5b1a9; }

/* Reveal */
@media (scripting:enabled){html.js .reveal{opacity:0;transform:translateY(28px);transition:opacity .8s var(--ease), transform .9s var(--spring);transition-delay:calc(var(--d, 0) * 80ms)}}
html.js .reveal.in { opacity: 1; transform: none; }

/* Tablet and up */
@media (min-width: 720px) {
  :root { --gutter: 20px; --pad: 32px; }
  .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .hero-meta { grid-column: 1 / 7; }
  .hero-lede { grid-column: 1 / 6; }
  .section-intro { grid-column: 1 / 6; }
  .pick { grid-column: span 4; }
  .pick:last-child { grid-column: 3 / 7; }
  .event { grid-template-columns: 120px 1fr auto; align-items: start; padding: 26px 28px; }
  .event-date { grid-row: auto; }
  .event-time { padding-top: 6px; }
  .cafe-photo-a { grid-column: 1 / 6; grid-row: 1 / 3; }
  .cafe-photo-b { grid-column: 6 / -1; margin-top: 80px; grid-row: 1; }
  .menu { grid-column: 4 / -1; margin-top: -40px; position: relative; z-index: 2; }
  .club-title { grid-column: 1 / -1; }
  .club-copy { grid-column: 1 / 7; }
  .footer-col { grid-column: span 2; }
  .footer-word { font-size: 31vw; }
}

/* Desktop */
@media (min-width: 1040px) {
  :root { --gutter: 24px; --pad: 48px; }
  body { font-size: 18px; }
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .menu-toggle { display: none; }
  .nav {
    position: static; inset: auto; opacity: 1; visibility: visible; transform: none;
    flex-direction: row; align-items: center; gap: 28px; padding: 0; background: none; overflow: visible;
  }
  .nav ol { display: flex; gap: 6px; }
  .nav a { font-family: var(--body); font-size: 15px; font-weight: 600; letter-spacing: 0; gap: 6px; padding: 10px 14px; border-radius: 999px; min-height: 44px; align-items: center; }
  .nav a:hover { background: var(--white); transform: translateY(-2px); }
  .nav-num { font-size: 11px; }
  .nav-note { font-size: 13px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 999px; }
  .top { padding: 14px var(--pad); }

  .hero { padding: 32px 0 80px; }
  .hero-grid { row-gap: 28px; }
  .hero-index { grid-column: 1 / 7; grid-row: 1; }
  .hero-title { grid-column: 1 / 9; grid-row: 2; font-size: clamp(110px, 10.6vw, 172px); position: relative; z-index: 2; }
  .hero-figure { grid-column: 9 / 13; grid-row: 1 / 3; align-self: start; margin-top: 8px; }
  .hero-figure img { aspect-ratio: 3 / 4; }
  .hero-lede { grid-column: 1 / 6; grid-row: 3; }
  .hero-meta { grid-column: 9 / 13; grid-row: 3; align-self: end; }

  .ribbon-head .label { grid-column: 1 / 5; }
  .ribbon-list { grid-column: 5 / 13; }

  .picks, .events, .cafe { padding: 120px 0; }
  .section-head { margin-bottom: 56px; align-items: end; }
  .section-num { grid-column: 1 / 2; grid-row: 1; align-self: start; padding-top: 14px; }
  .section-title { grid-column: 2 / 9; grid-row: 1; }
  .section-intro { grid-column: 9 / 13; grid-row: 1; }
  .pick, .pick:last-child { grid-column: span 4; }
  .pick:nth-child(2) { margin-top: 80px; }
  .pick:nth-child(3) { margin-top: 160px; }

  .event-list { padding-inline: var(--pad); }
  .event { grid-template-columns: 180px 1fr 140px; padding: 30px 36px; }
  .event-day { font-size: 68px; }
  .event-body h3 { font-size: 28px; }
  .event-body p { font-size: 16px; max-width: 60ch; }
  .event-time { justify-self: end; }

  .cafe-photo-a { grid-column: 1 / 8; grid-row: 1 / 3; }
  .cafe-photo-b { grid-column: 8 / 13; grid-row: 1; margin-top: 120px; }
  .menu { grid-column: 7 / 12; grid-row: 2; margin-top: -60px; padding: 34px 34px 28px; }

  .club { padding: 130px 0 140px; }
  .club::before { right: -8vw; top: -16vw; width: 34vw; height: 34vw; }
  .club-num { grid-column: 1 / 2; padding-top: 18px; }
  .club-title { grid-column: 2 / 8; grid-row: 1 / 3; }
  .club-copy { grid-column: 8 / 13; grid-row: 2; padding-top: 60px; }

  .footer-col { grid-column: span 3; }
  .footer-col:first-of-type { grid-column: 1 / 4; }
  .footer-small { grid-column: 10 / 13; align-self: end; }
  .footer-word { font-size: 25vw; }
}

@media (min-width: 1600px) {
  .footer-word { font-size: 400px; }
}

/* Scroll-driven moments where supported */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-figure img { animation: settle linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes settle { to { transform: translateY(60px) scale(.94); } }
    .footer-word { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    @keyframes rise { from { transform: translateY(40%); } }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .club::before { transform: none; }
}
