:root {
  --cream: #fff2dc;
  --cream-2: #f6dfbd;
  --ink: #241610;
  --coffee: #4a2517;
  --red: #b53d2e;
  --red-dark: #7e261f;
  --maple: #dc8c2d;
  --blue: #2f6f78;
  --blue-dark: #17474f;
  --paper: rgba(255, 246, 225, 0.92);
  --shadow: 0 24px 80px rgba(74, 37, 23, 0.22);
  --radius-lg: 34px;
  --radius-md: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(255,242,220,.88), rgba(255,242,220,.88)),
    url('./assets/diner-ticket-texture.jpg') center / 520px repeat,
    var(--cream);
  font-family: 'Atkinson Hyperlegible', ui-sans-serif, sans-serif;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 18% 10%, rgba(220,140,45,.22), transparent 34%), radial-gradient(circle at 90% 20%, rgba(47,111,120,.16), transparent 31%);
  mix-blend-mode: multiply;
  z-index: -1;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
.skip-link {
  position: absolute;
  left: 14px;
  top: -80px;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 16px;
  border-radius: 999px;
  z-index: 50;
}
.skip-link:focus { top: 14px; }
.preview-ribbon {
  padding: 10px 18px;
  background: var(--ink);
  color: var(--cream);
  text-align: center;
  font-size: 0.92rem;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: calc(var(--max) + 40px);
  margin: 0 auto;
  padding: 16px 20px;
  backdrop-filter: blur(18px);
  background: rgba(255, 242, 220, 0.78);
  border-bottom: 1px dashed rgba(74,37,23,.25);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-height: 44px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: var(--blue);
  color: white;
  box-shadow: 4px 4px 0 var(--red);
}
.brand strong {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  line-height: 1;
}
.brand small { display: block; color: rgba(36,22,16,.72); margin-top: 3px; }
.site-header nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.site-header nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(74,37,23,.18);
  border-radius: 999px;
  text-decoration: none;
  background: rgba(255,255,255,.28);
}
.site-header nav a:hover, .site-header nav a:focus-visible { background: var(--ink); color: var(--cream); outline: none; }

.hero {
  position: relative;
  max-width: var(--max);
  margin: 28px auto 0;
  padding: clamp(24px, 4vw, 54px);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
  gap: clamp(22px, 4vw, 52px);
  align-items: center;
  border: 2px solid rgba(74,37,23,.25);
  border-radius: var(--radius-lg);
  background: linear-gradient(130deg, rgba(255,248,231,.98), rgba(246,223,189,.92));
  box-shadow: var(--shadow), inset 0 0 0 10px rgba(255,255,255,.24);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 22px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 28px);
  opacity: .9;
}
.kicker, .label {
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red-dark);
  font-size: .78rem;
}
.open-ticket {
  display: inline-grid;
  gap: 3px;
  padding: 12px 16px 12px 58px;
  border-radius: 18px;
  border: 1px dashed rgba(74,37,23,.42);
  background: #fff9ed;
  box-shadow: 6px 6px 0 rgba(181,61,46,.16);
  position: relative;
  transform: rotate(-1deg);
}
.ticket-stub {
  position: absolute;
  left: -1px;
  top: -1px;
  bottom: -1px;
  width: 45px;
  display: grid;
  place-items: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border-radius: 18px 0 0 18px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  letter-spacing: .08em;
}
h1, h2, h3 {
  font-family: 'Fraunces', ui-serif, serif;
  letter-spacing: -.04em;
  line-height: .93;
  margin: 0;
  color: var(--coffee);
}
h1 { font-size: clamp(3.3rem, 9.2vw, 7.9rem); max-width: 8.6ch; margin-top: 24px; }
h2 { font-size: clamp(2.2rem, 5vw, 4.8rem); max-width: 11.5ch; }
h3 { font-size: clamp(1.35rem, 2vw, 2rem); }
.lede {
  font-size: clamp(1.06rem, 2vw, 1.35rem);
  line-height: 1.45;
  max-width: 590px;
  color: rgba(36,22,16,.84);
}
.source-note {
  font-size: .94rem;
  line-height: 1.5;
  color: rgba(36,22,16,.66);
  max-width: 620px;
}
.hero-actions, .inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 16px;
}
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--cream);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 4px 5px 0 rgba(36,22,16,.18);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn.primary { background: var(--red); color: white; }
.btn.ghost { background: transparent; }
.btn:hover, .btn:focus-visible { transform: translate(-1px, -2px) rotate(-.5deg); box-shadow: 7px 8px 0 rgba(36,22,16,.18); outline: none; }
.hero-art {
  margin: 0;
  position: relative;
  align-self: stretch;
  min-height: 500px;
  border-radius: 30px;
  overflow: hidden;
  border: 2px solid rgba(36,22,16,.22);
  box-shadow: 12px 12px 0 rgba(47,111,120,.16);
  background: var(--cream-2);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.hero-art figcaption {
  position: absolute;
  right: 14px;
  bottom: 14px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(36,22,16,.78);
  color: var(--cream);
  font-size: .78rem;
}
.steam {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 3px solid rgba(47,111,120,.2);
  border-left: 0;
  border-bottom: 0;
  border-radius: 55% 45% 55% 45%;
  pointer-events: none;
}
.steam-one { left: 42%; top: 40px; transform: rotate(-14deg); animation: steam 8s ease-in-out infinite; }
.steam-two { left: 8%; bottom: 44px; transform: rotate(24deg); animation: steam 10s ease-in-out infinite reverse; }

.quick-panel, .menu-section, .hours-location, .story, .owner-preview, .contact-strip, footer {
  max-width: var(--max);
  margin: 26px auto;
  padding-inline: 20px;
}
.quick-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 0 20px;
}
.quick-panel article {
  padding: 20px;
  min-height: 132px;
  border-radius: var(--radius-md);
  background: var(--paper);
  border: 1px dashed rgba(74,37,23,.34);
  box-shadow: 8px 9px 0 rgba(220,140,45,.14);
}
.quick-panel strong { font-size: 1.15rem; line-height: 1.25; }
.section-heading { display: grid; grid-template-columns: .9fr 1fr; gap: 24px; align-items: end; margin: 96px 0 28px; }
.section-heading p:not(.kicker) { font-size: 1.08rem; line-height: 1.55; color: rgba(36,22,16,.72); max-width: 560px; }
.ticket-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.menu-ticket {
  min-height: 300px;
  padding: 22px;
  position: relative;
  border-radius: 24px 24px 18px 18px;
  background: linear-gradient(#fffaf0, #f8e0ba);
  border: 2px solid rgba(74,37,23,.2);
  box-shadow: 8px 10px 0 rgba(181,61,46,.12);
  overflow: hidden;
}
.menu-ticket::before, .menu-ticket::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  height: 1px;
  border-top: 2px dashed rgba(74,37,23,.22);
}
.menu-ticket::before { top: 58px; }
.menu-ticket::after { bottom: 24px; }
.menu-ticket > span, .feature-ticket span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-weight: 700;
  margin-bottom: 26px;
}
.menu-ticket p { line-height: 1.55; color: rgba(36,22,16,.76); }
.feature-ticket {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(160px, .75fr) 1fr;
  gap: 18px;
  align-items: center;
  background: linear-gradient(130deg, #fff7e7, #f3d19d);
}
.feature-ticket img {
  border-radius: 18px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid rgba(74,37,23,.17);
}
.hours-location {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 22px;
  align-items: stretch;
  margin-top: 70px;
}
.location-card, .map-poster, .owner-preview, .contact-strip {
  border-radius: var(--radius-lg);
  border: 2px solid rgba(74,37,23,.22);
  background: rgba(255,248,232,.93);
  box-shadow: var(--shadow);
}
.location-card { padding: clamp(26px, 4vw, 48px); }
.hours-list { margin: 28px 0; display: grid; gap: 10px; }
.hours-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px dashed rgba(74,37,23,.26);
}
dt { font-weight: 700; }
dd { margin: 0; color: var(--red-dark); font-weight: 700; text-align: right; }
.holiday { color: rgba(36,22,16,.68); }
.map-poster {
  padding: 22px;
  display: grid;
  align-content: space-between;
  min-height: 560px;
  background: linear-gradient(rgba(47,111,120,.82), rgba(23,71,79,.9)), url('./assets/diner-ticket-texture.jpg') center/520px;
  color: var(--cream);
  overflow: hidden;
}
.map-poster img {
  width: min(360px, 86%);
  justify-self: center;
  border-radius: 28px;
  transform: rotate(-2deg);
  box-shadow: 0 18px 44px rgba(0,0,0,.28);
}
.map-copy { padding: 22px; border-radius: 22px; background: rgba(36,22,16,.32); border: 1px solid rgba(255,242,220,.28); }
.map-copy .label { color: #ffd79a; }
.map-copy strong { display:block; font-family: 'Fraunces'; font-size: 2.6rem; letter-spacing:-.04em; }
.story { display: grid; grid-template-columns: .82fr 1.18fr; gap: 22px; margin-top: 90px; align-items: center; }
.story-copy, .proof-counter { padding: clamp(24px, 4vw, 44px); border-radius: var(--radius-lg); }
.story-copy { background: var(--coffee); color: var(--cream); }
.story-copy h2 { color: var(--cream); }
.story-copy .kicker { color: #f3ba74; }
.story-copy p:not(.kicker) { line-height: 1.6; color: rgba(255,242,220,.86); }
.proof-counter { display: grid; gap: 14px; background: rgba(255,250,239,.92); border: 2px solid rgba(74,37,23,.18); }
blockquote { margin: 0; padding: 18px; border-radius: 20px; background: white; box-shadow: 5px 6px 0 rgba(47,111,120,.11); font-size: 1.05rem; line-height: 1.45; }
cite { display:block; margin-top: 10px; color: rgba(36,22,16,.58); font-style: normal; font-weight: 700; font-size: .9rem; }
.owner-preview, .contact-strip { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; padding: clamp(24px, 4vw, 46px); margin-top: 70px; }
.owner-preview { background: linear-gradient(135deg, rgba(255,248,232,.96), rgba(246,223,189,.95)); }
.owner-preview h2, .contact-strip h2 { max-width: 13ch; }
.owner-preview p:not(.kicker), .contact-strip p { line-height: 1.6; color: rgba(36,22,16,.72); }
.discreet-note {
  align-self: center;
  padding: 22px;
  border-radius: 22px;
  background: var(--blue-dark);
  color: var(--cream) !important;
  font-weight: 700;
}
.contact-strip { background: var(--red-dark); color: var(--cream); }
.contact-strip h2 { color: var(--cream); }
.contact-strip .kicker { color: #ffd79a; }
.contact-strip p { color: rgba(255,242,220,.85); }
.contact-card { display: grid; gap: 10px; align-content: center; }
.contact-card a {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 13px 16px;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(255,242,220,.12);
  border: 1px solid rgba(255,242,220,.26);
}
.contact-card a:hover, .contact-card a:focus-visible { background: rgba(255,242,220,.24); outline: 2px solid #ffd79a; }
footer { padding: 32px 20px 96px; color: rgba(36,22,16,.62); line-height: 1.6; }
.mobile-ticket { display: none; }
.reveal { opacity: 1; transform: none; transition: opacity .6s ease var(--delay,0ms), transform .6s ease var(--delay,0ms); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes steam {
  0%, 100% { transform: translateY(0) rotate(-14deg) scale(1); opacity: .32; }
  50% { transform: translateY(-14px) rotate(2deg) scale(1.05); opacity: .18; }
}

@media (max-width: 920px) {
  .site-header { position: static; align-items: flex-start; }
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin: 16px 12px 0; padding: 22px; }
  h1 { max-width: 9ch; font-size: clamp(3rem, 17vw, 5.4rem); }
  .hero-art { min-height: 360px; order: -1; }
  .hero-art img { object-position: 61% center; }
  .hero-art figcaption { left: 12px; right: 12px; max-width: none; }
  .quick-panel, .section-heading, .hours-location, .story, .owner-preview, .contact-strip { grid-template-columns: 1fr; }
  .quick-panel { padding: 0 12px; }
  .ticket-grid { grid-template-columns: 1fr; }
  .feature-ticket { grid-column: auto; grid-template-columns: 1fr; }
  .section-heading { margin-top: 66px; }
  .map-poster { min-height: 0; }
  .mobile-ticket {
    position: fixed;
    z-index: 30;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
    border-radius: 22px;
    background: rgba(36,22,16,.92);
    box-shadow: 0 12px 40px rgba(0,0,0,.24);
  }
  .mobile-ticket a {
    min-height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--cream);
    text-decoration: none;
    background: rgba(255,242,220,.12);
    font-weight: 700;
  }
  footer { padding-bottom: 120px; }
}

@media (max-width: 540px) {
  .preview-ribbon { text-align: left; }
  .hero-actions .btn, .inline-actions .btn { width: 100%; }
  .hero-actions .ghost { display: none; }
  .open-ticket { padding-left: 52px; font-size: .92rem; }
  .quick-panel { grid-template-columns: 1fr; }
  .hours-list div { display: grid; gap: 5px; }
  dd { text-align: left; }
  .hero-art { min-height: 292px; }
  .source-note { font-size: .86rem; }
}

/* AI edit-agent preview */
.agent-body { background: linear-gradient(rgba(255,242,220,.9), rgba(255,242,220,.9)), url('./assets/diner-ticket-texture.jpg') center/520px repeat; }
.agent-shell { max-width: var(--max); margin: 0 auto; padding: 28px 20px 90px; }
.agent-hero {
  display: grid;
  grid-template-columns: 1fr .72fr;
  gap: 22px;
  align-items: stretch;
  padding: clamp(24px,4vw,48px);
  border-radius: var(--radius-lg);
  background: var(--coffee);
  color: var(--cream);
  box-shadow: var(--shadow);
}
.agent-hero h1 { color: var(--cream); max-width: 10ch; }
.agent-hero .lede { color: rgba(255,242,220,.82); }
.agent-status { display: grid; gap: 10px; align-content: center; }
.agent-status span { padding: 14px 16px; border-radius: 18px; background: rgba(255,242,220,.1); border: 1px dashed rgba(255,242,220,.28); font-weight: 700; }
.agent-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-top: 22px; }
.chat-panel, .preview-panel, .site-preview, .audit-panel {
  padding: clamp(20px,3vw,34px);
  border-radius: var(--radius-lg);
  background: rgba(255,248,232,.96);
  border: 2px solid rgba(74,37,23,.2);
  box-shadow: 12px 14px 0 rgba(47,111,120,.1);
}
.chat-panel h2, .preview-panel h2, .audit-panel h2 { font-size: clamp(1.8rem,4vw,3.2rem); }
.chat-log { min-height: 210px; max-height: 330px; overflow: auto; display: grid; gap: 10px; padding: 8px; background: rgba(246,223,189,.38); border-radius: 18px; }
.chat-bubble { max-width: 86%; padding: 12px 14px; border-radius: 16px; line-height: 1.45; }
.chat-bubble.agent { background: var(--blue-dark); color: var(--cream); justify-self: start; }
.chat-bubble.owner { background: var(--red); color: white; justify-self: end; }
.command-form { display: grid; gap: 12px; margin-top: 18px; }
.command-form label { font-weight: 700; }
.command-form textarea { width: 100%; border: 2px solid rgba(74,37,23,.28); border-radius: 18px; padding: 14px; font: inherit; color: var(--ink); background: #fffaf0; resize: vertical; }
.command-form textarea:focus-visible { outline: 3px solid rgba(220,140,45,.45); border-color: var(--red); }
.agent-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.agent-buttons button { cursor: pointer; font: inherit; }
.agent-buttons button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.quick-commands { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.quick-commands button { min-height: 42px; border: 1px dashed rgba(74,37,23,.35); border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,.42); font: inherit; cursor: pointer; }
.quick-commands button:hover, .quick-commands button:focus-visible { background: var(--maple); outline: none; }
.pending-preview { margin: 18px 0; min-height: 170px; padding: 18px; border-radius: 20px; background: white; border: 1px dashed rgba(74,37,23,.28); }
.pending-preview strong { display:block; font-family:'Fraunces'; font-size:1.8rem; color:var(--coffee); }
.pending-preview small { display:inline-block; margin-top:8px; font-weight:700; color:var(--red-dark); }
.pending-preview.empty { color: rgba(36,22,16,.55); display:grid; place-items:center; }
.section-heading.compact { margin: 0 0 18px; }
.site-preview { margin-top: 22px; }
.site-preview-card { display: grid; grid-template-columns: .9fr 1fr 1fr; gap: 14px; }
.preview-mini-hero, .preview-hours, .preview-list { padding: 18px; border-radius: 20px; background: white; border: 1px solid rgba(74,37,23,.14); }
.preview-mini-hero h3 { font-size: clamp(2rem, 4vw, 3.3rem); }
.preview-mini-hero p { line-height:1.5; }
.preview-hours { display:grid; gap:10px; }
.preview-hours div { display:flex; justify-content:space-between; gap:16px; padding-bottom:10px; border-bottom:1px dashed rgba(74,37,23,.22); }
.preview-hours span { color:var(--red-dark); font-weight:700; text-align:right; }
.preview-list { display:grid; gap:10px; }
.preview-list h4 { margin:0; color:var(--coffee); font-size:1.1rem; }
.preview-list article { padding: 12px; border-radius: 14px; background: rgba(246,223,189,.36); }
.preview-list p { margin:6px 0 0; color:rgba(36,22,16,.72); line-height:1.45; }
.audit-panel { margin-top: 22px; }
.audit-log { display:grid; gap:10px; padding-left: 22px; }
.audit-log li { padding: 12px; border-radius: 14px; background: rgba(255,255,255,.6); }
.audit-log span { display:block; color:rgba(36,22,16,.6); font-size:.9rem; }
.audit-log code { white-space: normal; color:var(--red-dark); }
.audit-log .empty { color:rgba(36,22,16,.55); }

@media (max-width: 920px) {
  .agent-hero, .agent-grid, .site-preview-card { grid-template-columns: 1fr; }
  .agent-hero h1 { font-size: clamp(3rem, 14vw, 5.3rem); }
  .preview-hours div { display:grid; }
  .preview-hours span { text-align:left; }
}

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