/* ==========================================================================
   HourZero Marketing Site — Base Stylesheet
   All layout uses CSS logical properties for automatic RTL (Arabic) flipping.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colour palette — Midnight Indigo theme */
  --bg:           #141224;
  --surface:      #1F1C33;
  --primary:      #40338C;
  --secondary:    #4CBFB3;
  --positive:     #59C77A;
  --warning:      #F2BF4D;
  --sos:          #EB5959;
  --text:         #FFFFFF;
  --text-muted:   rgba(255, 255, 255, 0.7);

  /* Layout & spacing */
  --radius:  16px;
  --maxw:    1100px;
  --space:   clamp(1rem, 2vw, 1.5rem);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", "Noto Sans Arabic", sans-serif;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   3. Smooth scroll (honour reduced-motion preference)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* --------------------------------------------------------------------------
   4. Body
   -------------------------------------------------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   5. Background accent glow
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(64, 51, 140, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(76, 191, 179, 0.10) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Ensure content sits above the glow layer */
body > * {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   6. Layout container
   -------------------------------------------------------------------------- */
.container {
  max-inline-size: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* --------------------------------------------------------------------------
   7. Typography
   -------------------------------------------------------------------------- */
h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
  font-weight: 700;
}

h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  line-height: 1.3;
  font-weight: 600;
}

p {
  max-inline-size: 68ch;
}

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

/* --------------------------------------------------------------------------
   8. Components
   -------------------------------------------------------------------------- */

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .25);
}

.btn[aria-disabled="true"] {
  opacity: .55;
  cursor: default;
  filter: grayscale(.4);
}

/* Card */
.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

/* Pill badge */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: .9rem;
}

/* Section wrapper */
.section {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.section__title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-block-end: .75rem;
}

/* App Store badge (pre-launch disabled state) */
.badge--appstore {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.6rem;
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   9. Focus visible
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   10. Site header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(20, 18, 36, .7);
  border-block-end: 1px solid rgba(255, 255, 255, .06);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: .75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  margin-inline-end: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .95rem;
}

.site-nav a:hover,
.site-nav a[aria-current="true"] {
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-size: .8rem;
  font-variant: small-caps;
  letter-spacing: .05em;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
}

.lang-switch a:hover,
.lang-switch a[aria-current="true"] {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: .4rem;
}

.nav-toggle span {
  display: block;
  inline-size: 22px;
  block-size: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   11. Hero
   -------------------------------------------------------------------------- */
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 2rem;
  align-items: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.lead {
  font-size: 1.15rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.hero__note {
  font-size: .875rem;
}

.hero__device {
  justify-self: center;
  inline-size: min(100%, 300px);
  border-radius: 2.2rem;
  background: #0b0a16;
  padding: .5rem;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}

.hero__device img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border-radius: 1.8rem;
}

/* --------------------------------------------------------------------------
   12. Site footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-block-start: 1px solid rgba(255, 255, 255, .06);
  padding-block: 3rem 2rem;
  margin-block-start: 4rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-block-end: 2rem;
  align-items: start;
}

.site-footer__grid > div:first-child {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.site-footer nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: .9rem;
}

.site-footer nav a:hover {
  color: var(--text);
}

.site-footer .muted {
  font-size: .85rem;
}

/* --------------------------------------------------------------------------
   13. Content section grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Trust strip */
.trust__list {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  list-style: none;
}

/* Privacy deep-dive two-column layout */
.privacy-deep__grid {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 2rem;
}

/* Check list */
.check-list {
  list-style: none;
  display: grid;
  gap: .6rem;
}

.check-list li::before {
  content: "✓";
  color: var(--positive);
  margin-inline-end: .5rem;
}

/* Medical note card accent */
.note {
  border-inline-start: 3px solid var(--warning);
}

/* --------------------------------------------------------------------------
   14. FAQ accordion
   -------------------------------------------------------------------------- */
.faq__item {
  border-block-end: 1px solid rgba(255, 255, 255, .08);
}

.faq__q {
  inline-size: 100%;
  text-align: start;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  padding-block: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq__q::after {
  content: "+";
  color: var(--secondary);
}

.faq__q[aria-expanded="true"]::after {
  content: "–";
}

.faq__a {
  display: none;
  padding-block-end: 1rem;
}

.faq__a.is-open {
  display: block;
}

/* --------------------------------------------------------------------------
   15. Responsive — mobile
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__device {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    inset-block-start: 100%;
    inset-inline-start: 0;
    inset-inline-end: 0;
    flex-direction: column;
    align-items: start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(20, 18, 36, .97);
    border-block-end: 1px solid rgba(255, 255, 255, .08);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-header__bar {
    position: relative;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .privacy-deep__grid {
    grid-template-columns: 1fr;
  }

  .devices {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .shot {
    inline-size: 180px;
  }
}

@media (min-width: 481px) and (max-width: 760px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   16. Screenshots showcase
   -------------------------------------------------------------------------- */
.screens__intro {
  margin-block-end: 2rem;
}

/* Horizontally scrollable phone gallery */
.shots {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin-inline: -1.25rem;        /* bleed to the container's edges */
  padding-inline: 1.25rem;
  padding-block-end: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.shot {
  flex: 0 0 auto;
  inline-size: 220px;
  scroll-snap-align: center;
}

.shot figcaption {
  margin-block-start: .75rem;
  font-size: .9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Device frames */
.phone,
.tablet,
.watch {
  background: #0b0a16;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.phone  { border-radius: 1.8rem; padding: .4rem; }
.tablet { border-radius: 1.4rem; padding: .5rem; }
.watch  { border-radius: 1.4rem; padding: .35rem; inline-size: 116px; }

.phone img,
.tablet img,
.watch img {
  display: block;
  inline-size: 100%;
  block-size: auto;
}

.phone img  { border-radius: 1.5rem; }
.tablet img { border-radius: 1rem; }
.watch img  { border-radius: 1.1rem; }

/* iPad + Apple Watch row */
.devices {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2.5rem;
  align-items: center;
  margin-block-start: 3.5rem;
}

.device-block {
  margin: 0;
}

.device-block figcaption {
  margin-block-start: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .95rem;
}

.watches {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   17. Legal pages
   -------------------------------------------------------------------------- */
.legal__body{max-inline-size:760px;margin-inline:auto}
.legal__body h1{margin-block-end:.25rem}
.legal__body h2{margin-block:2rem .5rem;font-size:1.25rem}
.legal__body p{margin-block-end:1rem;color:var(--text-muted)}
.legal__body a{color:var(--secondary)}
