/* Touchline Prints
   One structural idea: a painted touchline runs down the left edge of every page,
   and all content lines up against it. */

/* Interface fonts are small WOFF2 subsets. The full TTF files in the same folder are for the print engine. */
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/BarlowCondensed-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/BarlowCondensed-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ink: #152238;
  --ink-soft: #4d5a6e;
  --paper: #f3f6f4;
  --chalk: #ffffff;
  --grass: #1e7b4f;
  --grass-deep: #17603e;
  --bib: #ffd034;
  --bib-deep: #e8b800;
  --rule: #d3dcd6;
  --warn: #a4261d;
  --gutter: 26px;
  --wrap: 1180px;
  --pad: clamp(18px, 4vw, 44px);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  padding-left: var(--gutter);
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
}
/* the touchline */
body::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--gutter);
  z-index: 50;
  background: linear-gradient(to right, var(--grass) 0, var(--grass) calc(100% - 11px), #fff calc(100% - 11px), #fff calc(100% - 6px), var(--grass) calc(100% - 6px));
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.on-grass :focus-visible { outline-color: #fff; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 0.98; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.9rem, 7.4vw, 5.6rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h3 { font-size: 1.6rem; line-height: 1.05; }
p { margin: 0 0 1em; max-width: 62ch; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.lede { font-size: 1.25rem; line-height: 1.45; }
.quiet { color: var(--ink-soft); }
.small { font-size: 0.92rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- header ---- */
.masthead { background: var(--chalk); border-bottom: 1px solid var(--rule); }
.masthead .wrap { display: flex; align-items: center; gap: 1.2rem; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap; font: 800 1.55rem/1 var(--display); text-decoration: none; margin-right: auto; }
.brand svg { width: 26px; height: 30px; flex: none; }
.masthead nav { display: flex; gap: 1.3rem; align-items: center; }
.masthead nav a { font-weight: 600; text-decoration: none; white-space: nowrap; padding: 0.4rem 0; border-bottom: 2px solid transparent; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { border-bottom-color: var(--ink); }
@media (max-width: 640px) {
  :root { --gutter: 12px; }
  body::before { background: linear-gradient(to right, var(--grass) 0, var(--grass) 4px, #fff 4px, #fff 8px, var(--grass) 8px); }
  .masthead nav a.optional.help, .masthead nav .btn { display: none; }
  .masthead nav { gap: 1rem; }
  .brand { font-size: 1.35rem; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); padding-bottom: 0.5rem; scrollbar-width: none; }
  .tabs a { flex: none; }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 1.05rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  padding: 0.85rem 1.35rem; border-radius: 10px; border: 2px solid var(--ink);
  background: var(--bib); color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { background: var(--bib-deep); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn.plain { background: var(--chalk); }
.btn.plain:hover { background: #eef2ef; }
.btn.wide { width: 100%; }
.btn.small { padding: 0.5rem 0.85rem; font-size: 0.95rem; box-shadow: 0 2px 0 var(--ink); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

/* ---- hero ---- */
.hero {
  color: #fff;
  background: repeating-linear-gradient(to bottom, #1d6a43 0 120px, #227549 120px 240px);
  margin-left: calc(-1 * var(--gutter)); padding-left: var(--gutter);
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(2.2rem, 6vw, 4.6rem); }
.hero h1 { text-wrap: balance; }
.hero .lede { margin-top: 1.1rem; max-width: 34ch; color: #e6f2ea; }
.hero-form { margin-top: 1.6rem; display: grid; gap: 0.9rem; max-width: 30rem; }
.hero-form .row { display: grid; grid-template-columns: 1fr 5.5rem; gap: 0.7rem; }
.hero-form label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.95rem; }
.hero-form input[type="text"] { font: 600 1.25rem/1.2 var(--body); padding: 0.7rem 0.8rem; border-radius: 10px; border: 2px solid #fff; background: rgba(255, 255, 255, 0.96); color: var(--ink); width: 100%; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1.2rem; align-items: center; margin-top: 0.4rem; }
.hero-actions a:not(.btn) { color: #fff; font-weight: 600; }
.hero-print { justify-self: center; width: min(100%, 25rem); }
.print-frame { background: #fff; padding: 10px; border-radius: 4px; box-shadow: 0 22px 40px -18px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.18); }
.print-frame svg, .print-frame img { display: block; width: 100%; height: auto; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.swatch { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 2px solid #fff; padding: 0; cursor: pointer; box-shadow: 0 0 0 1px rgba(21, 34, 56, 0.35); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px #fff; }
.on-grass .swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bib); }
@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-print { order: -1; width: min(56%, 15rem); }
}

/* ---- sections ---- */
.band { padding-block: clamp(2.6rem, 7vw, 5rem); }
.band + .band { border-top: 1px solid var(--rule); }
.band.chalk { background: var(--chalk); }
.band > .wrap > h2 { max-width: 16ch; margin-bottom: 0.9rem; text-wrap: balance; }
.band > .wrap > h2 + p { margin-bottom: 2rem; }

/* the wall of prints: each print keeps its own shape and size */
.wall { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2.4rem) clamp(1rem, 2.4vw, 2rem); align-items: end; }
.wall article { grid-column: span 4; }
.wall article.landscape { grid-column: span 6; }
.wall .print-frame { transition: transform 0.15s ease; }
.wall a.print-link:hover .print-frame { transform: translateY(-4px); }
.wall h3 { margin-top: 1rem; }
.wall p { margin: 0.35rem 0 0.6rem; color: var(--ink-soft); }
.wall .price { font-weight: 600; }
@media (max-width: 760px) {
  .wall article, .wall article.landscape { grid-column: span 12; }
  .wall article:not(.landscape) .print-frame { max-width: 19rem; }
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 4px solid var(--ink); padding-top: 0.8rem; }
.steps li::before { content: counter(step); font: 800 2.6rem/1 var(--display); display: block; margin-bottom: 0.4rem; color: var(--grass); }
.steps h3 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.steps p { margin: 0; color: var(--ink-soft); }
@media (max-width: 820px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }

.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.pack { background: var(--chalk); border: 2px solid var(--ink); border-radius: 14px; padding: 1.5rem 1.5rem 1.6rem; display: flex; flex-direction: column; }
.pack.grass { background: var(--grass-deep); color: #fff; border-color: var(--grass-deep); }
.pack .cost { font: 800 3.2rem/1 var(--display); margin: 0.5rem 0 0.2rem; }
.pack ul { margin: 0.6rem 0 1.3rem; padding-left: 1.1rem; }
.pack li { margin-bottom: 0.3rem; }
.pack .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 720px) { .packs { grid-template-columns: 1fr; } }

.prices { border-collapse: collapse; width: 100%; max-width: 54rem; margin: 1.2rem 0 1rem; }
.prices th, .prices td { text-align: left; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prices thead th { font-size: 0.92rem; color: var(--ink-soft); font-weight: 600; border-bottom: 2px solid var(--ink); }
.prices tbody th { font-weight: 600; white-space: nowrap; }
.prices td:last-child, .prices thead th:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-right: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .prices td:nth-child(2), .prices thead th:nth-child(2) { display: none; } }
.wall h3 a { text-decoration: none; }
.wall h3 a:hover { text-decoration: underline; }

.faq { max-width: 50rem; }
.faq details { border-top: 1px solid var(--rule); padding: 0.2rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font: 600 1.15rem/1.3 var(--body); padding: 0.9rem 2rem 0.9rem 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.3rem; top: 0.7rem; font: 600 1.5rem/1 var(--body); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > *:not(summary) { margin-top: 0; }

.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 1.2rem; }
.prose h2 { font-size: 1.9rem; margin: 2.2rem 0 0.7rem; }
.prose ul, .prose ol { padding-left: 1.2rem; max-width: 62ch; }
.prose li { margin-bottom: 0.4rem; }

.foot { background: var(--ink); color: #dbe2ee; margin-left: calc(-1 * var(--gutter)); padding-left: var(--gutter); }
.foot .wrap { padding-block: 2.4rem 2.8rem; display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 2rem; }
.foot h2 { font: 600 1rem/1.3 var(--body); color: #fff; margin-bottom: 0.6rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.35rem; }
.foot p { font-size: 0.92rem; color: #b5c0d2; }
@media (max-width: 860px) { .foot .wrap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot .wrap { grid-template-columns: 1fr; } }

/* ---- studio ---- */
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; padding-block: 1rem 0; }
.tabs a { text-decoration: none; font-weight: 600; padding: 0.5rem 0.9rem; border: 2px solid var(--ink); border-radius: 999px; background: var(--chalk); font-size: 0.98rem; }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
.studio { display: grid; grid-template-columns: minmax(0, 25rem) minmax(0, 1fr); gap: clamp(1.4rem, 3.5vw, 3rem); align-items: start; padding-block: 1.4rem 4rem; }
.studio h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); margin-bottom: 0.4rem; }
.stage { position: sticky; top: 1rem; display: grid; gap: 1.1rem; }
.stage .print-frame { margin-inline: auto; width: 100%; }
.stage.portrait .print-frame { max-width: min(100%, calc((100vh - 11rem) * 0.707)); min-width: 15rem; }
.stage .print-frame svg { user-select: none; -webkit-user-select: none; }
#preview [data-part] { cursor: grab; touch-action: none; }
#preview [data-part]:active { cursor: grabbing; }
#preview .part-hit { fill: transparent; pointer-events: all; }
#preview .part-outline { fill: none; stroke: #ffd034; stroke-width: 3px; stroke-dasharray: 9 6; vector-effect: non-scaling-stroke; pointer-events: none; paint-order: stroke; filter: drop-shadow(0 0 1px #152238); }
#preview:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
#layout-bar { margin: 0; text-align: center; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: #fffbea; }
.buy { margin-top: 0.4rem; scroll-margin-top: 1rem; background: var(--chalk); border: 2px solid var(--ink); border-radius: 14px; padding: 1.1rem 1.2rem 1.2rem; }
.buy h2 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.buy .options { display: grid; gap: 0.5rem; margin-bottom: 0.9rem; }
.buy .option { display: grid; grid-template-columns: auto 1fr auto; gap: 0.2rem 0.7rem; align-items: start; padding: 0.65rem 0.75rem; border: 2px solid var(--rule); border-radius: 10px; cursor: pointer; }
.buy .option:has(input:checked) { border-color: var(--ink); background: #fffbea; }
.buy .option input { margin-top: 0.3rem; accent-color: var(--ink); }
.buy .option strong { font-weight: 600; }
.buy .option .what { grid-column: 2; font-size: 0.9rem; color: var(--ink-soft); }
.buy .option .cost { font-weight: 600; grid-row: 1; grid-column: 3; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; font-size: 0.92rem; margin-bottom: 0.9rem; align-items: start; }
.consent input { margin-top: 0.25rem; width: 1.15rem; height: 1.15rem; accent-color: var(--ink); }
.buy .after { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 0.9rem; font-size: 0.92rem; }
.notice { border-left: 5px solid var(--grass); background: #e9f3ed; padding: 0.7rem 0.9rem; border-radius: 0 8px 8px 0; margin: 0 0 0.9rem; font-size: 0.97rem; }
.notice.error { border-left-color: var(--warn); background: #fbeceb; }
.downloads { display: grid; gap: 0.7rem; }
.downloads .row { display: grid; grid-template-columns: 1fr auto; gap: 0.6rem; }
@media (max-width: 860px) {
  .studio { grid-template-columns: 1fr; }
  .stage { position: sticky; top: 0; order: -1; z-index: 5; background: var(--paper); padding-block: 0.6rem; margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad); border-bottom: 1px solid var(--rule); }
  .stage.portrait .print-frame { max-width: min(13.5rem, 46vw); min-width: 0; }
  .stage.landscape .print-frame { max-width: min(24rem, 100%); }
  .stage .print-frame { padding: 5px; }
  .stage .team-previews { max-height: 38vh; overflow: auto; }
}

.form fieldset { border: 0; padding: 0; margin: 0 0 1.4rem; min-width: 0; }
.form legend { font: 800 1.35rem/1.1 var(--display); padding: 0; margin-bottom: 0.7rem; }
.field { display: grid; gap: 0.3rem; margin-bottom: 0.85rem; }
.field > label, .field > .label { font-weight: 600; font-size: 0.97rem; }
.field .help { font-size: 0.87rem; color: var(--ink-soft); margin: 0; }
.field input[type="text"], .field input[type="number"], .field textarea, .field select {
  font: 400 1.05rem/1.3 var(--body); color: var(--ink); background: var(--chalk);
  border: 2px solid #9aa7b5; border-radius: 9px; padding: 0.6rem 0.7rem; width: 100%; min-width: 0;
}
.field textarea { resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink); outline: 3px solid rgba(255, 208, 52, 0.75); outline-offset: 0; }
.field.toggle { grid-template-columns: auto 1fr; align-items: center; gap: 0.6rem; }
.field.toggle input { width: 1.2rem; height: 1.2rem; accent-color: var(--ink); }
.field.colour .pick { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.field.colour input[type="color"] { width: 2.6rem; height: 2.3rem; padding: 0; border: 2px solid #9aa7b5; border-radius: 8px; background: none; cursor: pointer; }
.field.colour .swatch { width: 1.75rem; height: 1.75rem; }
.field.stat { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 2.2rem; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.field.stat output { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.field input[type="range"] { width: 100%; accent-color: var(--ink); }
.field.range { grid-template-columns: 1fr 2.4rem; align-items: center; }
.field.range > label { grid-column: 1 / -1; }
.field.range output { font-weight: 600; text-align: right; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.chip { font: 600 0.92rem/1.2 var(--body); padding: 0.42rem 0.75rem; border-radius: 999px; border: 2px solid var(--rule); background: var(--chalk); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.chip:hover { border-color: var(--ink); }
.chip .dots { display: inline-flex; }
.chip .dots i { width: 0.8rem; height: 0.8rem; border-radius: 50%; border: 1px solid rgba(21, 34, 56, 0.4); margin-left: -0.2rem; }
.chip .dots i:first-child { margin-left: 0; }
.photo-row { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.photo-row img { width: 3.4rem; height: 3.7rem; object-fit: cover; border-radius: 8px; border: 2px solid var(--ink); }

/* ---- team pack ---- */
.team-previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; align-items: start; max-width: 40rem; }
.team-previews figure { margin: 0; }
.team-previews figcaption { font-size: 0.86rem; color: var(--ink-soft); margin-top: 0.35rem; }
.team-previews .wide { grid-column: span 2; }
.progress { height: 10px; border-radius: 5px; background: var(--rule); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--grass); transition: width 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print { body::before, .masthead, .foot { display: none; } body { padding: 0; } }
