/* ==========================================================================
   Mountain Bay Systems — site styles
   You do not need to edit this file to change the website's words, colours,
   links or images. All of that lives in the editor at /admin.
   ========================================================================== */

:root {
  /* Brand */
  --ink:        #0C2432;   /* deepest navy — headings, dark sections */
  --ink-2:      #143547;
  --brand:      #14657E;   /* bay blue */
  --accent:     #1E8F8A;   /* teal — overridden by the accent colour in /admin */
  --accent-soft:#E8F5F4;
  --sand:       #F3A63B;   /* warm highlight, used sparingly */

  /* Neutrals */
  --text:       #1B2B36;
  --muted:      #5A7180;
  --line:       #DFE7EB;
  --line-soft:  #EDF2F4;
  --bg:         #FFFFFF;
  --surface:    #F6F9FA;
  --surface-2:  #EEF4F6;

  /* Type */
  --font: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --wrap: 1160px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(12, 36, 50, .06), 0 4px 14px rgba(12, 36, 50, .05);
  --shadow-md: 0 2px 6px rgba(12, 36, 50, .07), 0 18px 42px rgba(12, 36, 50, .10);
  --shadow-lg: 0 30px 70px rgba(12, 36, 50, .18);
}

/* --------------------------------------------------------------- reset -- */

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

html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin: 0 0 .55em;
  font-weight: 700;
}

h1 { font-size: clamp(2.35rem, 1.35rem + 3.2vw, 3.75rem); }
h2 { font-size: clamp(1.85rem, 1.25rem + 2.1vw, 2.7rem); }
h3 { font-size: 1.24rem; letter-spacing: -0.012em; }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* -------------------------------------------------------------- layout -- */

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

section { position: relative; }

.section { padding: clamp(64px, 8vw, 108px) 0; }
.section--tight { padding: clamp(48px, 6vw, 76px) 0; }
.section--surface { background: var(--surface); }
.section--line { border-top: 1px solid var(--line-soft); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 4.5vw, 58px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.09rem; margin-bottom: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; flex: none;
}
.section-head--center .eyebrow::before { display: none; }

.grid { display: grid; gap: clamp(18px, 2.2vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 650; font-size: 1rem; line-height: 1;
  padding: 15px 26px; border-radius: 10px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn .icon { width: 18px; height: 18px; }

.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(30, 143, 138, .28); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(30, 143, 138, .34); filter: brightness(1.05); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { transform: translateY(-2px); background: var(--ink-2); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.btn--onDark { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.32); }
.btn--onDark:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--sm { padding: 11px 18px; font-size: .93rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ------------------------------------------------------------- top bar -- */

.topbar {
  background: var(--ink); color: rgba(255,255,255,.82);
  font-size: .87rem; padding: 9px 0;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: center; justify-content: space-between; }
.topbar a { color: #fff; font-weight: 600; }
.topbar-item { display: inline-flex; align-items: center; gap: 8px; }
.topbar .icon { width: 15px; height: 15px; color: var(--accent); flex: none; }
.topbar-area { min-width: 0; }
.topbar-area > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-contact { display: flex; gap: 22px; flex-wrap: wrap; flex: none; }
@media (max-width: 1180px) { .topbar-area-more { display: none; } }
@media (max-width: 620px)  { .topbar-area { display: none; } .topbar .wrap { justify-content: center; } }

/* -------------------------------------------------------------- header -- */

.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.93);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header.is-stuck { box-shadow: 0 6px 24px rgba(12, 36, 50, .08); }
.header .wrap { display: flex; align-items: center; gap: 20px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand img, .brand svg { height: 46px; width: auto; }
.brand-fallback { display: flex; flex-direction: column; line-height: 1.05; }
.brand-fallback strong { font-size: 1.17rem; font-weight: 700; letter-spacing: -.02em; }
.brand-fallback span { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); font-weight: 700; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text); font-weight: 550; font-size: .97rem;
  padding: 9px 14px; border-radius: 8px;
}
.nav a:hover { text-decoration: none; color: var(--ink); background: var(--surface-2); }
.header .btn { margin-left: 10px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1.5px solid var(--line); border-radius: 9px;
  width: 46px; height: 42px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: background .15s; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .2s ease, top .2s ease;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 14px 24px 22px; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .header .btn { margin: 14px 8px 0; }
}

/* ---------------------------------------------------------------- hero -- */

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(168deg, #0C2432 0%, #123B4E 52%, #14657E 100%);
  color: #fff; padding: clamp(70px, 9vw, 122px) 0 clamp(78px, 9vw, 126px);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 78% 18%, rgba(30,143,138,.42), transparent 46%),
    radial-gradient(circle at 12% 88%, rgba(20,101,126,.55), transparent 52%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: 0; opacity: .14; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at 70% 30%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 72%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-inner { max-width: 800px; }
.hero h1 { color: #fff; margin-bottom: .38em; }
.hero .eyebrow { color: #7FD9D2; }
.hero .eyebrow::before { background: #7FD9D2; }
.hero-sub { font-size: clamp(1.06rem, .95rem + .45vw, 1.28rem); color: rgba(255,255,255,.84); max-width: 640px; margin-bottom: 34px; }

.hero-highlights {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px;
  margin-top: 38px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.16);
}
.hero-highlights li { display: flex; align-items: center; gap: 9px; font-size: .97rem; color: rgba(255,255,255,.9); font-weight: 500; }
.hero-highlights .icon { width: 17px; height: 17px; color: #7FD9D2; flex: none; }

/* ----------------------------------------------------------- trust bar -- */

.trustbar { background: var(--surface); border-bottom: 1px solid var(--line-soft); padding: 26px 0; }
.trustbar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 30px; justify-content: center; }
.trustbar-label { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.trustbar-item { font-weight: 600; color: var(--ink); font-size: 1rem; opacity: .82; }
.trustbar-item + .trustbar-item::before { content: '·'; margin-right: 30px; color: var(--line); }

/* --------------------------------------------------------------- cards -- */

.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(24px, 2.6vw, 34px);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card h3 { margin-bottom: .5em; }
.card p { color: var(--muted); }

.card-icon {
  width: 54px; height: 54px; border-radius: 14px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.card-icon .icon { width: 27px; height: 27px; }

.feature-list { list-style: none; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); display: grid; gap: 11px; }
.feature-list li { display: flex; gap: 11px; align-items: flex-start; font-size: .97rem; color: var(--text); line-height: 1.5; }
.feature-list .icon { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 2px; }

/* ------------------------------------------------------------ problems -- */

.problem-item { display: flex; gap: 16px; align-items: flex-start; }
.problem-num {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center; background: var(--ink); color: #fff;
  font-weight: 700; font-size: .93rem; margin-top: 2px;
}
.problem-item h3 { font-size: 1.1rem; margin-bottom: .35em; }
.problem-item p { color: var(--muted); font-size: .99rem; margin: 0; }

/* ------------------------------------------------------------- process -- */

.steps { counter-reset: step; display: grid; gap: 4px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { position: relative; padding: 30px 26px 30px 0; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: .82rem; font-weight: 800; letter-spacing: .1em;
  color: var(--accent); margin-bottom: 14px;
}
.step::after {
  content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
  background: var(--line); border-radius: 3px;
}
.step:first-child::after { background: var(--accent); }
.step h3 { font-size: 1.12rem; }
.step p { color: var(--muted); font-size: .97rem; margin: 0; }

/* --------------------------------------------------------------- stats -- */

.stats { background: var(--ink); color: #fff; }
.stats .grid { text-align: center; }
.stat-value {
  font-family: var(--font-head); font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem);
  font-weight: 700; letter-spacing: -.03em; color: #fff; line-height: 1; margin-bottom: 10px;
}
.stat-label { color: rgba(255,255,255,.66); font-size: .95rem; line-height: 1.45; }

/* -------------------------------------------------------------- why us -- */

.why-item { display: flex; gap: 14px; align-items: flex-start; }
.why-item .icon-badge {
  flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.why-item .icon { width: 20px; height: 20px; }
.why-item h3 { font-size: 1.06rem; margin-bottom: .3em; }
.why-item p { color: var(--muted); font-size: .97rem; margin: 0; }

/* -------------------------------------------------------- testimonials -- */

.quote-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.quote-card blockquote { margin: 0 0 22px; font-size: 1.09rem; line-height: 1.6; color: var(--ink); }
.quote-card blockquote::before { content: '\201C'; font-size: 3rem; line-height: 0; color: var(--accent); vertical-align: -.35em; margin-right: 4px; }
.quote-meta { display: flex; align-items: center; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.quote-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; flex: none; }
.quote-name { font-weight: 650; color: var(--ink); line-height: 1.25; }
.quote-role { font-size: .88rem; color: var(--muted); }

/* -------------------------------------------------------------- portal -- */

.portal { background: var(--ink); color: #fff; }
.portal h2 { color: #fff; }
.portal .section-head p { color: rgba(255,255,255,.66); }
.portal-card {
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.13);
  border-radius: var(--radius-lg); padding: 30px;
  display: flex; flex-direction: column;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.portal-card:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.24); transform: translateY(-3px); }
.portal-card .card-icon { background: rgba(126, 217, 210, .14); color: #7FD9D2; }
.portal-card h3 { color: #fff; }
.portal-card p { color: rgba(255,255,255,.66); font-size: .97rem; flex: 1; margin-bottom: 22px; }
.portal-card .btn { align-self: flex-start; }

/* --------------------------------------------------------------- about -- */

.about-grid { display: grid; gap: clamp(28px, 4vw, 56px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .about-grid.has-image { grid-template-columns: 1.15fr .85fr; } }
.about-body p { color: var(--muted); font-size: 1.04rem; }
.about-figure { margin: 0; }
.about-figure img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; }
.about-figure figcaption { margin-top: 12px; font-size: .9rem; color: var(--muted); }

/* ------------------------------------------------------------ cta band -- */

.cta-band {
  background: linear-gradient(120deg, var(--brand), var(--accent));
  color: #fff; border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 60px);
  display: flex; flex-wrap: wrap; gap: 26px; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: rgba(255,255,255,.86); max-width: 560px; margin: 0; }
.cta-band .btn { background: #fff; color: var(--ink); }
.cta-band .btn:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

/* ------------------------------------------------------------- contact -- */

.contact-grid { display: grid; gap: clamp(28px, 4vw, 52px); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: .9fr 1.1fr; } }

.contact-details { list-style: none; display: grid; gap: 22px; margin-top: 30px; }
.contact-details li { display: flex; gap: 14px; align-items: flex-start; }
.contact-details .icon-badge { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.contact-details .icon { width: 20px; height: 20px; }
.contact-label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.contact-value { font-weight: 600; color: var(--ink); font-size: 1.04rem; line-height: 1.4; }
.contact-value a { color: var(--ink); }
.contact-value a:hover { color: var(--accent); }
.contact-note { font-size: .95rem; color: var(--muted); font-weight: 400; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 3vw, 38px); box-shadow: var(--shadow-md); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .93rem; color: var(--ink); margin-bottom: 7px; }
.field .req { color: #C0392B; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(30,143,138,.14);
}
.field-row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-fine { font-size: .86rem; color: var(--muted); margin-top: 14px; }

.alert { border-radius: 12px; padding: 15px 18px; margin-bottom: 22px; font-size: .97rem; display: flex; gap: 11px; align-items: flex-start; }
.alert .icon { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.alert--ok   { background: #E7F6F1; color: #12604B; border: 1px solid #BFE7DA; }
.alert--err  { background: #FDEDEC; color: #8E2B22; border: 1px solid #F5CDC8; }

.map-embed { margin-top: 30px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { display: block; width: 100%; height: 300px; border: 0; }

/* -------------------------------------------------------------- footer -- */

.footer { background: var(--ink); color: rgba(255,255,255,.62); padding: 62px 0 30px; font-size: .95rem; }
.footer a { color: rgba(255,255,255,.78); }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding-bottom: 38px; }
.footer .brand { color: #fff; margin-bottom: 16px; }
.footer-blurb { max-width: 340px; }
.footer h4 { color: #fff; font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 16px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: .88rem;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid rgba(255,255,255,.18);
  display: grid; place-items: center; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
}
.footer-social a:hover { background: rgba(255,255,255,.1); text-decoration: none; }

/* --------------------------------------------------------------- misc -- */

.icon { width: 22px; height: 22px; }

.edit-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 12px 20px; font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow-md); display: inline-flex; align-items: center; gap: 9px;
}
.edit-fab:hover { text-decoration: none; background: var(--accent); }

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

/* Reveal-on-scroll is applied only when JavaScript is running (the .js class is
   set by an inline script in the page head). If scripting is off or blocked,
   every section is simply visible — the content is never hidden by a failure. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

@media print {
  .header, .topbar, .nav-toggle, .edit-fab, .cta-band, form { display: none !important; }
  body { font-size: 12pt; }
}
