/* ===================================================================
   B.BOLD Consulting — landing page styles
   =================================================================== */

:root {
  --teal: #20B2AA;
  --teal-dark: #178f88;
  --ink: #212121;
  --muted: #2e2d2d;
  --white: #ffffff;
  --teal-rgb: 32, 178, 170;   /* for rgba(var(--teal-rgb), alpha) */
  --error: #d64545;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --radius: 10px;
  --maxw: 1120px;
  --nav-pad: 60px;
}

* { box-sizing: border-box; }

/* scroll-padding-top keeps in-page jumps (#services…) clear of the sticky
   menu, including arrivals from other pages (index.html#services). */
html { scroll-behavior: smooth; scroll-padding-top: 74px; }

/* Sticky footer: the page is at least one screen tall and <main> takes the
   spare room, so on short pages (thank-you, privacy) the footer sits at the
   bottom of the screen instead of halfway up. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
}
main { flex: 1 0 auto; }

/* Site background. A fixed layer behind the page rather than
   `background-attachment: fixed`, which iOS ignores — there `cover` then
   scales the image to the whole page height and it looks hugely zoomed.
   100lvh = the tallest viewport, so it doesn't rescale when the mobile
   address bar shows/hides. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  background: url("assets/background.webp") center top / cover no-repeat;
}
img { max-width: 100%; display: block; }

/* ===================== Top bar (logo + titles) ===================== */
.navbar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 80px;
  padding: 20px var(--nav-pad);
  background-color: var(--teal);
  text-align: center;
}

.navbar__logo {
  position: absolute;
  left: var(--nav-pad);
  top: 50%;
  transform: translateY(-50%);
  display: block;
  width: 130px;
  height: 65px;
}
.navbar__logo img { width: 100%; height: 100%; object-fit: contain; }

.navbar__titles { max-width: 900px; margin: 0 auto; }

.navbar__title {
  margin: 0;
  color: var(--white);
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ===================== Menu bar (separate from navbar, sticky) ===================== */
.navmenu {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--teal);
  transition: box-shadow 0.25s ease, padding 0.25s ease;
}
.navmenu.is-scrolled {
  padding-top: 8px;
  padding-bottom: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.navmenu__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--maxw);
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-block;
  padding: 9px 20px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: transparent;
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-link:hover,
.nav-link:focus-visible { background: rgba(var(--teal-rgb), 0.12); }
.nav-link.is-active {
  background: var(--teal);
  color: var(--white);
}

/* ===================== Layout ===================== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 12px;
}

.section__head { max-width: 720px; margin: 0 auto 44px; text-align: center; }

.section__title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  color: var(--ink);
}
.section__title--teal { color: var(--teal); }
/* .section__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  background: var(--teal);
  margin: 14px auto 0;
  border-radius: 2px;
} */

.section__intro1 { margin: 0; color: var(--muted); font-size: 1.6rem; font-weight: 600; }
.section__intro { margin: 0; color: var(--muted); font-size: 1.4rem; font-weight: 600; }

/* ===================== Hero ===================== */
.hero { display: flex; justify-content: center; text-align: center; }

.hero__inner {
  /* No panel at all — the hero text sits straight on the page
     background; a soft white text-shadow glow carries legibility
     over the busier areas of the image. */
  padding: 0 12px;
  max-width: 820px;
}

/* White keyline + glow for text over the background artwork: a crisp white
   stroke around each glyph (plus four hard 1px shadows) for local contrast,
   and a soft white glow for the busier areas. paint-order lets the stroke
   sit behind the fill. Used by the hero and by the Services / About text,
   which now sits on translucent .panel cards but keeps the same treatment. */
.hero__inner :is(h3, p),
#services :is(h2, h3, p, li),
#about :is(h3, p, li) {
  paint-order: stroke fill;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.92);
  text-shadow:
    -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff,
    0 0 8px rgba(255, 255, 255, 0.98),
    0 0 22px rgba(255, 255, 255, 0.9);
}

.hero__headline {
  margin: 0 0 300px;
  font-size: clamp(1rem, 4.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1;
  color: #000;
}

.hero__lead { margin: 0 0 28px; color: #000; font-size: 1.1rem; font-weight: 700; }

.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  border: 2px solid var(--teal);
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--teal); color: var(--white); }
.btn--solid:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.btn--ghost { background: transparent; color: var(--teal-dark); }
.btn--ghost:hover { background: var(--teal); color: var(--white); }

/* ============ Services / About text ============ */
/* Near-black text; the white keyline comes from the shared rule in Hero. */
#services :is(h2, h3, p, li),
#about :is(h3, p, li) { color: #111; }
/* the Services title gets a thinner 1px keyline */
#services .section__title { -webkit-text-stroke-width: 1px; }

/* ===================== Cards ===================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  padding: 18px 18px;
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }
.card h3 { margin: 0 0 10px; font-size: 1.3rem; font-weight: 700; }
.card p { margin: 0; font-size: 1rem; font-weight: 500; }
.card p + p,
.card__list + p { margin-top: 8px; }

.card__list { margin: 0; padding-left: 20px; font-size: 1rem; font-weight: 500; }

/* ===================== About ===================== */
.about__grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

.about__photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 4px solid var(--teal);
}

.about__role { margin: 0; font-size: 1.15rem; font-weight: 600; }
.about__lead { margin: 0 0 20px; font-size: 1.3rem; font-weight: 700; }
.about__list { margin: 0; padding-left: 20px; font-size: 1.2rem; }
.about__list li { margin: 8px 0; }

/* ===================== Contact ===================== */
.field { margin-bottom: 20px; font-size: 1.2rem; }
.field label { display: block; margin-bottom: 6px; font-weight: 700; }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #cfd8d8;
  border-radius: 8px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(var(--teal-rgb), 0.2);
}
.field textarea { resize: vertical; }

/* ===================== Contact page (contact.html) ===================== */
/* The whole section sits on one translucent white card, so the text needs
   no keyline / glow. Reuses .section / .contact__form / .field / .btn and
   adds the task chips, the email + phone row, the consent row, the honeypot. */

/* .panel is the same translucent card, used for the Services and About
   blocks on the home page. */
.contact__card,
.panel {
  max-width: 680px;
  margin: 0 auto;
  padding: 36px clamp(20px, 5vw, 44px);
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact__card .section__head { margin-bottom: 28px; }

.contact__form fieldset.field {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.contact__form legend {
  padding: 0;
  margin-bottom: 6px;
  font-size: 1.2rem;
  font-weight: 700;
}

.req { color: var(--teal-dark); }
.opt { font-weight: 400; color: var(--muted); }
.hint { margin: 4px 0 10px; font-size: 0.95rem; }
#contact .hint { color: var(--muted); }

/* Task chips — pill toggles built by js/contact.js */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.chip span {
  display: inline-block;
  padding: 9px 16px;
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--teal-dark);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.chip input:hover + span { background: rgba(var(--teal-rgb), 0.14); }
.chip input:checked + span { background: var(--teal); color: var(--white); }
.chip input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(var(--teal-rgb), 0.4);
}
.chips.is-invalid {
  outline: 2px solid var(--error);
  outline-offset: 6px;
  border-radius: 6px;
}

.field--nested { margin: 12px 0 0; }

/* Email + phone side by side, stacking on small screens */
.field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Consent row */
.field--check { font-size: 1rem; }
.field--check .check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}
.field--check .check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--teal);
}
.field--check .check a { color: var(--teal-dark); }

/* Field-level invalid state set by js/contact.js */
.contact__form input.is-invalid,
.contact__form textarea.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.18);
}

#contact .form__error { margin: 4px 0 12px; color: var(--error); font-weight: 700; }
#contact .form__error a { color: var(--teal-dark); white-space: nowrap; }

/* Honeypot — kept in the layout (bots fill it) but off-screen for people */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* "Rather reach me directly?" */
.form__fallback {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--teal-rgb), 0.5);
}
.form__fallback h2 { font-size: 1.2rem; margin: 0 0 8px; }
.form__fallback p { margin: 0; font-size: 1.1rem; }
.form__fallback a { color: var(--teal-dark); font-weight: 700; }

/* ===================== Utility pages (thank-you, privacy) ===================== */
.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 44px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(var(--teal-rgb), 0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.prose--center { text-align: center; }
.prose h1 { margin-top: 0; }
.prose h2 { margin: 1.5em 0 0.4em; }
.prose a:not(.btn) { color: var(--teal-dark); }
.prose .btn { margin-top: 10px; }

/* ===================== Footer ===================== */
.footer {
  background: var(--teal);
  color: #063a37;
  text-align: center;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.footer p { margin: 0; font-weight: 600; }
.footer p.footer__credit { font-size: 0.85rem; font-weight: 400; }

/* ===================== LinkedIn icon links ===================== */
/* Inline SVG coloured by currentColor; padding gives a comfortable tap area. */
.li-link {
  display: inline-flex;
  padding: 6px;
  border-radius: 6px;
  color: var(--teal-dark);
  line-height: 0;
  transition: opacity 0.2s ease;
}
.li-link:hover { opacity: 0.75; }
.li-link__icon { width: 26px; height: 26px; fill: currentColor; }
.li-link--footer { color: #063a37; }               /* matches footer text */
.li-link--contact { margin: 8px 0 0 -6px; }        /* line up with the links above */
.li-link--about { vertical-align: middle; padding: 4px; }
.li-link--about .li-link__icon { width: 22px; height: 22px; }

/* ===================== Reveal animation ===================== */
/* Only hide .reveal elements when JS is running (the "js" class is set by an
   inline script in each page's <head>), so the page stays readable without it. */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.in-view { opacity: 1; transform: none; }

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  :root { --nav-pad: 24px; }

  /* Top bar: stack the logo above the tagline (drop the absolute layout) */
  .navbar {
    height: auto;
    padding: 16px var(--nav-pad);
  }
  .navbar__logo {
    position: static;
    transform: none;
    margin: 0 auto 10px;
  }

  .about__grid { grid-template-columns: 1fr; gap: 24px; }
  .about__photo { max-width: 240px; margin: 0 auto; }
}

/* ===================== Phones ===================== */
@media (max-width: 600px) {
  :root { --nav-pad: 16px; }
  html { scroll-padding-top: 66px; }  /* shorter sticky menu on phones */

  /* Compact the teal top bar so the sticky menu is reached quickly:
     one row, logo on the left, the tagline beside it on two centred lines */
  .navbar {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px var(--nav-pad);
    text-align: left;
  }
  .navbar__logo { flex: none; width: 72px; height: 36px; margin: 0; }
  .navbar__titles { flex: 1; margin: 0; text-align: center; }
  .navbar__dash { display: none; }
  .navbar__line2 { display: block; }
  .navbar__title {
    /* shrinks a touch below ~340px wide so line one never wraps */
    font-size: min(0.78rem, 3.7vw);
    line-height: 1.25;
    letter-spacing: 0.2px;
  }

  /* Sticky menu bar — no hamburger: 4 equal-width pills on a single row */
  .navmenu { padding: 8px 10px; }
  .navmenu.is-scrolled { padding-top: 6px; padding-bottom: 6px; }

  .navmenu__list {
    gap: 6px;
    flex-wrap: nowrap;
  }
  .navmenu__list li { flex: 1 1 0; min-width: 0; }
  .nav-link {
    display: block;
    padding: 9px 4px;
    font-size: 0.8rem;
    text-align: center;
  }

  .section { padding: 20px 18px; }
  .hero__inner { padding: 4px 8px; }

  /* Contact page: stack the email + phone row, tighten the card */
  .field-group { grid-template-columns: 1fr; gap: 0; }
  .contact__card, .panel { padding: 24px 20px; }
  .prose { padding: 24px 20px; }
}

/* Phones held upright: the portrait artwork stays pinned while the text
   scrolls over it. The hero fills the first screen below the header, less
   60px — headline at the top, the rest at the bottom — and the artwork is
   shifted so its dot band sits in the middle of the gap between.
   js/animation.js measures --header-h and --art-mid (the gap's centre, from
   the top of the page); the fallbacks are estimates for when JS is off.
   The artwork is 853x1844 shown 100vw wide; its dot band is 527px tall,
   centred at y=922. The image fades to white at the top and bottom, so the
   shift blends into the white page. */
@media (orientation: portrait) and (max-width: 600px) {
  body::before {
    background-image: url("assets/background-mobile.webp");
    background-size: 100% auto;
    background-position: center
      calc(var(--art-mid, calc(50svh - 60px)) - 100vw * 922 / 853);
  }

  .hero { min-height: calc(100svh - var(--header-h, 182px) - 60px); }
  .hero__inner { display: flex; flex-direction: column; }
  /* Free space goes between the headline and the h3; the h3's top margin
     keeps roughly the dot band's height on short screens (the outermost
     dots may just touch the text). */
  .hero__headline { margin-bottom: auto; }
  .hero__headline + h3 { margin-top: calc(100vw * 527 / 853 - 4px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
