/* ============================================================
   GLOBAL.CSS — Design tokens, resets, typography, buttons,
   forms. Shared by the landing pages and the thank-you pages.

   The tokens below are read off the Elementor kit of the live
   pages at help.beachcounseling.com (post-12669.css, the
   --e-global-* variables) so the static rebuild keeps the same
   look: Playfair Display headings over Roboto body copy, the
   white-to-aqua hero wash, and the deep-navy buttons.

   Fonts load from Google Fonts in each page's <head>:
   Playfair Display 400-700 and Roboto 300/400/500/700.
   ============================================================ */

:root {
  /* --- Brand palette --- */
  --color-navy:        #1b3652;  /* e-global secondary: headings, buttons, icons */
  --color-navy-dark:   #132840;
  --color-aqua:        #ade2e3;  /* e-global primary: hero gradient end, hovers */
  --color-aqua-light:  #d6f0f1;
  --color-text:        #505050;  /* e-global text: body copy */
  --color-text-muted:  #7a7a7a;
  --color-white:       #ffffff;  /* e-global accent */
  --color-border:      #eaeaea;
  --color-border-dark: #cccccc;
  --color-bg-soft:     #fafafa;  /* form fields */
  --color-bg-card:     #fcfcfc;  /* hero form card */
  --color-error:       #ff0000;  /* Gravity Forms required / validation red */

  /* --- Type --- */
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body:    "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --text-xs:   0.9rem;    /* e-global e003319 — footer, small print */
  --text-sm:   1rem;
  --text-base: 1.1rem;    /* e-global text — 17.6px */
  --text-lg:   1.2rem;    /* e-global c99de97 / 712b039 — subtitles, nav */
  --text-xl:   1.6rem;    /* e-global accent — h3 */
  --text-2xl:  2rem;      /* h4 */
  --text-3xl:  3rem;      /* e-global secondary — h2, 48px */
  --text-4xl:  3.2rem;    /* e-global primary — h1, 51px */

  /* --- Spacing / shape --- */
  --radius-sm:   8px;     /* form fields */
  --radius-md:   10px;    /* images */
  --radius-lg:   15px;    /* outlined cards */
  --radius-xl:   20px;    /* hero form card */
  --radius-full: 100px;

  --shadow-sm: 0 0 6px 0 rgba(0, 0, 0, 0.10);
  --shadow-md: 0 0 10px 0 rgba(0, 0, 0, 0.11);
  --shadow-lg: 0 0 10px 0 rgba(0, 0, 0, 0.20);

  --container: 1120px;    /* Elementor boxed width */
  --nav-padding: 10px;            /* above and below the logo */
  --nav-logo: 110px;
  --nav-logo-scrolled: 74px;      /* logo shrinks to this once scrolled */
  --nav-height: calc(var(--nav-logo) + 2 * var(--nav-padding));                   /* 130px */
  --nav-height-scrolled: calc(var(--nav-logo-scrolled) + 2 * var(--nav-padding)); /* 94px */
}

/* ============================================================
   RESET
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  /* Anchor links land below the sticky navbar instead of under it. */
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: capitalize;
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--color-navy);
}

h1 {
  font-size: var(--text-4xl);
  line-height: 1.2;
}

h2 { font-size: var(--text-3xl); line-height: 1; }
h3 { font-size: var(--text-xl); font-weight: 600; line-height: 1.1; }
h4 { font-size: var(--text-2xl); font-weight: 500; line-height: 1.1; }

p { margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }

a { color: var(--color-navy); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--color-text); }

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 500;
  text-transform: capitalize;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.section-subhead {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-navy);
  margin: 0 0 1.25rem;
}

.text-center { text-align: center; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.section { position: relative; padding: 5rem 0; }
.section--tight { padding: 3rem 0; }
.section--soft { background-color: var(--color-bg-soft); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */

/* Navy pill, as on the live "Get In Touch" buttons: body face at text
   size, 15/30/12/30 padding, fully rounded, no border. */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.4;
  padding: 15px 30px 12px;
  border: 0;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background-color: var(--color-navy);
  color: var(--color-white);
}

/* The live buttons keep their colours on hover. */
.btn--primary:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
}

.btn--outline:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.btn--block { width: 100%; display: block; }

/* ============================================================
   FORMS
   ============================================================ */

.form-group { margin-bottom: 20px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 8px;
}

/* Gravity Forms' "(Required)" marker: small red italic. */
.required {
  color: var(--color-error);
  font-size: 0.75rem;
  font-style: italic;
}

.form-control {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg-soft);
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 3px rgba(173, 226, 227, 0.6);
}

/* Placeholders in the body text colour, as the live form styler sets. */
.form-control::placeholder { color: var(--color-text); opacity: 1; }

/* No caret: the live selects render flat, the same as the text inputs. */
select.form-control {
  appearance: none;
  cursor: pointer;
}

.form-control.input--error { border-color: var(--color-error); }

.field-error {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: 0.3rem;
}

.form-error {
  margin-top: 0.9rem;
  font-size: var(--text-sm);
  color: var(--color-error);
}

/* Honeypot: a bot fills every field it finds, a human never sees this one. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.divider {
  width: 56px;
  height: 3px;
  background-color: var(--color-aqua);
  border: 0;
  margin: 0 0 1.5rem;
}

.divider--center { margin-left: auto; margin-right: auto; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   RESPONSIVE — Elementor breakpoints: tablet ≤1024px,
   mobile ≤767px. Values from the kit's own media queries.
   ============================================================ */

@media (max-width: 1024px) {
  /* Kit tablet sizes: h2 36/40px, h3 2.2rem; h1 stays 3.2rem. */
  :root { --text-3xl: 36px; --text-xl: 2.2rem; --container: 1024px; }
  h2 { line-height: 40px; letter-spacing: 0.2px; }
}

@media (max-width: 767px) {
  /* Kit mobile sizes: h1 2.2rem/1.1, h2 30/34px, h3 24/28px, body 16px/1.5,
     subtitles 15/18px, small print 13px. */
  :root {
    --text-4xl: 2.2rem;
    --text-3xl: 30px;
    --text-xl: 24px;
    --text-lg: 15px;
    --text-base: 16px;
    --text-xs: 13px;
  }
  body { line-height: 1.5; }
  h1 { line-height: 1.1; }
  h2 { line-height: 34px; }
  h3 { line-height: 28px; letter-spacing: 0.2px; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* Gravity Forms stacks First/Last name at 640px, not at the mobile
   breakpoint, with 8px between them. */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   NETLIFY BADGE
   Netlify injects a "Powered by Netlify" badge (an iframe with this id,
   from /.netlify/scripts/hud) on every published page. Hidden at the
   client's request; if Netlify ever renames the id, this stops working.
   ============================================================ */

#nl-badge-frame { display: none !important; }

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