/* ==========================================================================
   Rise Club — landing page styles
   --------------------------------------------------------------------------
   Contents
     01. Design tokens
     02. Base & typography
     03. Reusable components (buttons, eyebrows, reveals)
     04. Header
     05. Hero + app preview
     06. About
     07. Download
     08. Contact
     09. Footer
     10. Back to top
     11. Responsive adjustments
     12. Reduced motion & print
   ========================================================================== */


/* ==========================================================================
   01. DESIGN TOKENS
   Palette is built from the brand pair plus three colours sampled directly
   from the droplet in the logo, so accents always agree with the mark.
   ========================================================================== */
:root {
  /* Brand */
  --rc-primary: #17696a;          /* required primary (dark)  */
  --rc-cream: #faf5ee;            /* required secondary (light) */

  /* Sampled from the logo droplet */
  --rc-deep: #0c2b2c;             /* droplet base — footer & dark panels */
  --rc-lime: #b4d235;             /* droplet highlight */
  --rc-aqua: #1a9aa9;             /* droplet edge */

  /* Neutrals derived from the cream */
  --rc-sand: #ece2d3;             /* hairlines & card borders */
  --rc-surface: #ffffff;
  --rc-ink: #10302f;              /* body headings */
  --rc-muted: #5b7677;            /* body copy */
  --rc-muted-cream: rgba(250, 245, 238, .74);

  /* Signature gradient — the droplet, flattened */
  --rc-gradient: linear-gradient(135deg, var(--rc-lime) 0%, #4fb08a 45%, var(--rc-aqua) 100%);

  /* Radii */
  --rc-r-sm: 12px;
  --rc-r-md: 18px;
  --rc-r-lg: 28px;
  --rc-r-xl: 40px;

  /* Soft, low-contrast shadows — layered rather than one heavy blur */
  --rc-shadow-sm: 0 2px 6px rgba(12, 43, 44, .05), 0 8px 20px rgba(12, 43, 44, .05);
  --rc-shadow-md: 0 4px 12px rgba(12, 43, 44, .06), 0 18px 40px rgba(12, 43, 44, .08);
  --rc-shadow-lg: 0 10px 30px rgba(12, 43, 44, .09), 0 34px 70px rgba(12, 43, 44, .12);

  /* Rhythm */
  --rc-section-y: clamp(3rem, 6vw, 5rem);
  --rc-header-h: 76px;

  --rc-ease: cubic-bezier(.22, .61, .36, 1);
}


/* ==========================================================================
   02. BASE & TYPOGRAPHY
   Only Inter is used, so personality comes from weight and tracking contrast:
   very tight, heavy display type against light, roomy body copy.
   ========================================================================== */
/* Smooth scrolling is handled in script.js so the sticky-header offset and the
   reduced-motion preference are applied consistently.

   Bootstrap's Reboot sets `:root { scroll-behavior: smooth }`, which makes the
   browser re-animate every scrollTop write the script performs — the page then
   stalls and lags well past the animation's own duration. This override must use
   `:root` rather than `html`: the pseudo-class has higher specificity. */
:root { scroll-behavior: auto; }

* { -webkit-tap-highlight-color: transparent; }

/* Note: no `overflow-x: hidden` here on purpose. On <body> it turns the body
   into a second scroll container, which double-scrolls jQuery animations and
   can break position:sticky. Overflowing decoration is clipped by its own
   parent instead (see .hero and .download-panel). */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  background-color: var(--rc-cream);
  color: var(--rc-muted);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--rc-ink);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.12;
}

a { text-decoration: none; transition: color .2s var(--rc-ease); }

/* Sections need a scroll offset so the sticky header never covers headings */
section[id] { scroll-margin-top: calc(var(--rc-header-h) + 12px); }

.section { padding-block: var(--rc-section-y); }

/* Display sizes */
.display-hero {
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.03;
  margin-bottom: 1.25rem;
}

.display-section {
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}

.text-gradient {
  background: var(--rc-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.lead-text {
  font-size: 1.0625rem;
  color: var(--rc-muted);
  max-width: 34rem;
  margin-bottom: 0;
}

/* Centred intros get a little more width so they don't read as a narrow column */
.text-center .lead-text { max-width: 38rem; }

.text-cream { color: var(--rc-cream); }
.lead-cream { color: var(--rc-muted-cream); }

/* Small uppercase label above each heading */
.eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--rc-primary);
  margin-bottom: .875rem;
}

.eyebrow-light { color: var(--rc-lime); }

/* Accessibility helpers */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  z-index: 1100;
  padding: .625rem 1rem;
  border-radius: 0 0 var(--rc-r-sm) var(--rc-r-sm);
  background: var(--rc-primary);
  color: var(--rc-cream);
  font-weight: 600;
  transition: top .2s var(--rc-ease);
}
.skip-link:focus { top: 0; color: var(--rc-cream); }

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


/* ==========================================================================
   03. REUSABLE COMPONENTS
   ========================================================================== */

/* --- Primary button ---------------------------------------------------- */
.btn-brand {
  --bs-btn-focus-shadow-rgb: 26, 154, 169;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .6875rem 1.375rem;
  border: 0;
  border-radius: 999px;
  background: var(--rc-primary);
  color: var(--rc-cream);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -.01em;
  box-shadow: 0 4px 14px rgba(23, 105, 106, .26);
  transition: transform .22s var(--rc-ease), box-shadow .22s var(--rc-ease), background-color .22s var(--rc-ease);
}
.btn-brand:hover,
.btn-brand:focus {
  background: #12585a;
  color: var(--rc-cream);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(23, 105, 106, .34);
}
.btn-brand:active { transform: translateY(0); }

.btn-brand.btn-lg { padding: .875rem 1.75rem; font-size: 1rem; }

/* --- App store buttons -------------------------------------------------
   Drawn in CSS rather than using the official store badge artwork, which is
   trademarked. Drop in the official badges before going live if you prefer. */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .6875rem 1.25rem;
  border-radius: var(--rc-r-md);
  background: var(--rc-deep);
  color: var(--rc-cream);
  box-shadow: var(--rc-shadow-sm);
  transition: transform .22s var(--rc-ease), box-shadow .22s var(--rc-ease);
}
.store-btn:hover,
.store-btn:focus {
  color: var(--rc-cream);
  transform: translateY(-2px);
  box-shadow: var(--rc-shadow-md);
}
.store-btn i { font-size: 1.625rem; line-height: 1; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.store-btn small {
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .72;
}
.store-btn strong { font-size: 1rem; font-weight: 700; letter-spacing: -.015em; }

/* Variant for use on the dark download panel */
.store-btn-light {
  background: var(--rc-cream);
  color: var(--rc-deep);
  box-shadow: none;
}
.store-btn-light:hover,
.store-btn-light:focus { color: var(--rc-deep); }

/* --- Scroll reveal ----------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--rc-ease), transform .7s var(--rc-ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }


/* ==========================================================================
   04. HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(250, 245, 238, .82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--rc-ease), box-shadow .3s var(--rc-ease), background-color .3s var(--rc-ease);
}

/* Toggled by script.js once the page scrolls */
.site-header.is-scrolled {
  background: rgba(250, 245, 238, .94);
  border-bottom-color: var(--rc-sand);
  box-shadow: 0 6px 24px rgba(12, 43, 44, .07);
}

/* Height lives on the navbar, not the header, so the header stays a block
   element and the inner .container keeps its full computed width. */
.site-header .navbar {
  min-height: var(--rc-header-h);
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
}

.site-header .nav-link {
  position: relative;
  padding: .5rem .25rem;
  margin-inline: .75rem;
  color: var(--rc-ink);
  font-size: .9375rem;
  font-weight: 500;
}

/* Underline grows from the left on hover and for the section in view */
.site-header .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: .125rem;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--rc-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .28s var(--rc-ease);
}
.site-header .nav-link:hover,
.site-header .nav-link.is-active { color: var(--rc-primary); }
.site-header .nav-link:hover::after,
.site-header .nav-link.is-active::after { transform: scaleX(1); }

.nav-burger {
  border: 1px solid var(--rc-sand);
  border-radius: var(--rc-r-sm);
  padding: .25rem .5rem;
  color: var(--rc-primary);
  font-size: 1.5rem;
  line-height: 1;
  background: var(--rc-surface);
}
.nav-burger:focus { box-shadow: none; }


/* ==========================================================================
   05. HERO
   ========================================================================== */
.hero {
  position: relative;
  padding-top: clamp(3rem, 6vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}

/* Soft droplet-gradient bloom behind the app preview */
.hero-bloom {
  position: absolute;
  top: 50%;
  right: -8rem;
  transform: translateY(-52%);
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
              rgba(180, 210, 53, .30) 0%,
              rgba(26, 154, 169, .22) 42%,
              rgba(250, 245, 238, 0) 70%);
  filter: blur(10px);
  pointer-events: none;
}

.hero-note {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-top: 1.25rem;
  margin-bottom: 0;
  font-size: .875rem;
  color: var(--rc-muted);
}
.hero-note i { color: var(--rc-primary); line-height: 1.65; }

/* --- App preview -------------------------------------------------------
   The supplied app design sits inside a bezel. The screen fills the frame
   edge to edge, so the image needs no padding of its own. */
.phone-wrap { display: flex; justify-content: center; }

.phone {
  width: 100%;
  max-width: 320px;
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(160deg, #1c4344 0%, var(--rc-deep) 100%);
  box-shadow: var(--rc-shadow-lg);
}

.phone-screen {
  border-radius: 36px;
  background: var(--rc-deep);
  overflow: hidden;
}

/* width/height are set on the element too, so the space is reserved before
   the image loads and the hero doesn't shift. */
.phone-shot {
  display: block;
  width: 100%;
  height: auto;
}


/* ==========================================================================
   06. ABOUT
   ========================================================================== */
.section-about { position: relative; }

.feature-card {
  padding: 2rem 1.75rem;
  border: 1px solid var(--rc-sand);
  border-radius: var(--rc-r-lg);
  background: var(--rc-surface);
  box-shadow: var(--rc-shadow-sm);
  transition: transform .3s var(--rc-ease), box-shadow .3s var(--rc-ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--rc-shadow-md); }

.feature-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.25rem;
  border-radius: 16px;
  background: rgba(23, 105, 106, .09);
  color: var(--rc-primary);
  font-size: 1.375rem;
}

.feature-title { font-size: 1.1875rem; margin-bottom: .5rem; }
.feature-text { font-size: .9375rem; margin-bottom: 0; color: var(--rc-muted); }


/* ==========================================================================
   07. DOWNLOAD
   ========================================================================== */
.download-panel {
  position: relative;
  padding: clamp(2.25rem, 5vw, 4rem);
  border-radius: var(--rc-r-xl);
  background: linear-gradient(150deg, #14494a 0%, var(--rc-deep) 62%);
  box-shadow: var(--rc-shadow-lg);
  overflow: hidden;
}

/* Oversized droplet, cropped by the panel */
.panel-watermark {
  position: absolute;
  right: -4rem;
  bottom: -7rem;
  width: 22rem;
  opacity: .055;
  pointer-events: none;
}

/* display:block matters here — as an inline image it shares a line with the eyebrow */
.panel-logo { display: block; height: 42px; width: auto; margin-bottom: 1.5rem; }

.step-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }

.step { display: flex; gap: 1rem; align-items: flex-start; }

.step-num {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(250, 245, 238, .28);
  background: rgba(250, 245, 238, .07);
  color: var(--rc-lime);
  font-size: .9375rem;
  font-weight: 700;
}

.step-body { display: flex; flex-direction: column; gap: .1875rem; }
.step-body strong { color: var(--rc-cream); font-size: 1.0625rem; font-weight: 700; letter-spacing: -.015em; }
.step-body span { color: var(--rc-muted-cream); font-size: .9375rem; line-height: 1.55; }


/* ==========================================================================
   08. CONTACT
   ========================================================================== */
.form-card {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border: 1px solid var(--rc-sand);
  border-radius: var(--rc-r-lg);
  background: var(--rc-surface);
  box-shadow: var(--rc-shadow-md);
}

.form-card .form-label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--rc-ink);
  margin-bottom: .375rem;
}

.form-card .form-control {
  padding: .75rem 1rem;
  border: 1px solid var(--rc-sand);
  border-radius: var(--rc-r-sm);
  background: var(--rc-cream);
  color: var(--rc-ink);
  font-size: .9375rem;
  box-shadow: none;
  /* When validation moves focus to a field, keep its label clear of the header */
  scroll-margin-top: calc(var(--rc-header-h) + 28px);
  transition: border-color .2s var(--rc-ease), background-color .2s var(--rc-ease), box-shadow .2s var(--rc-ease);
}
.form-card .form-control::placeholder { color: rgba(91, 118, 119, .6); }
.form-card .form-control:focus {
  border-color: var(--rc-primary);
  background: var(--rc-surface);
  box-shadow: 0 0 0 4px rgba(23, 105, 106, .12);
}
.form-card .form-control.is-invalid {
  border-color: #c0483c;
  background-image: none;
}
.form-card .form-control.is-invalid:focus { box-shadow: 0 0 0 4px rgba(192, 72, 60, .12); }

.form-card textarea.form-control { resize: vertical; min-height: 8rem; }

.invalid-feedback { font-size: .8125rem; }

.form-hint { font-size: .8125rem; color: var(--rc-muted); }

/* Success message after a valid submit */
.form-alert {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-top: 1.25rem;
  padding: .875rem 1.125rem;
  border-radius: var(--rc-r-sm);
  background: rgba(180, 210, 53, .18);
  border: 1px solid rgba(23, 105, 106, .2);
  color: var(--rc-primary);
  font-size: .9375rem;
  font-weight: 500;
}
.form-alert i { font-size: 1.125rem; }

/* Error state, reusing the same box for a failed submit */
.form-alert-error {
  background: rgba(192, 72, 60, .12);
  border-color: rgba(192, 72, 60, .3);
  color: #c0483c;
}

/* --- Support illustration ---------------------------------------------
   Sits directly on the cream background rather than in a card: the artwork
   already contains its own white panel, so wrapping it in a second card
   would read as a box inside a box next to the form. */
.support-art {
  display: block;
  width: 100%;
  max-width: 29rem;
  margin-inline: auto;
}

.support-art svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}


/* ==========================================================================
   08b. CMS PAGE (Privacy Policy / Terms & Conditions) — its own minimal
   chrome, deliberately not the marketing header/nav/footer.
   ========================================================================== */
.cms-page-header {
  padding: 1.5rem clamp(1.25rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--rc-sand);
  display: flex;
  justify-content: center;
}
.cms-page-brand { display: inline-flex; }
.cms-page-brand img { height: 60px; width: auto; }

.cms-page-main { margin: 4rem 2rem; }

.cms-content { margin-top: 1.5rem; }

.cms-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: .75rem;
}
.cms-content h3:first-child { margin-top: 0; }
.cms-content p { margin-bottom: 1rem; }


/* ==========================================================================
   09. FOOTER
   ========================================================================== */
.site-footer {
  padding-top: clamp(3.5rem, 7vw, 5rem);
  padding-bottom: 1.75rem;
  background: var(--rc-deep);
  color: var(--rc-muted-cream);
}

.footer-logo { height: 40px; width: auto; margin-bottom: 1.25rem; }

.footer-about {
  font-size: .9375rem;
  /* Raised alongside the column widening so the copy actually uses the space */
  max-width: 28rem;
  margin-bottom: 0;
  color: var(--rc-muted-cream);
}

.footer-heading {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rc-cream);
  margin-bottom: 1.25rem;
}

.footer-links,
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }

.footer-links a {
  color: var(--rc-muted-cream);
  font-size: .9375rem;
}
.footer-links a:hover { color: var(--rc-lime); }

.footer-contact li { display: flex; gap: .75rem; align-items: flex-start; font-size: .9375rem; }
.footer-contact i { color: var(--rc-lime); font-size: 1rem; line-height: 1.6; }
.footer-contact a { color: var(--rc-muted-cream); }
.footer-contact a:hover { color: var(--rc-lime); }

/* Social icons sit directly below the support email. The gap comes from the
   `mb-4` utility on .footer-contact, so there's no custom margin here. */

/* --- Bottom bar ------------------------------------------------------- */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid rgba(250, 245, 238, .14);
}

.footer-copy { font-size: .875rem; color: rgba(250, 245, 238, .6); text-align: center; }

.social-list { list-style: none; padding: 0; margin: 0; display: flex; gap: .625rem; }

.social-list a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(250, 245, 238, .18);
  color: var(--rc-cream);
  font-size: .9375rem;
  transition: background-color .22s var(--rc-ease), border-color .22s var(--rc-ease),
              color .22s var(--rc-ease), transform .22s var(--rc-ease);
}
.social-list a:hover {
  background: var(--rc-lime);
  border-color: var(--rc-lime);
  color: var(--rc-deep);
  transform: translateY(-2px);
}


/* ==========================================================================
   10. BACK TO TOP
   ========================================================================== */
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1020;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--rc-primary);
  color: var(--rc-cream);
  font-size: 1.125rem;
  box-shadow: 0 6px 18px rgba(12, 43, 44, .28);
  transition: transform .25s var(--rc-ease), opacity .25s var(--rc-ease), background-color .25s var(--rc-ease);
}
.to-top:hover { background: #12585a; transform: translateY(-3px); }
.to-top[hidden] { display: none; }


/* ==========================================================================
   11. RESPONSIVE ADJUSTMENTS
   ========================================================================== */

/* Collapsed nav panel (below Bootstrap's lg breakpoint) */
@media (max-width: 991.98px) {
  :root { --rc-header-h: 68px; }

  .site-header .navbar-collapse {
    margin-top: .75rem;
    margin-bottom: .75rem;
    padding: .75rem 1rem 1rem;
    border: 1px solid var(--rc-sand);
    border-radius: var(--rc-r-md);
    background: var(--rc-surface);
    box-shadow: var(--rc-shadow-md);
  }

  .site-header .nav-link { margin-inline: 0; padding-block: .625rem; }
  .site-header .nav-link::after { display: none; }

  .brand-logo { height: 34px; }

  .btn-brand { width: 100%; }

  .hero-bloom { width: 30rem; height: 30rem; top: -8%; right: -30%; }

  .panel-watermark { width: 14rem; opacity: .05; }
}

@media (max-width: 575.98px) {
  .store-row { gap: .625rem; }
  .store-btn { flex: 1 1 100%; justify-content: center; }
  .phone { max-width: 288px; }

  /* The centred copyright can't dodge the fixed back-to-top button sideways
     without losing its centring, so it clears it vertically instead. */
  .site-footer { padding-bottom: 5.5rem; }
  /* .footer-bottom holds only the centred copyright now, so it needs no
     small-screen override — it stays centred at every width. */
}


/* ==========================================================================
   12. REDUCED MOTION & PRINT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  /* Content must stay visible if the reveal transition never runs */
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .to-top, .store-row, .phone-wrap { display: none !important; }
  body { background: #fff; color: #000; }
}
