/* ===== Men's Work UK — shared styles ===== */

:root {
  --paper: #EEEBE3;
  --paper-2: #E6E1D5;
  --ink: #1F2421;
  --ink-soft: #3A403B;
  --ember: #B5562D;
  --ember-dark: #8F421F;
  --dusk: #4B4368;
  --dusk-soft: #6B6088;
  --dusk-paper: #E7E3ED;
  --line: #D3CDBC;
  --line-on-ink: rgba(238,235,227,0.18);

  --display: 'Fraunces', serif;
  --body: 'Work Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --max: 720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 900px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
}
.dusk-zone .eyebrow { color: var(--dusk-soft); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.18;
  margin: 0;
  color: inherit;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(238,235,227,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.nav-logo {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav-links {
  display: flex;
  gap: 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ember); }

/* Mobile: logo on its own line, links centered below, sized to fit without scrolling */
@media (max-width: 640px) {
  .nav .wrap-wide {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .nav-logo { text-align: center; }
  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    text-align: center;
  }
  .nav-links .hide-sm { display: none; }
}

/* ---------- HERO (page headers) ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  padding: 96px 0 72px;
}
.hero .wrap-wide { max-width: 900px; }
.hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  max-width: 17ch;
  letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; color: #E6A184; }
.hero .lede {
  margin-top: 22px;
  max-width: 50ch;
  font-size: 18px;
  color: rgba(238,235,227,0.82);
}
.hero .ctas { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
}
.btn-primary { background: var(--ember); color: #FFF6EF; }
.btn-primary:hover { background: var(--ember-dark); text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--line-on-ink); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); text-decoration: none; }
.btn-outline-ember { border: 1px solid var(--ember); color: var(--ember); background: transparent; }
.btn-outline-ember:hover { background: var(--ember); color: #FFF6EF; text-decoration: none; }

/* rhythm motif */
.rhythm { margin-top: 52px; display: flex; align-items: center; gap: 0; max-width: 420px; }
.rhythm .dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(238,235,227,0.3); flex-shrink: 0; }
.rhythm .dot.on { background: var(--ember); box-shadow: 0 0 0 4px rgba(181,86,45,0.18); }
.rhythm .dot:nth-child(odd) { transform: translateY(-7px); }
.rhythm .dot:nth-child(even) { transform: translateY(7px); }
.rhythm .seg { flex: 1; height: 1px; background: rgba(238,235,227,0.22); }
.rhythm-caption { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; color: rgba(238,235,227,0.45); }

/* small hero variant used on inner pages */
.hero-sm { padding: 68px 0 56px; }
.hero-sm h1 { font-size: clamp(28px, 4.4vw, 40px); }

/* ---------- SECTIONS ---------- */
section.block { padding: 92px 0; border-bottom: 1px solid var(--line); }
section.block h2 { font-size: clamp(26px, 3.6vw, 34px); margin-top: 10px; font-style: italic; }
.section-intro { max-width: 58ch; margin-top: 20px; color: var(--ink-soft); }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
/* Safety net: if the reveal script fails to run for any reason, show content anyway after a beat rather than leaving it invisible */
.no-js .reveal, .reveal { animation: reveal-fallback 0s 1.2s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }

/* ---------- HEADSHOT ---------- */
.headshot {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ember);
  box-shadow: 0 0 0 6px var(--paper-2);
  flex-shrink: 0;
}
.headshot-lg {
  width: 220px;
  height: 220px;
}
.bio-row {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin-top: 30px;
}
@media (max-width: 560px) {
  .bio-row { flex-direction: column; align-items: flex-start; }
}
.bio-row .about-body { max-width: 56ch; }
.about-body p { color: var(--ink-soft); }

/* ---------- GROUPS (softened — quiet divider instead of boxed card) ---------- */
.group-pair {
  margin-top: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
@media (max-width: 640px) { .group-pair { grid-template-columns: 1fr; gap: 40px; } }
.group-triple { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 900px) { .group-triple { grid-template-columns: 1fr; } }
.group-card { padding: 0; background: transparent; }
.group-card + .group-card {
  border-left: 1px solid var(--line);
  padding-left: 48px;
}
@media (max-width: 640px) {
  .group-card + .group-card { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 40px; }
}
.group-card .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ember); }
.group-card h3 { margin-top: 10px; font-size: 23px; font-style: italic; }
.group-card .desc { margin-top: 12px; color: var(--ink-soft); font-size: 15.5px; }
.group-meta { margin-top: 20px; list-style: none; padding: 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 7px; }
.group-meta li { display: flex; justify-content: space-between; gap: 12px; }
.group-meta .price { color: var(--ink); font-weight: 500; }
.group-card .btn { margin-top: 24px; width: auto; text-align: center; }

/* term rhythm diagram — quieter, no boxed panel */
.term-diagram { margin-top: 56px; padding: 0; background: transparent; border: none; border-top: 1px solid var(--line); padding-top: 32px; }
.term-diagram .cap { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 22px; }
.term-row { display: flex; align-items: flex-end; }
.term-step { flex: 1; display: flex; flex-direction: column; align-items: center; }
.term-step .node { width: 11px; height: 11px; border-radius: 50%; background: var(--ember); border: none; }
.term-step:nth-child(odd) .node-wrap { transform: translateY(-10px); }
.term-step:nth-child(even) .node-wrap { transform: translateY(10px); }
.term-step .lbl { margin-top: 14px; font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); text-align: center; }
.term-line { flex: 1; height: 1px; background: var(--line); align-self: center; margin: 0 -2px; }

/* ---------- COACHING ---------- */
.aap-months { margin-top: 40px; display: flex; flex-direction: column; }
.aap-month { padding: 26px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 90px 1fr; gap: 22px; }
.aap-month:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .aap-month { grid-template-columns: 1fr; gap: 8px; } }
.aap-month .m { font-family: var(--mono); font-size: 12px; letter-spacing: 0.05em; color: var(--ember); text-transform: uppercase; }
.aap-month h4 { font-family: var(--display); font-weight: 500; font-style: italic; font-size: 19px; margin: 0 0 8px; }
.aap-month p { color: var(--ink-soft); font-size: 15.5px; }

/* ---------- MAGICAL SPACES (dusk zone) ---------- */
.dusk-zone { background: var(--dusk-paper); border-bottom: 1px solid #D8D0E4; }
.dusk-zone h1, .dusk-zone h2 { font-style: italic; color: var(--dusk); }
.dusk-zone .lede, .dusk-zone .section-intro { color: #55506B; }
.dusk-zone.hero { background: var(--dusk); color: var(--dusk-paper); }
.dusk-zone.hero h1 { color: var(--dusk-paper); font-style: italic; }
.dusk-zone.hero .lede { color: rgba(231,227,237,0.85); }
.btn-outline-dusk { border: 1px solid var(--dusk); color: var(--dusk); background: transparent; }
.btn-outline-dusk:hover { background: var(--dusk); color: #F3F0F8; text-decoration: none; }
.btn-outline-duskpaper { border: 1px solid rgba(231,227,237,0.5); color: var(--dusk-paper); background: transparent; }
.btn-outline-duskpaper:hover { background: var(--dusk-paper); color: var(--dusk); text-decoration: none; }

/* Rolling banner — Magical Spaces signature motif */
.rolling-banner {
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(231,227,237,0.3);
  border-bottom: 1px solid rgba(231,227,237,0.3);
  padding: 18px 0;
  margin-top: 44px;
}
.rolling-banner-track {
  display: inline-block;
  animation: roll-left 28s linear infinite;
}
.rolling-banner-track span {
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
  color: var(--dusk-paper);
  opacity: 0.85;
  margin-right: 40px;
}
@keyframes roll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .rolling-banner-track { animation: none; }
  .rolling-banner { overflow-x: auto; }
}

/* ---------- TESTIMONIAL ---------- */
.testimonial { padding: 80px 0; }
.testimonial blockquote { margin: 0; font-family: var(--display); font-style: italic; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.55; max-width: 56ch; color: var(--ink); }
.testimonial cite { display: block; margin-top: 20px; font-family: var(--mono); font-style: normal; font-size: 12.5px; letter-spacing: 0.05em; color: var(--ink-soft); }

/* ---------- CONTACT (now light, matching the main site — not black) ---------- */
.contact {
  background: var(--paper-2);
  color: var(--ink);
  border-bottom: none;
  border-top: 1px solid var(--line);
}

form.enquire { margin-top: 40px; display: grid; gap: 18px; max-width: 480px; }
.enquire label { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px; }
.enquire input, .enquire select, .enquire textarea {
  width: 100%; background: #FFFDF8; border: 1px solid var(--line);
  border-radius: 3px; padding: 12px 13px; color: var(--ink); font-family: var(--body); font-size: 15px;
}
.enquire input:focus, .enquire select:focus, .enquire textarea:focus { outline: none; border-color: var(--ember); }
.enquire textarea { resize: vertical; min-height: 90px; }
.enquire button { justify-self: start; margin-top: 6px; }

.form-success {
  margin-top: 40px;
  padding: 22px 24px;
  background: #FFFDF8;
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  border-radius: 3px;
  max-width: 480px;
}
.form-success h3 { font-size: 19px; font-style: italic; margin-bottom: 6px; }
.form-success p { color: var(--ink-soft); font-size: 15px; }

.form-error {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ember-dark);
}

.contact-alt { margin-top: 36px; font-size: 14px; color: var(--ink-soft); }
.contact-alt .email-btn {
  margin-top: 12px;
  display: inline-block;
}

/* ---------- MINI CTA STRIP (used at bottom of inner pages) ---------- */
.cta-strip { padding: 64px 0; text-align: left; }
.cta-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-strip h3 { font-size: 22px; font-style: italic; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--ink);
  color: rgba(238,235,227,0.45);
  padding: 30px 0 44px;
  font-family: var(--mono);
  font-size: 12px;
}
footer .wrap-wide { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
footer a { color: rgba(238,235,227,0.6); }

/* breadcrumb-style page eyebrow link back */
.back-link { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
