/* WellComply — wellcomply.app
   Plain CSS, no build step. */

:root {
  --navy: #003366;
  --navy-deep: #002548;
  --green: #669933;
  --gold: #cc9933;

  --bg: #ffffff;
  --bg-tint: #f5f6f8;
  --surface: #ffffff;
  --border: #e4e7ec;
  --text: #0f1b2d;
  --text-muted: #55627a;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px rgba(0, 37, 72, 0.05), 0 2px 8px rgba(0, 37, 72, 0.04);
  --shadow: 0 2px 6px rgba(0, 37, 72, 0.05), 0 18px 40px rgba(0, 37, 72, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --header-h: 68px;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.375rem, 5.4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-weight: 700;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

a {
  color: var(--navy);
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

img {
  max-width: 100%;
}

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

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Wordmark ---------- */

.wordmark {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.wm-well {
  color: var(--gold);
}

.wm-comply {
  color: var(--navy);
}

.wm-dot {
  color: var(--green);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 0.9375rem;
}

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

.btn--primary:hover {
  background: var(--navy-deep);
}

.btn--secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--navy);
}

.btn--secondary:hover {
  border-color: var(--navy);
}

.btn__icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__list {
  display: flex;
  gap: 4px;
}

.nav__list a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav__list a:hover {
  color: var(--navy);
  background: var(--bg-tint);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 12px;
  color: var(--navy);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-of-type {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-of-type {
  transform: translateY(-4px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 12px 24px 24px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 40px rgba(0, 37, 72, 0.08);
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__list {
    flex-direction: column;
    gap: 0;
  }

  .nav__list a {
    padding: 14px 4px;
    border-radius: 8px;
    font-size: 1.0625rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
  }

  .nav__menu .btn {
    min-height: 48px;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(72px, 10vw, 128px);
}

.section--tint {
  background: var(--bg-tint);
}

.section__head {
  max-width: 760px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4d7a22; /* brand green, darkened for text contrast */
}

.lead {
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(48px, 8vw, 104px) clamp(72px, 10vw, 120px);
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(204, 153, 51, 0.08), transparent 70%),
    radial-gradient(50% 50% at 10% 90%, rgba(102, 153, 51, 0.07), transparent 70%),
    var(--bg);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(40px, 6vw, 80px);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.source-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
}

.source-line svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--green);
}

.hero__visual {
  display: flex;
  justify-content: center;
}

@media (max-width: 860px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__copy {
    text-align: center;
  }

  .hero__actions,
  .source-line {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero__actions .btn {
    width: 100%;
  }
}

/* ---------- iPhone mockup ---------- */

.phone {
  position: relative;
  flex: none;
  width: 248px;
  max-width: 100%;
  padding: 10px;
  background: #0d1522;
  border-radius: 46px;
  box-shadow:
    inset 0 0 0 1.5px #39445a,
    var(--shadow);
}

.phone--hero {
  width: min(300px, 78vw);
  padding: 12px;
  border-radius: 54px;
}

/* Same proportions as the screenshots (1320 x 2868), so they fill the
   display edge to edge with nothing cropped or stretched. */
.phone__screen {
  position: relative;
  aspect-ratio: 1320 / 2868;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #eef1f5 100%);
  border-radius: 36px;
}

.phone--hero .phone__screen {
  border-radius: 42px;
}

/* Taken out of flow so an image's own dimensions can never resize the frame;
   a screenshot with a different ratio is clipped from the bottom instead. */
.phone__screen img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* The screenshots carry the iOS status bar but leave the Dynamic Island area
   empty, so the island is drawn here, sized and placed as on the device. */
.phone__island {
  position: absolute;
  top: 1.46%;
  left: 50%;
  z-index: 2;
  width: 28.6%;
  aspect-ratio: 126 / 37;
  background: #0d1522;
  border-radius: 999px;
  transform: translateX(-50%);
}

.phone-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(20px, 4vw, 48px);
  padding: 8px 4px 32px;
}

.showcase {
  flex: none;
  width: 248px;
  max-width: 100%;
  margin: 0;
}

.showcase__caption {
  margin-top: 20px;
  text-align: center;
}

.showcase__caption strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.showcase__caption span {
  display: block;
  margin-top: 4px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text-muted);
}

@media (max-width: 880px) {
  /* Scrolls inside its own box so the page itself never scrolls sideways. */
  .phone-row {
    justify-content: flex-start;
    margin-inline: -24px;
    padding-inline: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .showcase {
    scroll-snap-align: center;
  }
}

@media (max-width: 600px) {
  /* Phones stack, each with its own caption directly beneath it. */
  .phone-row {
    flex-direction: column;
    align-items: center;
    gap: 48px;
    margin-inline: 0;
    padding-inline: 4px;
    overflow-x: visible;
    scroll-snap-type: none;
  }
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 16px;
}

.card,
.pillar,
.audience__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card {
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card p,
.pillar p {
  margin-top: 8px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  background: rgba(0, 51, 102, 0.06);
  border-radius: 12px;
  color: var(--navy);
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

/* ---------- Pillars ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}

.pillar {
  padding: 28px;
}

.pillar__num {
  display: block;
  margin-bottom: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.pillar h3 {
  font-size: 1.25rem;
}

/* ---------- Audience ---------- */

.audience {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 16px;
}

.audience__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
}

.audience__item .card__icon {
  flex: none;
  margin-bottom: 0;
  background: rgba(102, 153, 51, 0.12);
}

/* ---------- Trust + disclaimer ---------- */

.trust {
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 4vw, 40px);
  padding: clamp(28px, 5vw, 56px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.trust h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.trust__badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  background: rgba(102, 153, 51, 0.12);
  border-radius: 18px;
  color: var(--green);
}

.trust__badge svg {
  width: 32px;
  height: 32px;
}

@media (max-width: 640px) {
  .trust {
    flex-direction: column;
  }
}

.disclaimer {
  max-width: 860px;
  margin: 32px auto 0;
  padding: 0 8px;
  text-align: center;
}

.disclaimer h2 {
  margin-bottom: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.disclaimer p {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---------- Final CTA ---------- */

.cta {
  padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 80px);
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta h2 {
  max-width: 18ch;
  margin-inline: auto;
  color: #fff;
}

.cta__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  margin-top: 36px;
  padding: 0 26px;
  background: #fff;
  border-radius: 999px;
  font-weight: 600;
  color: var(--navy);
}

.cta__badge svg {
  width: 20px;
  height: 20px;
}

.cta__source {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- Legal pages (privacy.html) ---------- */

.legal {
  padding-block: clamp(48px, 8vw, 96px) clamp(72px, 10vw, 120px);
}

.legal__inner {
  max-width: 808px;
}

.legal__head {
  margin-bottom: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(24px, 4vw, 40px);
  border-bottom: 1px solid var(--border);
}

.legal__head h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

.legal__date {
  margin-top: 16px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.legal section + section {
  margin-top: clamp(36px, 5vw, 52px);
}

.legal h2 {
  margin-bottom: 14px;
  font-size: clamp(1.3125rem, 2.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.legal p + p,
.legal p + ul,
.legal ul + p {
  margin-top: 14px;
}

.legal ul {
  padding-left: 1.25em;
  list-style: disc;
}

.legal li + li {
  margin-top: 8px;
}

.legal li::marker {
  color: var(--green);
}

.legal strong {
  font-weight: 600;
  color: var(--navy);
}

.legal a:not(.btn) {
  color: var(--navy);
  font-weight: 500;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal__head .lead {
  margin-top: 16px;
}

.support__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 32px;
}

.support__address {
  font-size: 1.0625rem;
}

@media (max-width: 480px) {
  .support__cta .btn {
    width: 100%;
  }
}

.footer__links a[aria-current="page"] {
  color: var(--navy);
  font-weight: 600;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 56px 40px;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
}

.footer__brand .wordmark {
  margin-bottom: 14px;
}

.footer__source {
  margin-top: 2px;
  font-size: 0.875rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.footer__links a {
  display: block;
  padding: 8px 10px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
}

.footer__links a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.footer__legal {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__links {
    margin-left: -10px;
  }
}

/* ---------- Scroll reveal ----------
   Only active once script.js adds .js to <html>, so content is never hidden
   if JavaScript does not run. */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .btn:active {
    transform: none;
  }
}
