/* Atelas promo site. Colors match github/Atelas/Resources/Styles/AtelasColors.xaml: the dark
   theme (midnight navy) for the night sections, the light theme (soft off-white) for the day ones. */
:root {
  --navy: #0B1026;          /* BackgroundDark */
  --navy-deep: #0A0F24;     /* SessionBackgroundDark */
  --surface: #151D3F;       /* SurfaceDark */
  --text: #EEF1FA;          /* TextPrimaryDark */
  --muted: #A9B1CF;         /* TextSecondaryDark */
  --teal: #6FE0D2;          /* AccentTealDark */
  --lavender: #B9AEF5;      /* AccentLavenderDark */
  --grad-a: #5ED3C6;        /* GradientStartDark */
  --grad-b: #A99BF0;        /* GradientEndDark */
  --outline: rgba(255, 255, 255, .18);
  --divider: rgba(255, 255, 255, .07);

  --day: #F6F4EF;           /* BackgroundLight */
  --day-surface: #FFFFFF;
  --day-surface2: #EEEBE3;
  --ink: #1A1F3A;           /* TextPrimaryLight */
  --ink-muted: #545A75;     /* TextSecondaryLight */
  --teal-ink: #1D7A71;      /* AccentTealLight, 4.5:1 on the day background */
  --lavender-ink: #5E4FC0;

  --accent: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 28px;
  --max: 1080px;
}

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

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

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

img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { font-weight: 800; line-height: 1.12; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h3 { font-size: 1.3rem; }

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

/* Night ground: navy with the app's soft teal and lavender glows (no blur, radial fades). */
.night {
  background-color: var(--navy);
  background-image:
    radial-gradient(60% 50% at 85% 0%, rgba(94, 211, 198, .18), transparent 70%),
    radial-gradient(55% 45% at 0% 100%, rgba(169, 155, 240, .16), transparent 70%);
}
/* A night section right above another one keeps only its top glow, so no glow is cut at the seam. */
.night.lead-in { background-image: radial-gradient(60% 50% at 85% 0%, rgba(94, 211, 198, .18), transparent 70%); }
.day { background: var(--day); color: var(--ink); }

/* Nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-size: 1.5rem; }
.brand img { border-radius: 11px; }
.nav-cta {
  text-decoration: none; font-weight: 700; padding: 10px 20px; border-radius: 999px;
  background: var(--surface); color: var(--text); border: 1px solid var(--outline);
}
.nav-cta:hover { border-color: var(--teal); }

/* Hero */
.hero { padding-bottom: 80px; }
.hero-body { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 40px; }
.eyebrow { color: var(--teal); font-weight: 800; font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 16px; }
.lead { color: var(--muted); font-size: 1.2rem; max-width: 32em; margin: 22px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px;
  padding: 0 28px; border-radius: 999px; font-weight: 800; font-size: 1.05rem; text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--navy); box-shadow: 0 12px 30px rgba(94, 211, 198, .28); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--outline); }
.btn-ghost:hover { border-color: var(--teal); }

/* Breathing circle (hero): one box-breathing cycle, 4-4-4-4, scale 0.56 empty to 1.0 full, as in
   the app (BreathModel). The label and count are set by script.js; without JS the circle still breathes. */
.breath { display: grid; place-items: center; }
.breath-stage { position: relative; width: min(100%, 380px); aspect-ratio: 1; display: grid; place-items: center; }
.breath-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px dashed rgba(238, 241, 250, .22);
}
.breath-halo {
  position: absolute; inset: -6%; border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 211, 198, .35), rgba(169, 155, 240, .18) 55%, transparent 70%);
  animation: breathe 16s ease-in-out infinite;
}
.breath-disc {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #9FEDE3, #6FD8CB 35%, #A99BF0);
  box-shadow: 0 30px 80px rgba(94, 211, 198, .25);
  animation: breathe 16s ease-in-out infinite;
  display: grid; place-items: center;
}
.breath-count { font-size: clamp(3.2rem, 9vw, 4.6rem); font-weight: 800; color: var(--navy); }
.breath-label { margin-top: 22px; text-align: center; font-weight: 800; font-size: 1.5rem; min-height: 1.6em; }
.breath-label small { display: block; font-size: .95rem; font-weight: 600; color: var(--muted); }
@keyframes breathe {
  0%   { transform: scale(.56); }
  25%  { transform: scale(1); }
  50%  { transform: scale(1); }
  75%  { transform: scale(.56); }
  100% { transform: scale(.56); }
}
@media (prefers-reduced-motion: reduce) {
  .breath-halo, .breath-disc { animation: none; transform: scale(.8); }
}

/* Sections */
.section { padding: 92px 0; }
.section h2 { text-align: center; }
.section-lead { text-align: center; max-width: 38em; margin: 16px auto 0; font-size: 1.12rem; }
.night .section-lead { color: var(--muted); }
.day .section-lead { color: var(--ink-muted); }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 52px; }
.card { background: var(--day-surface); border-radius: 24px; padding: 28px; box-shadow: 0 12px 30px rgba(40, 44, 80, .07); }
.card p { color: var(--ink-muted); margin: 10px 0 0; }
.card-icon {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(29, 122, 113, .1); color: var(--teal-ink);
}
.card-icon.lavender { background: rgba(94, 79, 192, .1); color: var(--lavender-ink); }
.card-icon svg { width: 26px; height: 26px; }

/* Private by design */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
.promise li { list-style: none; background: var(--surface); border: 1px solid var(--divider); border-radius: 24px; padding: 26px; }
.promise h3 { font-size: 1.15rem; }
.promise p { color: var(--muted); margin: 8px 0 0; }
.promise ul { margin: 0; padding: 0; }
.promise-wrap { margin: 0; padding: 0; }
.quote { text-align: center; margin: 44px auto 0; font-size: 1.3rem; font-weight: 800; color: var(--teal); }

/* Screenshot gallery */
.gallery-wrap { position: relative; margin-top: 48px; }
.gallery {
  list-style: none; margin: 0; padding: 8px max(20px, calc((100vw - var(--max)) / 2 + 20px)) 24px;
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery li { flex: 0 0 auto; scroll-snap-align: center; }
.gallery figure { margin: 0; }
.gallery img {
  width: 250px; height: auto; border-radius: 30px; border: 6px solid var(--surface);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45); background: var(--navy);
}
.gallery figcaption { text-align: center; margin-top: 14px; font-weight: 700; color: var(--muted); }

.gallery-btn {
  position: absolute; top: calc(50% - 40px); width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: var(--text); color: var(--navy); font-size: 2rem; line-height: 1; cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35); z-index: 1;
}
.gallery-btn.prev { left: 16px; }
.gallery-btn.next { right: 16px; }
.gallery-btn[disabled] { opacity: 0; pointer-events: none; }

/* Promo video (later; see index_new.html) */
.video { max-width: 880px; margin: 32px auto 0; padding: 10px; border-radius: 28px; background: var(--surface); box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 20px; }

/* Steps */
.steps { list-style: none; margin: 52px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps li { text-align: center; padding: 8px 12px; }
.step-dot {
  display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--accent); color: var(--navy); font-size: 2.2rem; font-weight: 800;
  box-shadow: 0 14px 30px rgba(94, 211, 198, .3);
}
.steps p { color: var(--ink-muted); margin: 10px auto 0; max-width: 22em; }

/* Gentle note (the app's safety note) */
.note {
  max-width: 760px; margin: 52px auto 0; padding: 18px 22px; border-radius: 20px;
  background: rgba(94, 79, 192, .08); color: var(--ink-muted); font-size: .98rem;
}
.note strong { color: var(--ink); }

/* Download */
.download { text-align: center; }
.download-icon { margin: 0 auto 26px; border-radius: 26px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 36px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 210px; min-height: 64px; padding: 10px 24px;
  border-radius: 16px; background: var(--text); color: var(--navy); text-decoration: none; text-align: left;
  font-weight: 800; font-size: 1.35rem; line-height: 1.1; transition: transform .15s ease, box-shadow .15s ease;
}
.store:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.store svg { width: 30px; height: 30px; flex: none; }
.store small { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-muted); }

/* Footer */
.footer { background: var(--navy-deep); border-top: 1px solid var(--divider); color: var(--muted); padding: 28px 0; font-size: .95rem; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--text); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.social-links { list-style: none; margin: 0 0 22px; padding: 0 0 22px; border-bottom: 1px solid var(--divider); display: flex; gap: 10px; flex-wrap: wrap; }
.social-links a {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--outline); border-radius: 999px; color: var(--text);
  font-weight: 700; text-decoration: none; transition: border-color .15s;
}
.social-links a:hover { border-color: var(--teal); }
.social-links svg { width: 20px; height: 20px; flex: none; }

/* Text pages (privacy, license) */
.doc { background: var(--day); color: var(--ink); padding: 64px 0 88px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.doc h2 { text-align: left; font-size: 1.45rem; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--ink-muted); }
.doc .updated { color: var(--teal-ink); font-weight: 700; margin: 0 0 24px; }
.doc a { color: var(--teal-ink); overflow-wrap: anywhere; }
.credits { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.credits li { background: var(--day-surface); border-radius: 20px; padding: 18px 22px; box-shadow: 0 8px 22px rgba(40, 44, 80, .06); }
.credits h3 { font-size: 1.15rem; color: var(--ink); }
.credits p { margin: 6px 0 0; }

/* Reveal on scroll (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Tablet / phone */
@media (max-width: 900px) {
  .features, .promise { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding-bottom: 60px; }
  .hero-body { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .breath-stage { width: min(100%, 280px); }
  .section { padding: 64px 0; }
  .features, .promise, .steps { grid-template-columns: 1fr; }
  .gallery img { width: 210px; }
  .gallery-btn { display: none; }
  .store { width: 100%; max-width: 320px; justify-content: center; }
}
