/* ---------------------------------------------------------------------------
   Mayberry marketing site - the app's design tokens, ported to CSS.

   Every value below is lifted from `mayberry/lib/design/tokens.dart` and
   `palette.dart`. The site wears the app's DARK palette, because that is the
   identity the launcher icon and the boot splash already establish: a deep
   teal-black canvas (#162022) with warm gold and teal accents.

   RULE, same as the app: never hardcode a colour, size, radius or family in a
   rule below. Reach for a variable. If a value is missing, add it here.
   --------------------------------------------------------------------------- */

:root {
  /* -- Colour ramps (tokens.dart MColors) -------------------------------- */
  --teal-50: #e6f4f2;
  --teal-100: #c2e5e0;
  --teal-300: #5bb8ad;
  --teal-500: #249689;
  --teal-700: #1b6f66;

  --sage-300: #9caf89;
  --sage-500: #697e5d;

  --gold-100: #f4e2be;
  --gold-300: #d9af5c;
  --gold-500: #ba8d38;

  --coral-500: #e86a4a;

  --neutral-50: #faf9f7;
  --neutral-200: #e5e4e2;
  --neutral-400: #b8b8b5;
  --neutral-500: #8e8e8b;
  --neutral-800: #273132;
  --neutral-900: #162022;

  --abyss: #0b1214;

  /* -- Semantic roles (palette.dart DarkPalette) ------------------------- */
  --bg: var(--neutral-900);
  --surface-sunken: var(--abyss);

  --text: var(--neutral-200);
  --text-secondary: var(--neutral-400);
  --text-muted: var(--neutral-500);
  --text-on-brand: #ffffff;

  --brand: var(--teal-500);
  --accent-gold: var(--gold-500);
  --accent-coral: var(--coral-500);

  /* A TINT separates from the surface by the smallest amount that reads. On a
     dark canvas that gesture is a white wash. Values are the app's exact
     alphas: 0x13, 0x23, 0x3f, 0x80. */
  --tint-07: rgba(255, 255, 255, 0.075);
  --tint-14: rgba(255, 255, 255, 0.137);
  --tint-25: rgba(255, 255, 255, 0.247);
  --tint-50: rgba(255, 255, 255, 0.502);

  /* -- Type (MFonts + MType) -------------------------------------------- */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-eyebrow: "Manrope", system-ui, -apple-system, sans-serif;

  /* -- Spacing (MSpace, a 4pt base scale) -------------------------------- */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-base: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-xxxl: 64px;

  /* -- Radii (MRadius) --------------------------------------------------- */
  --radius-chip: 4px;
  --radius-card: 10px;
  --radius-button: 10px;
  --radius-sheet: 24px;
  --radius-pill: 999px;

  /* -- Motion (MMotion) -------------------------------------------------- */
  --motion-fast: 120ms;
  --motion-base: 220ms;
  --motion-slow: 350ms;
  --motion-reveal: 700ms;
  --motion-drift: 7000ms;
  --ease-standard: cubic-bezier(0.215, 0.61, 0.355, 1); /* easeOutCubic */
  --ease-ambient: ease-in-out;

  /* -- Layout ------------------------------------------------------------ */
  --gutter: var(--space-lg); /* MLayout.pageGutterWide - the immersive voice */
  --measure: 1080px; /* content max width */
  --measure-prose: 720px; /* legal + long-form reading width */
}

/* ---------------------------------------------------------------------------
   Reset + base
   --------------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--motion-fast) var(--ease-standard);
}

a:hover {
  color: var(--teal-300);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
  border-radius: var(--radius-chip);
}

/* ---------------------------------------------------------------------------
   Type scale
   --------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.64px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 var(--space-md);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
}

/* The serif display voice: page titles and hero lines. */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-size: clamp(38px, 7.2vw, 68px);
  color: var(--text);
}

.page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5.5vw, 44px);
  line-height: 1.1;
  margin: 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  margin: 0 0 var(--space-base);
}

/* The gold all-caps heading that opens a section of body content
   (SectionHeadingWidget). Owns its own vertical rhythm, as in the app. */
.section-heading {
  font-family: var(--font-eyebrow);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.64px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 28px 0 10px;
}

.section-heading:first-child {
  margin-top: 0;
}

.lead {
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
  margin: var(--space-lg) 0 0;
  max-width: 46ch;
}

p {
  margin: 0 0 var(--space-base);
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 13px; /* the readable floor - never below this for real copy */
  line-height: 1.45;
}

/* ---------------------------------------------------------------------------
   Layout helpers
   --------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.wrap-prose {
  max-width: var(--measure-prose);
}

section {
  position: relative;
  z-index: 1;
}

/* Bands breathe. A section needs enough air around it that the eye reads it as
   its own thought rather than the next paragraph of the last one. */
.band {
  padding: clamp(80px, 12vw, 152px) 0;
}

.band-tight {
  padding: clamp(48px, 7vw, 88px) 0;
}

.band-sunken {
  background: var(--surface-sunken);
  border-top: 1px solid var(--tint-07);
  border-bottom: 1px solid var(--tint-07);
}

.rule {
  height: 1px;
  background: var(--tint-07);
  border: 0;
  margin: 0;
}

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(22, 32, 34, 0.72); /* MFrost.fillOpacity over --bg */
  backdrop-filter: blur(18px); /* MFrost.sigma */
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--tint-07);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-base);
  min-height: 64px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text);
}

.brand-lockup:hover {
  color: var(--text);
}

.brand-lockup img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.site-nav a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.site-nav a:hover {
  color: var(--text);
}

@media (max-width: 640px) {
  .site-nav {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
   Decorative background shapes (PageBackgroundWidget's vocabulary)

   Slot roles are kept consistent with the app: big teal, coral, gold. They
   drift a few pixels in a slow reversing loop - depth, not motion.
   --------------------------------------------------------------------------- */

.shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: var(--radius-pill);
  animation: drift var(--motion-drift) var(--ease-ambient) infinite alternate;
}

.shape-teal {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -160px;
  background: radial-gradient(
    circle,
    rgba(36, 150, 137, 0.16) 0%,
    rgba(36, 150, 137, 0) 68%
  );
}

.shape-coral {
  width: 300px;
  height: 300px;
  bottom: -90px;
  left: -110px;
  background: radial-gradient(
    circle,
    rgba(232, 106, 74, 0.11) 0%,
    rgba(232, 106, 74, 0) 70%
  );
  animation-delay: -2400ms;
}

.shape-gold-ring {
  width: 180px;
  height: 180px;
  top: 38%;
  left: 6%;
  border: 1px solid rgba(186, 141, 56, 0.16);
  animation-delay: -4200ms;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(3px, -3px, 0);
  }
}

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

.hero {
  position: relative;
  padding: clamp(80px, 13vw, 168px) 0 clamp(64px, 10vw, 128px);
}

.hero .display span {
  display: block;
}

.hero .display .accent {
  color: var(--gold-300);
}

.hero-meta {
  margin-top: var(--space-xxl);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-base);
}

/* ---------------------------------------------------------------------------
   Buttons + pills
   --------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
}

.btn:active {
  transform: scale(0.97); /* PressScale */
}

.btn-primary {
  background: var(--brand);
  color: var(--text-on-brand);
}

.btn-primary:hover {
  background: var(--teal-300);
  color: var(--bg);
}

.btn-quiet {
  background: transparent;
  border-color: var(--tint-14);
  color: var(--text);
}

.btn-quiet:hover {
  border-color: var(--tint-25);
  color: var(--text);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--tint-14);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--brand);
}

.tag-soon {
  display: inline-block;
  margin-left: var(--space-sm);
  padding: 3px 8px;
  border-radius: var(--radius-chip);
  background: rgba(186, 141, 56, 0.14);
  color: var(--gold-300);
  font-family: "Roboto Condensed", var(--font-sans), sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---------------------------------------------------------------------------
   Facts strip
   --------------------------------------------------------------------------- */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xl) var(--space-xxl);
  padding: var(--space-xl) 0;
}

.fact {
  min-width: 160px;
  padding-left: var(--space-base);
  border-left: 2px solid rgba(186, 141, 56, 0.35);
}

.fact-value {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  color: var(--text);
}

.fact-label {
  font-family: var(--font-eyebrow);
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

/* ---------------------------------------------------------------------------
   Steps + cards
   --------------------------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xxl);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 860px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--tint-07);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  transition: border-color var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-standard);
}

.card:hover {
  border-color: var(--tint-25);
  transform: translateY(-2px);
}

.card h3 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 var(--space-md);
  color: var(--text);
}

.card p {
  color: var(--text-secondary);
  margin: 0;
}

.step-number {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--accent-gold);
  border: 1px solid rgba(186, 141, 56, 0.3);
  border-radius: var(--radius-pill);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-base);
}

/* The how-it-works steps: deliberately NOT cards. A hairline and a numbered
   disc, so the boxed feature cards further down read as a different level. */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xxl);
  margin-top: var(--space-xxl);
}

@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

.step {
  border-top: 1px solid var(--tint-14);
  padding-top: var(--space-lg);
}

.step h3 {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 var(--space-md);
  color: var(--text);
}

.step p {
  color: var(--text-secondary);
  margin: 0;
}

/* ---------------------------------------------------------------------------
   Activity chips

   The real activity list the operator runs, straight from the admin's activity
   table. Keep it honest: an activity belongs here once it exists there.
   --------------------------------------------------------------------------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: var(--space-xl) 0 0;
}

.chip {
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--tint-14);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  transition: border-color var(--motion-base) var(--ease-standard),
    color var(--motion-base) var(--ease-standard);
}

.chip:hover {
  border-color: var(--tint-25);
  color: var(--text);
}

/* Dinner and drinks run every week, so they carry the gold. */
.chip-lead {
  border-color: rgba(186, 141, 56, 0.4);
  background: rgba(186, 141, 56, 0.08);
  color: var(--gold-100);
}

.chip-lead:hover {
  border-color: var(--gold-300);
  color: var(--gold-100);
}

/* ---------------------------------------------------------------------------
   Quote / statement band
   --------------------------------------------------------------------------- */

.statement {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.6vw, 34px);
  line-height: 1.3;
  max-width: 24ch;
  margin: 0;
}

.statement-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xxxl);
  align-items: start;
}

.statement-side p {
  color: var(--text-secondary);
  line-height: 1.65;
}

.statement-side p:last-child {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .statement-side {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
}

/* A left-aligned block held to reading width inside a full .wrap. */
.narrow {
  max-width: var(--measure-prose);
}

.narrow p {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.65;
}

.narrow p:last-child {
  margin-bottom: 0;
}

/* The closing band. */
.band-center {
  text-align: center;
}

.close-medallion {
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-pill);
}

.band-center .section-title {
  margin-bottom: var(--space-md);
}

.close-copy {
  color: var(--text-secondary);
  max-width: 44ch;
  margin: 0 auto var(--space-xl);
}

/* ---------------------------------------------------------------------------
   Subpage header (SubpageHeaderWidget: gold breadcrumb, serif title)
   --------------------------------------------------------------------------- */

.subpage-head {
  padding: clamp(40px, 6vw, 72px) 0 0;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-eyebrow);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: var(--space-base);
}

.breadcrumb:hover {
  color: var(--gold-300);
}

.meta-line {
  color: var(--text-muted);
  font-size: 13px;
  margin: var(--space-md) 0 0;
}

.intro {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.6;
  margin: var(--space-lg) 0 0;
}

/* ---------------------------------------------------------------------------
   Legal prose
   --------------------------------------------------------------------------- */

.prose {
  padding: var(--space-xl) 0 var(--space-xxxl);
}

.prose p {
  color: var(--text-secondary);
  line-height: 1.65;
}

.prose h2 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin: var(--space-xl) 0 var(--space-md);
  scroll-margin-top: 88px;
}

.prose ul {
  color: var(--text-secondary);
  line-height: 1.65;
  padding-left: 20px;
  margin: 0 0 var(--space-base);
}

.prose li {
  margin-bottom: var(--space-sm);
}

.prose li::marker {
  color: var(--accent-gold);
}

/* A table of contents for the long legal pages. */
.toc {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--tint-07);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: var(--space-xl);
}

@media (max-width: 640px) {
  .toc ol {
    columns: 1;
  }
}

.toc li {
  margin-bottom: 6px;
  break-inside: avoid;
}

.toc a {
  font-size: 14px;
  color: var(--text-secondary);
}

.toc a:hover {
  color: var(--brand);
}

/* A callout for the things that must not be missed on the deletion page. */
.callout {
  border: 1px solid var(--tint-14);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-card);
  background: rgba(186, 141, 56, 0.06);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

/* A numbered route on the deletion page. */
.route {
  counter-reset: route;
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0 0;
}

.route > li {
  counter-increment: route;
  position: relative;
  padding: var(--space-lg) 0 var(--space-lg) 52px;
  border-top: 1px solid var(--tint-07);
}

.route > li::before {
  content: counter(route);
  position: absolute;
  left: 0;
  top: var(--space-lg);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(186, 141, 56, 0.3);
  color: var(--accent-gold);
  font-family: var(--font-display);
  font-size: 15px;
}

.route h3 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
  color: var(--text);
}

.route p {
  color: var(--text-secondary);
  margin: 0 0 var(--space-sm);
}

.route p:last-child {
  margin-bottom: 0;
}

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

.site-footer {
  border-top: 1px solid var(--tint-07);
  padding: var(--space-xxl) 0;
  background: var(--surface-sunken);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--tint-07);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------------------------------------------------------------------------
   Entrance (design/motion.dart: a one-shot fade + rise, staggered by order)
   --------------------------------------------------------------------------- */

.enter {
  opacity: 0;
  transform: translateY(12px);
  animation: enter var(--motion-reveal) var(--ease-standard) forwards;
}

.enter-1 {
  animation-delay: 60ms;
}
.enter-2 {
  animation-delay: 180ms;
}
.enter-3 {
  animation-delay: 300ms;
}
.enter-4 {
  animation-delay: 420ms;
}

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .enter,
  .shape {
    animation: none;
    opacity: 1;
    transform: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}
