/* ==========================================================================
   ClickMenu — clickmenu.co.uk brochure site
   Plain CSS, no build step. Edit tokens in :root to restyle the whole page.
   Section rules below are ordered to match the HTML comments in index.html.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --ink: #16181c;
  --ink-raised: #202329;      /* card / raised surface on ink bands */
  --paper: #f3ecdd;           /* warm paper, not stark white */
  --paper-raised: #e8ddc7;    /* card / raised surface on paper bands */
  --red: #e11d2a;
  --red-dark: #ad1420;
  --white: #ffffff;

  /* Text */
  --on-ink: #f6f4ef;
  --on-ink-muted: #a9adb5;
  --on-paper: var(--ink);
  --on-paper-muted: #615b4e;

  /* Type */
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --wrap-width: 72rem;
  --wrap-pad: clamp(1.25rem, 5vw, 3rem);
  --band-pad: clamp(3.5rem, 9vw, 7.5rem);
  --radius: 6px;
}

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

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

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--on-paper);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

code {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.band-ink code { background: rgba(246, 244, 239, 0.1); color: var(--on-ink); }
.band-paper code { background: rgba(22, 24, 28, 0.07); color: var(--on-paper); }

a { color: inherit; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--white);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 1rem; }

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

.band-ink :focus-visible { outline-color: var(--white); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--wrap-width);
  margin-inline: auto;
  padding-inline: var(--wrap-pad);
}

.band {
  position: relative;
  overflow: hidden; /* crops the off-canvas slice motifs — no horizontal scroll */
  padding-block: var(--band-pad);
}

.band-ink { background: var(--ink); color: var(--on-ink); }
.band-paper { background: var(--paper); color: var(--on-paper); }

.section-heading {
  font-size: clamp(1.9rem, 3.4vw + 1rem, 3.4rem);
  line-height: 1.08;
  max-width: 26ch;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  padding: 0.95rem 1.9rem;
  border-radius: 3px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-cta {
  background: var(--red);
  color: var(--white);
}

.btn-cta:hover { background: var(--red-dark); }
.btn-cta:active { transform: translateY(1px); }

/* ---------- Decorative slice motif ----------
   brand/clickmenu-slice.svg, cropped/rotated/oversized via CSS only.
   Purely decorative: aria-hidden, no alt text, no pointer events. */
.slice-motif {
  position: absolute;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.slice-motif img { width: 100%; height: auto; display: block; }

.slice-motif--hero {
  top: -16%;
  right: -22%;
  width: 60%;
  max-width: 46rem;
  transform: rotate(-9deg);
  opacity: 0.9;
}

.slice-motif--domain {
  bottom: -30%;
  left: -18%;
  width: 42%;
  max-width: 30rem;
  transform: rotate(162deg);
  opacity: 0.5;
}

.slice-motif--pricing {
  top: -12%;
  right: -14%;
  width: 34%;
  max-width: 16rem;
  transform: rotate(21deg);
  opacity: 0.16;
  filter: grayscale(1) contrast(1.15);
}

/* Desktop art direction: each slice usage becomes a deliberate oversized crop,
   at least 40% off-canvas, clipped by the band's overflow. The hero keeps the
   full-colour statement; the domain band echoes it as a ghosted ink duotone. */
@media (min-width: 1024px) {
  .slice-motif--hero {
    top: -14%;
    right: -13%;
    width: min(58vw, 880px);
    max-width: none;
    transform: rotate(-14deg);
    opacity: 1;
  }

  .slice-motif--domain {
    left: auto;
    right: -12%;
    bottom: -34%;
    width: min(46vw, 720px);
    max-width: none;
    transform: rotate(14deg);
    opacity: 0.22;
    filter: grayscale(1) brightness(1.9);
  }

  .slice-motif--pricing {
    top: -16%;
    right: -18%;
    width: 44%;
    max-width: 19rem;
  }
}

/* ---------- Scroll reveal (progressive enhancement) ----------
   Without JS, or with prefers-reduced-motion, content is simply visible. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

.js-reveal .features-grid .feature-card:nth-child(2) { transition-delay: 0.06s; }
.js-reveal .features-grid .feature-card:nth-child(3) { transition-delay: 0.12s; }
.js-reveal .features-grid .feature-card:nth-child(5) { transition-delay: 0.06s; }
.js-reveal .features-grid .feature-card:nth-child(6) { transition-delay: 0.12s; }
.js-reveal .features-grid .feature-card:nth-child(8) { transition-delay: 0.06s; }
.js-reveal .features-grid .feature-card:nth-child(9) { transition-delay: 0.12s; }
.js-reveal .steps-item:nth-child(2) { transition-delay: 0.08s; }
.js-reveal .steps-item:nth-child(3) { transition-delay: 0.16s; }

/* ==========================================================================
   SECTION: hero
   ========================================================================== */
.hero { padding-block: clamp(4rem, 11vw, 8.5rem); }

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-logo { margin-bottom: clamp(2.5rem, 7vw, 4.5rem); }

.hero-heading {
  font-size: clamp(2.75rem, 6.4vw + 1rem, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 18ch;
}

.hero-sub {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.1vw + 0.7rem, 1.25rem);
  color: var(--on-ink-muted);
}

.hero .btn-cta { margin-top: clamp(2rem, 4vw, 2.75rem); }

/* ==========================================================================
   SECTION: maths
   ========================================================================== */
.maths .section-heading { margin-bottom: 1.25rem; }

.maths-lead {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  font-size: clamp(1.05rem, 1.1vw + 0.7rem, 1.25rem);
  color: var(--on-paper-muted);
}

.maths-eyebrow {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(1rem, 0.8vw + 0.75rem, 1.25rem);
  color: var(--red);
  margin-bottom: 1.5rem;
}

.maths-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  background: var(--paper-raised);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 4rem);
}

.maths-item { display: flex; flex-direction: column; gap: 0.6rem; }
.maths-item--us { align-items: flex-start; }

.maths-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--on-paper-muted);
}

.maths-figure {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.25rem, 6vw, 5.75rem);
  line-height: 1;
  text-decoration: line-through;
  text-decoration-color: var(--on-paper-muted);
  text-decoration-thickness: 2px;
  color: var(--on-paper-muted);
}

.maths-figure--red {
  color: var(--red);
  text-decoration: none;
}

.maths-caption {
  font-size: 0.95rem;
  color: var(--on-paper-muted);
}

.maths-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(22, 24, 28, 0.18);
}

@media (max-width: 640px) {
  .maths-row { grid-template-columns: 1fr; }
  .maths-divider { width: 100%; height: 1px; }
}

.maths-stats {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.maths-stat {
  background: var(--paper-raised);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.maths-stat-figure {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.5rem, 2vw + 0.85rem, 2rem);
  color: var(--red);
  margin-bottom: 0.5rem;
}

.maths-stat-label {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--on-paper-muted);
}

@media (min-width: 1100px) {
  .maths-stats { grid-template-columns: repeat(4, 1fr); }
}

.maths-footnote {
  margin-top: clamp(1.5rem, 3vw, 2rem);
  max-width: 58rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--on-paper-muted);
}

/* ==========================================================================
   SECTION: how-it-works
   ========================================================================== */
.steps-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 2.5rem);
}

.steps-item {
  border-top: 2px solid rgba(246, 244, 239, 0.18);
  padding-top: 1.75rem;
}

.steps-number {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--red);
  margin-bottom: 0.9rem;
}

.steps-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.steps-desc {
  margin-top: 0.65rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--on-ink-muted);
}

@media (max-width: 800px) {
  .steps-list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   SECTION: features
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-card {
  background: var(--paper-raised);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
}

.feature-icon {
  width: 26px;
  height: 26px;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 1.1rem;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-copy {
  font-size: 0.98rem;
  color: var(--on-paper-muted);
  line-height: 1.5;
}

@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   SECTION: own-domain
   ========================================================================== */
.own-domain-inner { position: relative; z-index: 1; max-width: 42rem; }

.own-domain-copy {
  font-size: clamp(1.15rem, 1.6vw + 0.7rem, 1.5rem);
  line-height: 1.5;
  color: var(--on-ink-muted);
}

/* ==========================================================================
   SECTION: pricing
   ========================================================================== */
.pricing-card {
  position: relative;
  overflow: hidden;
  max-width: 34rem;
  margin-inline: auto;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 10px;
  border-top: 4px solid var(--red);
  padding: clamp(2rem, 6vw, 3.25rem);
}

.pricing-kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--red);
  position: relative;
  z-index: 1;
}

.pricing-name {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.25rem);
  margin-top: 0.75rem;
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
}

.pricing-figures {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3rem);
  color: var(--white);
  position: relative;
  z-index: 1;
}

.pricing-unit {
  font-size: 1rem;
  font-weight: 400;
  color: var(--on-ink-muted);
  margin-left: 0.2rem;
}

.pricing-sub {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--on-ink-muted);
  position: relative;
  z-index: 1;
}

.pricing-list {
  margin-top: 2rem;
  margin-bottom: 2.25rem;
  display: grid;
  gap: 0.7rem;
  position: relative;
  z-index: 1;
}

.pricing-list li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--on-ink-muted);
  font-size: 0.98rem;
}

.pricing-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

.pricing-card .btn-cta { position: relative; z-index: 1; }

@media (min-width: 1024px) {
  .pricing-card { max-width: 35rem; }
  .pricing-figures { font-size: 3.75rem; }
}

/* ==========================================================================
   SECTION: footer
   ========================================================================== */
.site-footer { padding-block: clamp(2.5rem, 6vw, 4rem); }

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.footer-logo { margin-bottom: 0.5rem; }

.footer-tagline { color: var(--on-ink-muted); font-size: 0.95rem; }

.footer-contact a { text-decoration: underline; text-underline-offset: 3px; }

.footer-copy { color: var(--on-ink-muted); font-size: 0.85rem; font-family: var(--font-mono); }

/* CTA-less pricing note (stands in for the button until a public mailbox exists) */
.pricing-soon {
  font-family: var(--font-mono, "Space Mono", monospace);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--red, #e11d2a);
  margin-top: 1.75rem;
}
