/* Point and Dot: brand tokens. Only these colours are allowed. */
:root {
  --surface: #FFF4E6;
  --surface-raised: #FFFBF5;
  --ink: #4A2A18;
  --ink-muted: #6B4A38;
  --accent: #D9672B;
  --on-accent: #2A1A10;
  --accent-text: #9C3F12;
  --sand: #F2C48D;
  --on-sand: #4A2A18;   /* ink stays espresso on sand, in both themes */
  --night: #2A1A10;
  --line: #E6CDB0;
  --field-border: #6B4A38; /* ink-muted: 3:1+ for form field edges */

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-hand: "Caveat", "Comic Sans MS", cursive;

  --r-input: 8px;
  --r-card: 16px;
  --r-block: 28px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #2A1A10;
    --surface-raised: #3A2416;
    --ink: #FFF4E6;
    --ink-muted: #C9A98F;
    --accent: #F08A4B;
    --accent-text: #F2C48D;
    --line: #5A3A28;
    --field-border: #C9A98F;
  }
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  overflow-x: hidden;
}

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

h1, h2, h3, .h3 {
  font-family: var(--font-head);
  font-weight: 600;
  margin: 0 0 var(--s4);
  font-variation-settings: "opsz" 72;
}
h1 { font-size: 40px; line-height: 46px; max-width: 14ch; }
h2 { font-size: 28px; line-height: 34px; }
h3, .h3 { font-size: 22px; line-height: 28px; }
p { margin: 0 0 var(--s4); }

@media (min-width: 768px) {
  h1 { font-size: 56px; line-height: 60px; }
  h2 { font-size: 40px; line-height: 46px; }
  h3, .h3 { font-size: 28px; line-height: 34px; }
}

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--s4);
}
@media (min-width: 768px) { .wrap { padding: 0 var(--s6); } }

.skip-link {
  position: absolute; left: var(--s4); top: -100px;
  background: var(--night); color: #FFF4E6;
  padding: var(--s2) var(--s4); border-radius: var(--r-input); z-index: 10;
}
.skip-link:focus { top: var(--s4); }

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

/* Visible placeholder for unfilled config values */
.placeholder {
  background: var(--sand);
  color: var(--on-sand);
  border-radius: 4px;
  padding: 0 var(--s1);
  outline: 1px dashed var(--on-sand);
}

/* Header */
.site-header { position: relative; z-index: 2; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: var(--s4); padding-bottom: var(--s4);
}
.brand { display: inline-block; padding: var(--s2); margin-left: calc(-1 * var(--s2)); border-radius: var(--r-input); }
.brand img { height: 32px; width: auto; }
.header-link {
  font-weight: 700; color: var(--ink); text-decoration: none;
  padding: var(--s2) var(--s4); border-radius: 999px;
  background: var(--surface-raised);
}
.header-link:hover { text-decoration: underline; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: var(--s3) var(--s6);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 700; font-size: 18px; line-height: 24px;
  border: 0; border-radius: 999px;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--sand); color: var(--on-accent); }
.button:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 999px; }
.button[disabled] { cursor: progress; background: var(--sand); }

/* Hero: the one big orange shape lives here (quarter-round, top-right corner) */
.hero {
  position: relative;
  padding: var(--s8) 0 var(--s8);
  margin-top: -80px;           /* sits under the header so the shape reaches the page corner */
  padding-top: calc(80px + 140px);
  overflow: hidden;
}
.hero-shape {
  position: absolute; top: 0; right: 0;
  width: 200px; height: 200px;
  background: var(--accent);
  border-bottom-left-radius: 100%;
}
.hero-inner { position: relative; }
.eyebrow { font-family: var(--font-hand); font-weight: 500; font-size: 24px; line-height: 28px; color: var(--accent-text); margin-bottom: var(--s3); }
.lede { font-size: 18px; line-height: 28px; max-width: 34em; }
.hero .button { margin-top: var(--s3); }

@media (min-width: 768px) {
  .hero { padding-top: calc(80px + var(--s8) + var(--s7)); padding-bottom: var(--s8); }
  .hero-shape { width: 340px; height: 340px; }
  .hero-inner h1, .hero-inner .lede { max-width: 15ch; }
  .hero-inner .lede { max-width: 30em; }
}
@media (min-width: 1100px) {
  .hero { padding-top: calc(80px + var(--s8) + var(--s8)); padding-bottom: calc(var(--s8) + var(--s7)); }
  .hero-shape { width: 480px; height: 480px; }
}

/* Sections */
.section { padding: var(--s7) 0; border-top: 1px solid var(--line); }
@media (min-width: 768px) { .section { padding: var(--s8) 0; } }

.card {
  background: var(--surface-raised);
  border-radius: var(--r-card);
  padding: var(--s5);
}
@media (min-width: 768px) { .card { padding: var(--s6); } }

.two-col { display: grid; gap: var(--s6); }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: var(--s7); align-items: start; } }

/* Steps: a small Dot shape before each step */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s5); counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: 1fr 1fr; gap: var(--s6) var(--s7); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); gap: var(--s6); } }
.steps li { position: relative; padding-top: var(--s6); }
.steps li::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 14px; height: 20px;
  background: var(--accent);
  border-radius: 0 10px 10px 0;   /* the Dot: flat left, round right */
}
.steps h3 { font-size: 22px; line-height: 28px; margin-bottom: var(--s2); }
.steps p { color: var(--ink-muted); margin: 0; }

.who { list-style: none; padding: 0; margin: 0 0 var(--s5); display: flex; flex-wrap: wrap; gap: var(--s2); }
.who li { background: var(--sand); color: var(--on-sand); font-weight: 700; padding: var(--s2) var(--s4); border-radius: 999px; }

.not-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.not-list li { padding-left: var(--s5); position: relative; }
.not-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 12px; height: 12px;
  background: var(--line);
  border-radius: 6px 6px 6px 0;    /* the Point: round, square bottom-left */
}

.rules { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); font-size: 18px; line-height: 28px; max-width: 40em; }
.dot-lead { color: var(--accent-text); font-family: var(--font-head); font-weight: 600; font-size: 1.4em; margin-right: var(--s2); }

.details {
  margin: 0; display: grid; gap: 0;
  background: var(--surface-raised); border-radius: var(--r-card);
  padding: var(--s2) var(--s5);
}
.details > div { padding: var(--s4) 0; border-top: 1px solid var(--line); display: grid; gap: var(--s1); }
.details > div:first-child { border-top: 0; }
.details dt { font-weight: 700; font-size: 12px; line-height: 16px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-muted); }
.details dd { margin: 0; }
@media (min-width: 768px) {
  .details { padding: var(--s2) var(--s6); }
  .details > div { grid-template-columns: 180px 1fr; gap: var(--s5); align-items: baseline; }
}

/* Registration */
.register { scroll-margin-top: var(--s4); }
.register:focus { outline: none; }
.form-panel {
  background: var(--surface-raised);
  border-radius: var(--r-block);
  padding: var(--s5) var(--s4);
  max-width: 820px;
}
@media (min-width: 768px) { .form-panel { padding: var(--s7); } }
.form-panel > .lede { margin-bottom: var(--s6); }

form { margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.part { margin-bottom: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.part > legend { display: contents; }
.part > legend .label { display: block; color: var(--accent-text); margin-bottom: var(--s1); }
.legend-title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 22px; line-height: 28px; margin-bottom: var(--s5); }
@media (min-width: 768px) { .legend-title { font-size: 28px; line-height: 34px; } }
.part-intro { font-family: var(--font-hand); font-size: 24px; line-height: 30px; color: var(--accent-text); margin-bottom: var(--s5); max-width: 30em; }

.grid-2 { display: grid; gap: 0 var(--s5); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.field { margin-bottom: var(--s5); }
.field > label, .chips-field > legend { display: block; margin-bottom: var(--s2); }
.field .label { display: block; color: var(--ink); }
.question { display: block; margin-top: var(--s1); }
.optional { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink-muted); margin-left: var(--s1); }
.chips-field > legend { padding: 0; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--field-border);
  border-radius: var(--r-input);
  padding: var(--s3);
  min-height: 48px;
}
textarea { resize: vertical; min-height: 96px; }
select { appearance: none; -webkit-appearance: none; padding-right: 44px; }
.select { position: relative; }
.select::after {
  content: ""; position: absolute; right: 18px; top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: rotate(45deg); pointer-events: none;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 1px; border-radius: var(--r-input); }
[aria-invalid="true"] { border-color: var(--accent-text); border-width: 2px; }

.hint { color: var(--ink-muted); font-size: 14px; line-height: 20px; margin: var(--s2) 0 0; }
.counter-row { display: flex; justify-content: space-between; gap: var(--s3); }
.counter { font-variant-numeric: tabular-nums; white-space: nowrap; }
.error { color: var(--accent-text); font-weight: 700; font-size: 14px; line-height: 20px; margin: var(--s2) 0 0; }
.error:empty { display: none; }
.error::before { content: ". "; font-family: var(--font-head); }

/* Chips (checkboxes) */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-block;
  padding: var(--s2) var(--s4);
  border: 1.5px solid var(--field-border);
  border-radius: 999px;
  min-height: 44px; line-height: 26px;
}
.chip input:checked + span { background: var(--sand); color: var(--on-sand); border-color: var(--sand); font-weight: 700; }
.chip input:checked + span::before { content: "\2022\00a0"; }
.chip input:focus-visible + span { outline: 3px solid var(--accent-text); outline-offset: 2px; }

.note { background: var(--surface); border-radius: var(--r-card); padding: var(--s4); margin-bottom: var(--s5); }

.consent { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--s3); align-items: start; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent-text); }
.consent .error { margin: 0 0 0 36px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.submit-row { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }

.form-summary, .send-error {
  background: var(--surface); border-left: 6px solid var(--accent);
  border-radius: var(--r-input); padding: var(--s4); margin: 0 0 var(--s5);
}
.send-error { margin: var(--s5) 0 0; }
.form-summary p, .send-error p { margin: 0 0 var(--s2); }
.form-summary p:last-child, .send-error p:last-child { margin: 0; }

/* Thank-you panel */
.thanks h2:focus { outline: none; }
.thanks .hand { font-family: var(--font-hand); font-size: 28px; line-height: 32px; color: var(--accent-text); margin-bottom: var(--s3); }
.thanks .picked { font-size: 20px; line-height: 30px; font-weight: 700; }
.thanks ol { padding-left: var(--s5); margin: 0 0 var(--s5); }
.thanks ol li { margin-bottom: var(--s2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: var(--s7) 0 var(--s8); }
.site-footer img { height: 32px; width: auto; margin-bottom: var(--s3); }
.footer-grid { display: grid; gap: var(--s5); margin-bottom: var(--s6); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.footer-links .label { display: inline-block; min-width: 96px; color: var(--ink-muted); }
.privacy { max-width: 44em; font-size: 14px; line-height: 22px; color: var(--ink-muted); padding-top: var(--s5); border-top: 1px solid var(--line); }
.privacy:focus { outline: none; }
.privacy strong { color: var(--ink); }

/* Dev-only banner (localhost) */
.dev-banner {
  position: relative; z-index: 3;
  margin: var(--s3); background: var(--night); color: #FFF4E6;
  border-radius: var(--r-card); padding: var(--s4);
  font-size: 14px; line-height: 20px;
}
.dev-banner ul { margin: var(--s2) 0; padding-left: var(--s5); }
.dev-banner button { font: inherit; font-weight: 700; background: #F2C48D; color: #2A1A10; border: 0; border-radius: 999px; padding: var(--s1) var(--s4); cursor: pointer; }
.dev-banner button:focus-visible { outline: 3px solid #F2C48D; outline-offset: 2px; }

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