/* ItsMedTime / MeuMedicamento static site.
   Source of truth: web/shared/styles.css. Run web/sync.sh after editing. */

:root {
  --indigo: #5856d7;
  --indigo-deep: #3f3ea8;
  --teal: #04c7be;
  --steel: #59adc4;
  --ink: #16161d;
  --ink-soft: #55555f;
  --ink-faint: #6b6b76;
  --paper: #f7f7fa;
  --card: #ffffff;
  --rule: #e6e6ec;
  --shadow: 0 1px 2px rgba(22, 22, 29, 0.04), 0 8px 24px rgba(22, 22, 29, 0.06);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    ui-sans-serif, system-ui, sans-serif;
  --wrap: 1080px;
}

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

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

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

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

a { color: var(--indigo-deep); text-underline-offset: 2px; }
a:hover { color: var(--indigo); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; margin: 0; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 247, 250, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; }
.head-spacer { flex: 1 1 auto; }
.head-links { display: flex; align-items: center; gap: 20px; }
.head-links a {
  font-size: 15px;
  color: var(--ink-soft);
  text-decoration: none;
}
.head-links a:hover { color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 12px;
  background: var(--indigo);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--indigo-deep); color: #fff; transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-note { font-size: 14px; color: var(--ink-faint); margin-top: 12px; }

/* ---------- hero ---------- */

.hero {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  padding: 72px 0 0;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: end;
}
.hero-copy { padding-bottom: 88px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 700; }
.hero .lede {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--ink-soft);
  margin-top: 20px;
  max-width: 34em;
}
.hero-cta { margin-top: 32px; }
.hero-shot { position: relative; }
.hero-shot img { width: 100%; }

/* ---------- alternating feature rows ---------- */

.feature { padding: 88px 0; border-bottom: 1px solid var(--rule); }
.feature:nth-child(even) { background: var(--card); }
.feature .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  align-items: center;
}
.feature.flip .wrap { grid-template-columns: 280px minmax(0, 1fr); }
.feature.flip .feature-copy { order: 2; }
.feature.flip .feature-shot { order: 1; }
.feature h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; }
.feature p { margin-top: 16px; color: var(--ink-soft); max-width: 32em; }

/* notification rows: a real alert card instead of a whole phone */
.feature.notif .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); }
.feature.notif.flip .wrap { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
.feature.notif .feature-shot img {
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(22, 22, 29, 0.18);
}

/* ---------- privacy band ---------- */

.band {
  background: var(--indigo);
  color: #fff;
  padding: 88px 0;
  border-bottom: 1px solid var(--rule);
}
.band h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; max-width: 16em; }
.band p { margin-top: 18px; color: rgba(255, 255, 255, 0.88); max-width: 34em; }
.band a { color: #fff; }
.band .rule {
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--teal);
  margin-bottom: 28px;
}

/* ---------- closing call to action ---------- */

.close-cta { background: var(--card); padding: 88px 0; text-align: center; }
.close-cta h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; }
.close-cta p { margin: 16px auto 0; color: var(--ink-soft); max-width: 30em; }
.close-cta .btn { margin-top: 32px; }

/* ---------- document pages (privacy, support) ---------- */

.doc { padding: 64px 0 96px; }
.doc h1 { font-size: clamp(30px, 4.4vw, 40px); font-weight: 700; }
.doc .updated { margin-top: 12px; color: var(--ink-faint); font-size: 15px; }
.doc .intro { margin-top: 28px; font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.doc .intro p + p { margin-top: 12px; }
.doc section { margin-top: 44px; max-width: 34em; }
.doc h2 { font-size: 21px; font-weight: 650; }
.doc section p { margin-top: 14px; color: var(--ink-soft); }
.doc .lead-in { font-size: 19px; color: var(--ink); }

.mail-card {
  margin-top: 32px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 16px;
  box-shadow: var(--shadow);
  max-width: 34em;
}
.mail-card a.mail {
  display: inline-block;
  margin-top: 6px;
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--indigo-deep);
  word-break: break-word;
}
.mail-card .label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.mail-card p { margin-top: 16px; color: var(--ink-soft); font-size: 16px; }

/* ---------- footer ---------- */

.site-foot {
  padding: 40px 0 56px;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 15px;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}
.site-foot a { color: var(--ink-soft); text-decoration: none; }
.site-foot a:hover { color: var(--ink); }
.foot-spacer { flex: 1 1 auto; }

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  .hero { padding-top: 48px; }
  .hero .wrap,
  .feature .wrap,
  .feature.flip .wrap,
  .feature.notif .wrap,
  .feature.notif.flip .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .hero-copy { padding-bottom: 0; }
  .hero-shot,
  .feature-shot { max-width: 260px; margin-inline: auto; }
  .feature.notif .feature-shot { max-width: 440px; }
  .feature.flip .feature-copy { order: 1; }
  .feature.flip .feature-shot { order: 2; }
  .feature { padding: 64px 0; }
  .band, .close-cta { padding: 64px 0; }
  .wrap { width: min(100% - 40px, var(--wrap)); }
  .head-links { gap: 16px; }
  .head-links a { font-size: 14px; }
}

@media (max-width: 460px) {
  .brand span { display: none; }
  .btn { width: 100%; }
}

/* ---------- dark ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f2f5;
    --ink-soft: #a9a9b4;
    --ink-faint: #7c7c87;
    --paper: #101014;
    --card: #17171d;
    --rule: #2a2a33;
    --indigo-deep: #8583ea;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
  .site-head { background: rgba(16, 16, 20, 0.82); }
  .btn { background: var(--indigo); }
  .btn:hover { background: #6b69e0; }
  .band { background: #26258f; }
}
