/* ============================================================================
   The Content Hive — v2 runtime surfaces
   ----------------------------------------------------------------------------
   Deliberately small and deliberately narrow.

   The migrated pages are styled by the v1 cascade, loaded ahead of this file
   in layouts/base.jinja:

       tailwind.css  ->  index.css  ->  app.css  ->  theme.css  ->  page CSS

   Anything declared here against a bare element selector — body, a, h1-h6, img
   — would land after that cascade and silently re-point a migrated page's own
   typography and colour. So this file declares none. Every rule is keyed to a
   class that exists only on a surface v1 never had: the booking flow, the money
   payment portal, the member pages, and the four error routes.

   The tokens are the v1 values verbatim, so a v2-only surface written against
   --color-* lands on the same palette as a migrated page written against
   --brand-*.
   ========================================================================== */

:root {
  color-scheme: light;

  /* --- v1 brand tokens, exactly as tch-website-181 declared them ---------
     Reproduced from the :root block that every v1 page's inline <style> opened
     with. The migrated stylesheets reference these by name, so the values must
     stay byte-identical to v1's. */
  --brand-primary: #F0BC5E;
  --brand-dark: #D4A142;
  --brand-light: #F5D084;
  --brand-light-text: #FFFFFF;
  /* pages/exclusive-video-interview-offer.hbs referenced --brand-accent, which
     the v1 theme never defined anywhere, so every rule using it was dropped by
     the browser. This is the one place a value is supplied rather than copied;
     without it those rules stay dead. */
  --brand-accent: #2DD4BF;
  --accent: #2DD4BF;
  --tch-primary: #F0BC5E;
  --tch-dark: #D4A142;
  --tch-light: #F5D084;
  --tch-accent: #2DD4BF;

  --neutral: #6B7280;
  --white: #FFFFFF;
  --gray-light: #E5E7EB;
  --gray-medium: #9CA3AF;
  --gray-dark: #374151;
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;

  --font-heading: 'Bebas Neue', sans-serif;
  --font-body: 'Roboto', sans-serif;

  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;

  --radius-small: 4px;
  --radius-medium: 8px;
  --radius-large: 12px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;

  /* --- names the v2 runtime stylesheets read ------------------------------
     booking.css and money.css derive every colour from these, so pointing them
     at the v1 palette re-skins those surfaces without editing their files.
     --color-primary carries white text in the runtime CSS and is also used as
     link text on white; the identity gold cannot do either job legibly, so it
     is the same hue at a readable value. Buttons are re-fronted in identity
     gold below, which is where v1 actually used it. */
  --color-primary: #8A6410;
  --color-primary-dark: #5C4409;
  --color-primary-light: #FDF3DF;
  --color-accent: #2DD4BF;
  --color-text: #333333;
  --color-muted: #6B7280;
  --color-soft: #F9FAFB;
  --color-line: #E5E7EB;
  --color-footer: #4A5568;
  --color-white: #FFFFFF;
  --color-on-dark: #FFFFFF;
  --color-on-dark-muted: rgba(255, 255, 255, 0.86);
  --surface-deep: #374151;
  --color-field-border: #7C838C;
  --radius: 8px;
  --container: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grain-opacity: 0;
}

/* Tailwind's .container sets breakpoint max-widths but no centring and no
   gutter, which is why v1 always wrote `container mx-auto px-4`. Adding those
   two values here gives the v2-only pages the same result without repeating the
   utilities, and is a no-op on migrated markup that already carries them. */
.container {
  margin-inline: auto;
  padding-inline: 1rem;
}

.container--narrow {
  max-width: 760px;
}

.hidden {
  display: none !important;
}

/* ---------------------------------------------------------------- Buttons --
   The v1 button, lifted from .tch-btn-primary in components/footer.hbs and the
   .hero-button / .services-cta-button family in pages/index.hbs: same fill,
   same Bebas label, same 1px tracking, same 8px radius, same 150ms ease, same
   lift-and-shadow on hover. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-medium);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.button--primary {
  background: var(--brand-primary);
  color: var(--white);
}

.button--primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(240, 188, 94, 0.3);
}

/* The v1 header's outline weight: gold border, gold label, gold fill on hover
   (components/header.hbs, .header-signin). */
.button--secondary,
.button--ghost {
  padding: 8px 24px;
  border: 2px solid var(--brand-primary);
  background: transparent;
  color: var(--brand-primary);
  font-size: 14px;
}

.button--secondary:hover,
.button--ghost:hover {
  background: var(--brand-primary);
  color: var(--white);
}

.button--light {
  background: var(--white);
  color: var(--brand-primary);
}

.button--light:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* The primary control on the runtime's booking widgets, re-fronted from the
   runtime teal to the identity gold so the booking flow reads as TCH. */
.fb-button {
  background: var(--brand-primary);
  color: var(--white);
  border-color: var(--brand-primary);
}

.fb-button:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

/* ------------------------------------------------------------- Skip link --
   Off-screen until focused. v1 had none; it costs no pixels until it is used. */
.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 300;
  transform: translate(-50%, -120%);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 20px;
  background: var(--brand-primary);
  color: var(--white);
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0 0 var(--radius-medium) var(--radius-medium);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ------------------------------------------------------------------ Forms --
   Member pages and error routes. Matches the v1 .tch-input / .custom-form-input
   treatment: 2px border, 8px radius, gold focus ring. */
.form-field {
  display: grid;
  gap: 6px;
  margin-bottom: var(--space-16);
}

.form-field label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-dark);
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-medium);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--gray-dark);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-field textarea {
  min-height: 140px;
  padding-top: 14px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(240, 188, 94, 0.2);
}

.field-error {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--error);
}

.field-error[hidden] {
  display: none;
}

/* ---------------------------------------------------------- Member pages --
   /account and /subscribe. v1 had no equivalent, so these are written in the
   v1 vocabulary rather than copied from it: Bebas heading, teal section rule,
   white card on the light ground. */
.page-hero {
  padding: var(--space-64) 0 var(--space-48);
  background: #f9fafb;
  text-align: center;
}

.page-hero h1 {
  position: relative;
  display: inline-block;
  margin: 0 0 var(--space-16);
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 400;
  line-height: 52px;
  color: var(--gray-dark);
}

.page-hero h1::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  background-color: var(--accent);
}

.page-hero p:not(.eyebrow) {
  max-width: 620px;
  margin: var(--space-24) auto 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  color: var(--neutral);
}

.eyebrow {
  margin: 0 0 var(--space-8);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
}

.section {
  padding: var(--space-64) 0;
}

.section--muted {
  background: #f9fafb;
}

.auth-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--space-48);
  align-items: start;
}

@media (max-width: 767px) {
  .auth-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--space-32);
  }
}

.contact-card,
.auth-card,
.contact-form,
.auth-form {
  padding: var(--space-32);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-medium);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.contact-card h3,
.auth-card h3 {
  margin: 0 0 var(--space-12);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  color: var(--gray-dark);
}

.contact-card p,
.auth-card p {
  margin: 0 0 var(--space-16);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--neutral);
}

.auth-message {
  margin: var(--space-12) 0 0;
  font-family: var(--font-body);
  font-size: 14px;
}

.auth-message[data-state="success"] { color: var(--success); }
.auth-message[data-state="error"] { color: var(--error); }
.auth-message[hidden] { display: none; }
.auth-quick-link[hidden] { display: none; }

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  margin-top: var(--space-16);
}

/* ------------------------------------------------------------ Auth modal --
   The passwordless member dialog carried over from the v2 theme, re-fronted in
   the v1 palette. Behaviour unchanged; assets/js/theme.js drives it. */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: var(--space-16);
}

.auth-modal[hidden] { display: none; }

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.auth-modal__dialog {
  position: relative;
  width: min(100%, 440px);
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-32);
  border-radius: var(--radius-medium);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.auth-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  background: none;
  color: var(--neutral);
  cursor: pointer;
}

.auth-modal__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.auth-modal__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 64px;
  margin: 0 auto var(--space-16);
  padding: 0 14px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 22px;
  letter-spacing: 1px;
}

.auth-modal h2 {
  margin: 0 0 var(--space-8);
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 400;
  color: var(--gray-dark);
}

.auth-modal__intro {
  margin: 0 0 var(--space-24);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 22px;
  color: var(--neutral);
}

.auth-modal__form {
  display: grid;
  gap: var(--space-8);
  text-align: left;
}

.auth-modal__form .button {
  width: 100%;
  margin-top: var(--space-8);
}

.auth-modal__switch {
  margin: var(--space-16) 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--neutral);
}

.auth-modal__switch button {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--brand-dark);
  text-decoration: underline;
  cursor: pointer;
}

.auth-notices {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 500;
  display: grid;
  gap: 8px;
}

.auth-notice {
  padding: 12px 16px;
  border-radius: var(--radius-medium);
  background: var(--gray-dark);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  transition: opacity 180ms ease;
}

.auth-notice--success { background: var(--success); }
.auth-notice--error { background: var(--error); }
.auth-notice.is-hiding { opacity: 0; }

/* ------------------------------------------------------------ Legal pages --
   /privacy and /terms. The header band and the column measure only; the article
   text itself falls to index.css's .content-body rules, exactly as a v1 post
   body did. */
.content-header {
  padding: var(--space-64) 0 var(--space-32);
  background: #f9fafb;
  text-align: center;
}

.content-header h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 400;
  line-height: 52px;
  color: var(--gray-dark);
}

.content-header p {
  max-width: 640px;
  margin: var(--space-16) auto 0;
  font-family: var(--font-body);
  color: var(--neutral);
}

.page-policy .content-body {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-48) var(--space-16);
}

.page-policy .content-body h2 {
  margin: var(--space-32) 0 var(--space-12);
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 400;
  color: var(--gray-dark);
}

.page-policy .content-body p {
  margin: 0 0 var(--space-16);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 26px;
  color: var(--neutral);
}

/* ------------------------------------------------------------ Error pages --
   /404, /405, /500 and /503 off one component. v1 shipped none, so these are
   written in the v1 vocabulary: Bebas display number in brand gold, teal rule
   under the title, gold primary action. */
.error-page {
  padding: var(--space-64) 0;
  background: #f9fafb;
  text-align: center;
}

.error-page__inner {
  max-width: 44rem;
}

.error-page__code {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(5rem, 22vw, 11rem);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: 2px;
  color: var(--brand-primary);
}

.error-page__title {
  position: relative;
  display: inline-block;
  margin: var(--space-16) 0 var(--space-24);
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 400;
  line-height: 40px;
  color: var(--gray-dark);
}

.error-page__title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 4px;
  background-color: var(--accent);
}

.error-page__body {
  max-width: 34rem;
  margin: 0 auto var(--space-32);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 28px;
  color: var(--neutral);
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  justify-content: center;
}

.error-page__actions .button {
  min-height: 44px;
}

.error-page__help {
  margin: var(--space-32) 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--neutral);
}

.error-page__help a {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* --------------------------------------------------------------- Reveals --
   theme.js adds .is-visible as an element scrolls in. Nothing migrated carries
   these; they exist for the v2-only surfaces. */
.reveal,
.reveal-group {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.reveal.is-visible,
.reveal-group.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-group {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------- Money payment portal --
   Renders without site chrome; it only needs a neutral ground. */
.faster-money-page-body {
  margin: 0;
  background: #f4f7f7;
}
