/* ===== Colours and spacing — change these to restyle the whole site ===== */
:root {
  --colour-bg: #fff8ee;
  --colour-card: #ffffff;
  --colour-ink: #1e1b2e;
  --colour-muted: #5b5670;
  --colour-accent: #d6401f;
  --colour-accent-dark: #a92f14;
  --colour-line: #e8dccb;
  --colour-focus: #2b59c3;
  --colour-error: #9b1c1c;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;

  --radius: 14px;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
}

/* ===== Basics (mobile first — wider screens are at the bottom) ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--colour-ink);
  background: var(--colour-bg);
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.15;
}

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

:focus-visible {
  outline: 3px solid var(--colour-focus);
  outline-offset: 3px;
}

/* ===== Header and footer ===== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 60rem;
  margin: 0 auto;
  padding: var(--space-3);
}

.logo {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: inherit;
  text-decoration: none;
}

.site-footer {
  text-align: center;
  color: var(--colour-muted);
  padding: var(--space-4) var(--space-3);
}

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* ===== Buttons — they press down like a key ===== */
.button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--colour-accent);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--colour-accent-dark);
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--colour-accent-dark);
}

.button-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ===== Hero ===== */
.hero {
  padding-block: var(--space-4) var(--space-5);
}

.hero h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(2rem, 7vw, 3.25rem);
}

.highlight {
  color: var(--colour-accent);
}

.photo {
  display: block;
  width: 100%;
  height: auto; /* keeps the shape right when width is squeezed */
  margin-block: var(--space-4);
  border-radius: var(--radius);
}

/* ===== Order form ===== */
.order {
  margin-bottom: var(--space-5);
  padding: var(--space-4) var(--space-3);
  border: 1px solid var(--colour-line);
  border-radius: var(--radius);
  background: var(--colour-card);
}

.order h2 {
  margin-top: 0;
  font-size: 1.75rem;
}

fieldset {
  margin: 0 0 var(--space-4);
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: var(--space-2);
  padding: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.letter-pickers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

label {
  font-weight: 600;
}

select,
input[type="text"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 2px solid var(--colour-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--colour-ink);
  font: inherit;
  font-size: 1.1rem;
}

/* ===== Colour dots ===== */
.swatches {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3) var(--space-2);
}

/* Hide the normal round radio button, but keep it working
   for the keyboard and screen readers (display: none would break that). */
.swatches input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.dot {
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  background: var(--swatch); /* set for each dot by order.js */
}

/* The chosen colour gets a thick ring around it */
.swatches input:checked + .swatch .dot {
  box-shadow: 0 0 0 3px var(--colour-card), 0 0 0 6px var(--colour-ink);
}

.swatches input:checked + .swatch {
  font-weight: 800;
}

.swatches input:focus-visible + .swatch .dot {
  outline: 3px solid var(--colour-focus);
  outline-offset: 7px;
}

/* ===== Summary, pickup and notes ===== */
.summary,
.pickup {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius);
  background: var(--colour-bg);
}

.summary p,
.pickup p {
  margin: 0 0 var(--space-1);
}

.pickup h3 {
  margin: 0 0 var(--space-1);
}

.privacy-note {
  margin-top: 0;
  color: var(--colour-muted);
  font-size: 0.95rem;
}

.notice {
  padding: var(--space-3);
  border-radius: var(--radius);
  background: #fff1c2;
}

/* The spam trap field: moved off screen so people never see it */
.trap {
  position: absolute;
  left: -9999px;
}

/* ===== Thank-you and error pages ===== */
.message {
  max-width: 36rem;
  margin: var(--space-5) auto;
}

.order-number {
  margin: var(--space-2) 0 var(--space-4);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.error-list {
  color: var(--colour-error);
  font-weight: 600;
}

/* ===== Wider screens ===== */
@media (min-width: 40rem) {
  .order {
    padding: var(--space-5);
  }

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