/* ==========================================================================
   247 — 24seven.co.nz  ·  main.css
   Design tokens mirror _Tom/projects/fable5-harvest/2026-07-06/a-design-system/design.md
   Mobile-first. CSS scroll animations via .reveal + IntersectionObserver (main.js).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #0D0E12;
  --raised: #141620;
  --subtle: #1C1F2E;
  --text: #F5F5F0;
  --muted: #A0A4B0;
  --faint: #636778;
  --inverse: #0D0E12;
  --accent: #4FDDF2;
  --accent-hover: #7BE6F6;
  --accent-pressed: #38C4D9;
  --accent-08: rgba(79, 221, 242, 0.08);
  --accent-16: rgba(79, 221, 242, 0.16);
  --success: #22C55E;
  --border: #2A2D3E;
  --border-subtle: #1E2030;
  --border-strong: #3A3E52;
  --display: 'Space Grotesk', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --body: 'DM Sans', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-pill: 999px;
  --fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
  --base: 240ms cubic-bezier(0.4, 0, 0.2, 1);
  --slow: 480ms cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(64px, 5rem + 3vw, 128px);
  --maxw: 1200px;
}

/* ---------- Reset / base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--inverse); }
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(79, 221, 242, 0.35); border-radius: var(--r-sm); }

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--accent); color: var(--inverse); padding: 10px 18px;
  border-radius: var(--r-sm); font-family: var(--display); font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 12px; }

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
section { padding-block: var(--section); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--display); color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(40px, 3rem + 2.5vw, 64px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: clamp(23px, 1.5rem + 0.6vw, 28px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }
h4 { font-size: 17px; font-weight: 600; line-height: 1.35; }
p { max-width: 68ch; }
.lede { font-size: 18px; color: var(--muted); }
.eyebrow {
  display: block; font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px;
}
.section-head { margin-bottom: 48px; }
.section-head p { margin-top: 16px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-size: 15px; font-weight: 600; line-height: 1;
  padding: 14px 28px; border-radius: var(--r-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background var(--fast), color var(--fast), border-color var(--fast), transform var(--fast);
}
.btn-primary { background: var(--accent); color: var(--inverse); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { background: var(--accent-pressed); transform: translateY(0); }
.btn-secondary { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn-secondary:hover { background: var(--accent-08); }
.btn-secondary:active { background: var(--accent-16); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--subtle); color: var(--text); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 14, 18, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 16px var(--gutter);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand .mark { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--accent); letter-spacing: -0.02em; line-height: 1; }
.brand .tag { font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none; font-size: 15px;
  transition: color var(--fast), background var(--fast);
}
.nav-links a:hover { color: var(--text); background: var(--subtle); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-links .nav-cta { margin-left: 12px; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 9px 11px; cursor: pointer; color: var(--text);
}
.nav-toggle svg { display: block; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--raised); border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-cta { margin: 10px 0 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(96px, 14vh, 176px) var(--section); overflow: hidden; }
.hero::before {
  /* atmosphere: faint cyan bloom top-right, fading into near-black */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 800px 480px at 78% -10%, rgba(79, 221, 242, 0.10), transparent 60%),
    radial-gradient(ellipse 600px 400px at 12% 110%, rgba(31, 162, 255, 0.05), transparent 60%);
}
.hero::after {
  /* dot grid texture */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: radial-gradient(rgba(160, 164, 176, 0.13) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black, transparent);
}
.hero .container { position: relative; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { margin-top: 24px; max-width: 56ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

/* Animated headline: words rise in on load, staggered */
.headline-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  animation: word-rise 640ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes word-rise {
  to { opacity: 1; transform: translateY(0); }
}
.hero .lede, .hero-ctas, .hero .eyebrow {
  opacity: 0;
  animation: fade-up 640ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero .eyebrow { animation-delay: 60ms; }
.hero .lede { animation-delay: 520ms; }
.hero-ctas { animation-delay: 660ms; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll reveal (IntersectionObserver adds .in) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 640ms cubic-bezier(0.16, 1, 0.3, 1), transform 640ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in { opacity: 1; transform: none; }
/* stagger helpers */
.d-1 { --reveal-delay: 80ms; }
.d-2 { --reveal-delay: 160ms; }
.d-3 { --reveal-delay: 240ms; }
.d-4 { --reveal-delay: 320ms; }

/* No-JS + reduced motion: everything visible, nothing animates */
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .headline-word, .hero .lede, .hero-ctas, .hero .eyebrow { opacity: 1; transform: none; animation: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 32px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.45);
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 15px; color: var(--muted); }
.card-link { text-decoration: none; display: block; color: inherit; transition: border-color var(--base), transform var(--base); }
.card-link:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card .icon-tile {
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center; margin-bottom: 20px;
  background: var(--accent-08); border: 1px solid var(--accent-16);
}
.card .icon-tile svg { stroke: var(--accent); }
.card .more { display: inline-block; margin-top: 16px; font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---------- Stats / social proof ---------- */
.stats-band { border-block: 1px solid var(--border-subtle); background: var(--raised); }
.stats-band .container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; padding-block: 48px; }
@media (min-width: 720px) { .stats-band .container { grid-template-columns: repeat(4, 1fr); } }
.stat .num { font-family: var(--display); font-size: clamp(32px, 2rem + 1.5vw, 44px); font-weight: 700; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .num .unit { color: var(--accent); }
.stat .label { font-size: 13px; color: var(--muted); margin-top: 4px; }

.quote-card { border-left: 3px solid var(--accent); }
.quote-card blockquote { font-size: 17px; color: var(--text); font-style: normal; }
.quote-card figcaption { margin-top: 16px; font-size: 13px; color: var(--faint); }
.quote-card figcaption b { color: var(--muted); font-weight: 500; display: block; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; background: var(--raised); border-block: 1px solid var(--border-subtle); }
.cta-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 640px 320px at 50% 120%, rgba(79, 221, 242, 0.12), transparent 65%);
}
.cta-band .container { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.cta-band h2 { font-size: clamp(28px, 2rem + 1vw, 40px); }
.cta-band p { color: var(--muted); }

/* ---------- Services page: expandable detail ---------- */
.service-block { margin-bottom: 24px; }
.service-block details {
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; transition: border-color var(--base);
}
.service-block details[open] { border-color: var(--border-strong); }
.service-block summary {
  list-style: none; cursor: pointer; padding: 28px 32px;
  display: flex; align-items: center; gap: 20px;
  transition: background var(--fast);
}
.service-block summary::-webkit-details-marker { display: none; }
.service-block summary:hover { background: var(--subtle); }
.service-block summary .icon-tile {
  width: 44px; height: 44px; border-radius: var(--r-md); flex: none;
  display: grid; place-items: center;
  background: var(--accent-08); border: 1px solid var(--accent-16);
}
.service-block summary .icon-tile svg { stroke: var(--accent); }
.service-block summary .s-head { flex: 1; }
.service-block summary h3 { margin: 0 0 4px; }
.service-block summary .s-sub { font-size: 14px; color: var(--muted); }
.service-block summary .chev { flex: none; transition: transform var(--base); color: var(--faint); }
.service-block details[open] summary .chev { transform: rotate(180deg); }
.service-detail { padding: 0 32px 32px; border-top: 1px solid var(--border-subtle); }
.service-detail .inner { padding-top: 24px; display: grid; gap: 24px; }
@media (min-width: 720px) { .service-detail .inner { grid-template-columns: 1.4fr 1fr; } }
.service-detail p { font-size: 15px; color: var(--muted); }
.service-detail ul { list-style: none; display: grid; gap: 10px; }
.service-detail li { font-size: 15px; color: var(--muted); padding-left: 26px; position: relative; }
.service-detail li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) scale(0.8);
}

/* ---------- About page ---------- */
.values-grid .card h3 { display: flex; align-items: center; gap: 12px; }
.values-grid .card h3 .n { font-family: var(--display); font-size: 13px; color: var(--accent); }
.how-steps { display: grid; gap: 0; counter-reset: step; }
.how-step {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px;
  padding: 28px 0; border-bottom: 1px solid var(--border-subtle);
}
.how-step:last-child { border-bottom: 0; }
.how-step .num {
  counter-increment: step;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 15px;
}
.how-step .num::before { content: counter(step, decimal-leading-zero); }
.how-step h3 { margin-bottom: 6px; }
.how-step p { font-size: 15px; color: var(--muted); }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; gap: 48px; }
@media (min-width: 880px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); }
.input {
  width: 100%; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 12px 16px; font-family: var(--body); font-size: 16px; color: var(--text);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.input::placeholder { color: var(--faint); }
.input:hover { border-color: var(--border-strong); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 221, 242, 0.35); }
textarea.input { min-height: 140px; resize: vertical; }
.form-note { font-size: 13px; color: var(--faint); margin-top: 16px; }
.booking-placeholder {
  border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
  min-height: 420px; display: grid; place-items: center; text-align: center;
  padding: 40px; background: var(--raised);
}
.booking-placeholder .inner { display: grid; gap: 12px; justify-items: center; max-width: 34ch; }
.booking-placeholder svg { stroke: var(--accent); }
.booking-placeholder p { font-size: 14px; color: var(--muted); }
.booking-placeholder code {
  font-family: var(--display); font-size: 12px; color: var(--accent);
  background: var(--accent-08); padding: 3px 10px; border-radius: 4px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-subtle); padding-block: 48px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.site-footer .fine { font-size: 13px; color: var(--faint); }
.site-footer nav { display: flex; gap: 20px; }
.site-footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color var(--fast); }
.site-footer nav a:hover { color: var(--accent); }

/* ---------- Team cards (About) — ported from concept A v2 ---------- */
.team-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
.team-card {
  background: var(--raised); border: 1px solid rgba(79, 221, 242, 0.15); border-radius: var(--r-lg);
  padding: 40px 36px; display: flex; gap: 28px; align-items: flex-start;
  transition: border-color var(--base), box-shadow var(--base), transform var(--base);
}
.team-card:hover { border-color: rgba(79, 221, 242, 0.35); box-shadow: 0 0 30px rgba(79, 221, 242, 0.1); transform: translateY(-2px); }
.team-card__img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(79, 221, 242, 0.35); display: block; flex-shrink: 0; }
.team-card__initials {
  display: none; width: 100px; height: 100px; border-radius: 50%; flex-shrink: 0;
  background: var(--subtle); border: 2px solid var(--accent);
  align-items: center; justify-content: center;
  font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--accent);
}
.team-card h3 { font-size: 21px; margin-bottom: 3px; }
.team-card .role {
  display: block; font-family: var(--display); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.team-card p { font-size: 14.5px; color: var(--muted); line-height: 1.7; }
@media (max-width: 600px) { .team-card { flex-direction: column; } }

/* ---------- Cal.com inline embed (contact #booking) ---------- */
.cal-embed {
  border: 1px solid var(--border-subtle); border-radius: var(--r-lg);
  background: var(--raised); overflow: hidden; min-height: 620px;
}
.cal-embed #cal-inline { width: 100%; min-height: 620px; overflow: hidden; }
.cal-embed iframe { border: 0; width: 100%; }
.cal-fallback { display: grid; gap: 16px; justify-items: center; text-align: center; padding: 48px 32px; }
.cal-fallback p { color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .cal-embed, .cal-embed #cal-inline { min-height: 560px; } }

/* Team avatar wrapper: without a fixed basis the flex item collapses and the
   100x100 circle renders as a 57x100 oval (seen live 2026-08-02). */
.team-card__avatar { flex: 0 0 100px; width: 100px; height: 100px; position: relative; }
