/* ==========================================================================
   Rego website — regoapp.com
   Design tokens and layout. No frameworks, no build step.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Palette drawn from the Rego app icon */
  --paper: #faf7f1;
  --surface: #ffffff;
  --ink: #241d12;
  --muted: #6e6455;
  --line: #eae2d4;
  --line-strong: #ddd2bf;

  --sun: #f5a623;
  --sun-deep: #e8890c;
  --magenta: #e03fa8;
  --sky: #1ea7e8;
  --tangerine: #f45d22;
  --leaf: #76c31f;
  --violet: #8b5cf6;

  --pin-gradient: linear-gradient(135deg, #ffcb47 0%, #f59e0b 60%, #ef8206 100%);
  --hero-wash: radial-gradient(1100px 520px at 82% -10%, rgba(255, 203, 71, 0.28), transparent 62%),
               radial-gradient(760px 420px at -8% 22%, rgba(30, 167, 232, 0.10), transparent 60%),
               radial-gradient(620px 420px at 55% 108%, rgba(224, 63, 168, 0.07), transparent 60%);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --shadow-soft: 0 1px 2px rgba(36, 29, 18, 0.05), 0 10px 32px rgba(36, 29, 18, 0.07);
  --shadow-device: 0 2px 6px rgba(36, 29, 18, 0.12), 0 24px 64px rgba(36, 29, 18, 0.18);

  --content-width: 1120px;
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

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

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.012em; }

p { margin: 0 0 1em; }

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

.section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section-tight { padding: clamp(40px, 6vw, 72px) 0; }

.kicker {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sun-deep);
  margin-bottom: 12px;
}

.lede {
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  color: var(--muted);
  max-width: 44em;
}

.center { text-align: center; }
.center .lede { margin-inline: auto; }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
}

.brand img { width: 34px; height: 34px; border-radius: 8px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9875rem;
  color: var(--ink);
  opacity: 0.82;
}

.site-nav a:hover { opacity: 1; }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  opacity: 1 !important;
  padding: 9px 18px;
  border-radius: 999px;
}

.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; font-size: 1.0625rem; }
  .nav-cta { text-align: center; margin-top: 8px; }
}

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

.hero {
  background: var(--hero-wash);
  overflow: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(24px, 4vw, 48px);
}

.hero-copy .lede { margin-bottom: 28px; }

.hero-platforms {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-top: 14px;
}

.hero-stars {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-stars .stars { color: var(--sun-deep); letter-spacing: 2px; }

.hero-device {
  margin-bottom: -14%;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-device {
    max-width: 320px;
    margin: 0 auto -18%;
  }
}

/* App Store badge + buttons */

.cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.appstore-badge img { height: 54px; width: auto; }

.btn-secondary {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--line-strong);
  padding: 13px 24px;
  border-radius: 999px;
  transition: border-color 120ms ease, background 120ms ease;
}

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

/* --------------------------------------------------------------------------
   Device frames
   -------------------------------------------------------------------------- */

.device {
  position: relative;
  border-radius: clamp(28px, 9%, 54px);
  background: #0c0b09;
  padding: clamp(8px, 2.4%, 14px);
  box-shadow: var(--shadow-device);
  width: 100%;
}

.device img {
  border-radius: clamp(20px, 7%, 42px);
  width: 100%;
}

/* Captures are 1206x2622 (iPhone) / 2752x2064 (iPad); reserving the ratio avoids layout shift */
.device:not(.device-ipad) img { aspect-ratio: 1206 / 2622; object-fit: cover; }
.device-ipad img { aspect-ratio: 2752 / 2064; object-fit: cover; }

.device-ipad {
  border-radius: 32px;
  padding: clamp(10px, 2%, 18px);
}

.device-ipad img { border-radius: 18px; }

/* --------------------------------------------------------------------------
   The loop — five steps
   -------------------------------------------------------------------------- */

.loop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 40px;
  counter-reset: loopstep;
}

@media (max-width: 960px) { .loop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .loop-grid { grid-template-columns: 1fr; } }

.loop-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-soft);
}

.loop-card::before {
  counter-increment: loopstep;
  content: counter(loopstep);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.loop-card:nth-child(1)::before { background: var(--sun-deep); }
.loop-card:nth-child(2)::before { background: var(--magenta); }
.loop-card:nth-child(3)::before { background: var(--sky); }
.loop-card:nth-child(4)::before { background: var(--tangerine); }
.loop-card:nth-child(5)::before { background: var(--leaf); }

.loop-card h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.loop-card p { font-size: 0.9375rem; color: var(--muted); margin: 0; }

/* --------------------------------------------------------------------------
   Alternating feature rows
   -------------------------------------------------------------------------- */

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
  padding: clamp(40px, 6vw, 72px) 0;
}

.feature-row.flip > .feature-media { order: -1; }

.feature-media { max-width: 360px; justify-self: center; width: 100%; }

.feature-media-wide { max-width: none; }

@media (max-width: 880px) {
  .feature-row { grid-template-columns: 1fr; }
  .feature-row.flip > .feature-media { order: 0; }
  .feature-media { max-width: 300px; }
}

.feature-copy h2 { margin-bottom: 14px; }
.feature-copy .lede { font-size: 1.125rem; margin-bottom: 18px; }

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  padding-left: 30px;
  position: relative;
  color: var(--muted);
}

.feature-list li strong { color: var(--ink); font-weight: 650; }

.feature-list .pin {
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 17px;
  height: 22px;
}

/* Small "new" chip */
.chip {
  display: inline-block;
  vertical-align: 0.14em;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--magenta);
  border-radius: 999px;
  padding: 3px 9px;
  margin-left: 8px;
}

/* --------------------------------------------------------------------------
   Card grids (What's new, use cases)
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}

@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .card-grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
}

.card h3 { font-size: 1.125rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.9875rem; margin: 0; }

.card-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--sun) 16%, #fff);
}

.card-icon svg { width: 24px; height: 24px; }

/* --------------------------------------------------------------------------
   Wide showcase (iPad)
   -------------------------------------------------------------------------- */

.showcase {
  background: linear-gradient(180deg, transparent, rgba(245, 166, 35, 0.07) 30%, rgba(245, 166, 35, 0.07) 70%, transparent);
}

.showcase .device-ipad {
  max-width: 900px;
  margin: 48px auto 0;
}

/* --------------------------------------------------------------------------
   Privacy band
   -------------------------------------------------------------------------- */

.privacy-band {
  background: #191510;
  color: #f4ede1;
}

.privacy-band h2 { color: #fff; }
.privacy-band .lede { color: #bdb2a0; }

.privacy-band .card {
  background: #221d16;
  border-color: #322b20;
  box-shadow: none;
}

.privacy-band .card h3 { color: #fff; }
.privacy-band .card p { color: #bdb2a0; }

.privacy-band .card-icon { background: rgba(245, 166, 35, 0.14); }

/* --------------------------------------------------------------------------
   Reviews
   -------------------------------------------------------------------------- */

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 44px;
}

@media (max-width: 960px) { .review-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .review-grid { grid-template-columns: 1fr; } }

.review {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.review .stars {
  color: var(--sun-deep);
  letter-spacing: 2px;
  font-size: 0.9375rem;
  margin-bottom: 10px;
}

.review h3 { font-size: 1.0625rem; margin-bottom: 8px; }

.review p {
  color: var(--muted);
  font-size: 0.9875rem;
  margin: 0 0 14px;
}

.review footer {
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   FAQ (details/summary)
   -------------------------------------------------------------------------- */

.faq-list {
  max-width: 780px;
  margin: 40px auto 0;
  display: grid;
  gap: 12px;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 4px 22px;
  box-shadow: var(--shadow-soft);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.0625rem;
  padding: 16px 28px 16px 0;
  list-style: none;
  position: relative;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--sun-deep);
  transition: transform 160ms ease;
}

.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-list details > div {
  padding: 0 0 18px;
  color: var(--muted);
}

.faq-list details > div a { color: var(--sun-deep); }

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

.cta-final {
  text-align: center;
  background: var(--hero-wash);
}

.cta-final .app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 28px;
  box-shadow: var(--shadow-soft);
}

.cta-final .cta-row { justify-content: center; margin-top: 30px; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 52px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 36px;
  align-items: center;
}

.site-footer .brand { font-size: 1.0625rem; }
.site-footer .brand img { width: 26px; height: 26px; border-radius: 6px; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-right: auto;
}

.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Article pages (privacy, contact)
   -------------------------------------------------------------------------- */

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 80px) 24px;
}

.article h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
.article h2 { font-size: 1.5rem; margin-top: 2.2em; }
.article h3 { margin-top: 1.6em; }
.article ul { padding-left: 1.3em; color: var(--muted); }
.article li { margin-bottom: 0.4em; }
.article p { color: var(--muted); }
.article .lede { color: var(--muted); }
.article a { color: var(--sun-deep); }

/* --------------------------------------------------------------------------
   Screenshot fallback placeholder
   -------------------------------------------------------------------------- */

.shot-placeholder {
  aspect-ratio: 1206 / 2622;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: #8a7f6d;
  font-size: 0.875rem;
  font-weight: 600;
  background:
    radial-gradient(340px 220px at 70% 18%, rgba(255, 203, 71, 0.25), transparent 65%),
    radial-gradient(280px 220px at 25% 80%, rgba(30, 167, 232, 0.14), transparent 65%),
    #f3eee5;
  border-radius: clamp(20px, 7%, 42px);
  width: 100%;
}

/* --------------------------------------------------------------------------
   Reveal animation
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 520ms ease, transform 520ms ease;
  }
  .reveal.in { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

.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;
}
