/* ==========================================================================
   Dell's 39th — styles
   Palette and lettering pulled from the flyer: navy + gold ink on off-white paper.
   ========================================================================== */

:root {
  --paper:      #F4F1EA;
  --paper-2:    #EDE8DD;
  --navy:       #1C2B4A;
  --navy-soft:  #2E4370;
  --gold:       #C09B4A;
  --gold-soft:  #D9BC7C;
  --ink:        #16181C;
  --muted:      #6B6B78;
  --line:       rgba(28, 43, 74, .16);
  --shadow:     0 2px 0 rgba(28,43,74,.10), 0 12px 28px -14px rgba(28,43,74,.34);

  --f-display:  "Permanent Marker", "Bradley Hand", cursive;
  --f-script:   "Kaushan Script", "Snell Roundhand", cursive;
  --f-hand:     "Caveat", "Bradley Hand", cursive;
  --f-body:     "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap:       1120px;
  --radius:     14px;
}

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

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

body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background-color: var(--paper);
  /* paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  line-height: 1.6;
  overflow-x: hidden;
}

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

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 640px); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* --------------------------------------------------------------------------
   Drifting doodle background
   -------------------------------------------------------------------------- */

.doodles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
/* Traced from the flyer, so the colors are baked into the files — these are
   <img> elements and external CSS can't reach inside them. Filled shapes read
   heavier than the old thin strokes, hence the lower opacity. */
.doodle {
  position: absolute; width: 110px; height: auto; opacity: .13;
  will-change: transform;
  animation: drift 22s ease-in-out infinite alternate;
}

.d1 { top:  5%; left:  4%; width:  74px; animation-duration: 19s; }
.d2 { top: 17%; right: 5%; width:  66px; animation-duration: 25s; animation-delay: -4s; }
.d3 { top: 37%; left:  6%; width:  70px; animation-duration: 23s; animation-delay: -9s; }
.d4 { top: 53%; right: 6%; width: 104px; animation-duration: 27s; animation-delay: -2s; }
.d5 { top: 71%; left:  5%; width:  62px; animation-duration: 21s; animation-delay: -13s; }
.d6 { top: 85%; right: 8%; width: 100px; animation-duration: 24s; animation-delay: -6s; }
.d7 { top: 29%; right:14%; width:  96px; animation-duration: 26s; animation-delay: -16s; }
.d8 { top: 63%; left: 12%; width:  56px; animation-duration: 20s; animation-delay: -11s; }
.d9 { top: 45%; right:20%; width:  62px; animation-duration: 22s; animation-delay: -7s; }

@keyframes drift {
  from { transform: translate3d(0,0,0) rotate(-6deg); }
  to   { transform: translate3d(14px,-22px,0) rotate(7deg); }
}

/* Doodles are decoration — hide the crowded ones on small screens. */
@media (max-width: 760px) {
  .d3, .d4, .d7, .d8, .d9 { display: none; }
  .doodle { opacity: .12; width: 64px !important; }
}

#confetti {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 60; display: none;
}

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */

/* Scoped to .js-reveal, which main.js adds only once the observer is wired up.
   If JS is off or throws first, the content simply stays visible. */
.js-reveal .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { position: relative; z-index: 1; padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }

.hero-inner {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
/* Grid items default to min-width:auto, which lets wide content (the flyer,
   the long address line) push past the viewport. */
.hero-inner > * { min-width: 0; }

.eyebrow {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--f-hand); font-size: 1.5rem; color: var(--navy);
  margin: 0 0 .5rem; letter-spacing: .02em;
}
/* Traced crowns from the flyer; gold is baked into the file. */
.crown { width: 26px; height: auto; }

h1 { margin: 0 0 1.25rem; line-height: .96; }
h1 span { display: block; }
.line-1 {
  font-family: var(--f-display); color: var(--navy);
  font-size: clamp(2rem, 6.2vw, 3.6rem); letter-spacing: .01em;
}
.line-2 {
  font-family: var(--f-script); color: var(--gold);
  font-size: clamp(3.4rem, 12vw, 7rem); line-height: .9;
  margin: .1em 0 .06em; transform: rotate(-2deg); transform-origin: left center;
}
.line-3 {
  font-family: var(--f-display); color: var(--navy);
  font-size: clamp(1.4rem, 4.2vw, 2.4rem);
}

.hero-meta {
  font-family: var(--f-display); color: var(--navy);
  font-size: clamp(.95rem, 2.3vw, 1.35rem); margin: 0 0 .4rem;
  overflow-wrap: break-word; line-height: 1.45;
}
.hero-meta .sep { color: var(--gold); margin: 0 .45rem; }
.hero-sub { font-family: var(--f-hand); font-size: 1.45rem; color: var(--navy-soft); margin: 0 0 1.6rem; }

.hero-art img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
  border: 1px solid var(--line);
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; width: 100%; max-width: 420px; margin-inline: auto; }
  .hero-art img { transform: none; width: 100%; max-height: 58vh; object-fit: contain; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
  --btn-bg: var(--navy); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.5rem;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--f-body); font-weight: 600; font-size: 1rem;
  border: 2px solid var(--navy); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 3px 0 rgba(28,43,74,.25);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(28,43,74,.22); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(28,43,74,.25); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { --btn-bg: var(--navy); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--navy); box-shadow: none; }
.btn-ghost:hover { --btn-bg: rgba(28,43,74,.07); box-shadow: none; }
.btn-small { min-height: 40px; padding: .45rem 1rem; font-size: .9rem; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { position: relative; z-index: 1; padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section-alt { background: rgba(237,232,221,.72); }

.section-title {
  position: relative; display: inline-block;
  font-family: var(--f-display); color: var(--navy);
  font-size: clamp(1.75rem, 4.6vw, 2.75rem);
  margin: 0 0 .35rem;
}
.underline {
  display: block; height: 10px; margin-top: .15rem;
  background: no-repeat center/100% 100%
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 Q50 1 100 5 T198 4' stroke='%23C09B4A' stroke-width='3.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  transform: scaleX(0); transform-origin: left; transition: transform .8s cubic-bezier(.2,.7,.3,1) .15s;
}
.is-in .underline, .reveal.is-in .underline { transform: scaleX(1); }

.section-lead { font-family: var(--f-hand); font-size: 1.35rem; color: var(--navy-soft); margin: 0 0 2rem; }

/* --------------------------------------------------------------------------
   Cards / details
   -------------------------------------------------------------------------- */

.card {
  background: #FCFAF5; border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { font-family: var(--f-display); color: var(--navy); font-size: 1.25rem; margin: 0 0 .75rem; }
.card .big { font-size: 1.2rem; font-weight: 600; margin: 0 0 .2rem; color: var(--ink); }
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.note { font-family: var(--f-hand); font-size: 1.15rem; color: var(--navy-soft); margin: 1rem 0 0; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }

.tick-list { list-style: none; padding: 0; margin: 0; }
.tick-list li { position: relative; padding-left: 1.75rem; margin-bottom: .6rem; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 15px; height: 11px;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath d='M1 6 L6 11 L15 1' stroke='%23C09B4A' stroke-width='2.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Stats + board
   -------------------------------------------------------------------------- */

.stats { display: flex; flex-wrap: wrap; gap: 2.25rem; margin: 0 0 2rem; }
.stat { display: flex; flex-direction: column; }
/* Body font, not the marker face — Permanent Marker's "1" is a thin slash
   that reads as a stray mark at this size. */
.stat-num { font-family: var(--f-body); font-weight: 700; font-size: 2.3rem; color: var(--gold); line-height: 1.05; letter-spacing: -.01em; }
.stat-label { font-family: var(--f-hand); font-size: 1.15rem; color: var(--navy-soft); }

.board-status { font-family: var(--f-hand); font-size: 1.2rem; color: var(--navy-soft); margin-bottom: 1rem; }
.board-status[hidden] { display: none; }

.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }

.cat-card {
  background: #FCFAF5; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.35rem; box-shadow: var(--shadow);
}
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .85rem; }
.cat-name { font-family: var(--f-display); color: var(--navy); font-size: 1.05rem; margin: 0; }
.cat-open { font-family: var(--f-hand); font-size: 1.05rem; color: var(--gold); white-space: nowrap; }
.cat-open.full { color: var(--navy-soft); }

.slot-list { list-style: none; margin: 0; padding: 0; }
.slot {
  padding: .6rem 0; border-top: 1px dashed var(--line);
}
.slot:first-child { border-top: none; }
.slot-dish { font-weight: 600; }
.slot-who { font-family: var(--f-hand); font-size: 1.1rem; color: var(--navy-soft); }
.slot-tags { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--navy); background: rgba(192,155,74,.2); border-radius: 999px; padding: .1rem .55rem; margin-left: .4rem; }
.slot-warm { font-size: .78rem; color: var(--navy-soft); }

.slot-open {
  border: 1.5px dashed rgba(192,155,74,.65); border-radius: 10px;
  padding: .55rem .75rem; margin-top: .5rem;
  font-family: var(--f-hand); font-size: 1.1rem; color: var(--gold);
  text-align: center;
}

.skeleton { min-height: 140px; }
.skeleton .bar { height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(28,43,74,.07), rgba(28,43,74,.14), rgba(28,43,74,.07)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; margin-bottom: .7rem; }
.skeleton .bar.w60 { width: 60%; } .skeleton .bar.w80 { width: 80%; } .skeleton .bar.w40 { width: 40%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.host-block { margin-top: 1.75rem; }
.host-block summary { font-family: var(--f-display); color: var(--navy); cursor: pointer; font-size: 1.05rem; }
.host-block ul { font-family: var(--f-body); margin: .75rem 0 0; padding-left: 1.25rem; }
.host-block li { margin-bottom: .3rem; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

label { font-weight: 600; font-size: .95rem; color: var(--navy); }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.hint { font-size: .85rem; color: var(--muted); margin: .15rem 0 0; }

input[type="text"], input[type="number"], select, textarea {
  font-family: var(--f-body); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px;
  padding: .7rem .85rem; min-height: 48px; width: 100%;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #B3382F; }

.field-check { display: flex; align-items: center; gap: .6rem; }
.field-check input { width: 22px; height: 22px; min-height: 0; accent-color: var(--navy); }
.field-check label { font-weight: 500; }

/* honeypot — off-screen, never shown, never announced */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-family: var(--f-hand); font-size: 1.2rem; margin: .25rem 0 0; min-height: 1.5em; }
.form-status.ok { color: #1F7A4C; }
.form-status.err { color: #B3382F; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer { position: relative; z-index: 1; text-align: center; padding: 3.5rem 0 4rem; border-top: 1.5px solid var(--line); }
.big-crown { width: 46px; height: auto; margin: 0 auto .5rem; display: block; }
.footer-line { font-family: var(--f-display); font-size: clamp(1.5rem, 4vw, 2.1rem); color: var(--navy); margin: 0 0 .4rem; }
.footer-sub { font-family: var(--f-hand); font-size: 1.15rem; color: var(--navy-soft); margin: 0; }
.footer-sub a { color: var(--navy); }
#contact-line { display: block; }

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

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