/* PeriWise website — brand palette mirrors PeriWise/DesignSystem/PWColor.swift */

:root {
  --bg: #F6F1E7;          /* cream */
  --card: #FDFBF6;        /* warm white */
  --text: #3E4A3D;        /* ink green */
  --text-muted: #767E73;  /* muted ink */
  --sage: #8A9A7B;
  --sage-deep: #6D7E5F;
  --blush: #EAC8C1;
  --lavender: #B5A8C9;
  --coral: #E39B94;
  --radius: 24px;
  --radius-sm: 14px;
  --shadow: 0 6px 24px rgba(62, 74, 61, 0.08);
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #232A22;
    --card: #2F372E;
    --text: #F2EEE5;
    --text-muted: #B4B7AD;
    --sage: #A2B392;
    --sage-deep: #8A9A7B;
    --blush: #EFCFC8;
    --lavender: #C4B8D8;
    --coral: #ECABA4;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
}

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

a { color: var(--sage-deep); }

h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 0.6em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin: 0 0 0.8em; }
h3 { font-size: 1.15rem; margin: 0 0 0.4em; }

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.site-nav {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

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

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

.nav-cta {
  background: var(--sage-deep);
  color: #FDFBF6 !important;
  padding: 8px 18px;
  border-radius: 999px;
}

.nav-cta:hover { background: var(--sage); }

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

.hero {
  padding: 64px 0 32px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 0 1.6em;
}

.hero-art img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* App Store badge-style button */
.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #1D1D1F;
  color: #fff;
  text-decoration: none;
  padding: 10px 22px 10px 18px;
  border-radius: 14px;
  line-height: 1.15;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.appstore-btn:hover { transform: translateY(-2px); opacity: 0.92; }

.appstore-btn svg { width: 28px; height: 28px; flex: none; }

.appstore-btn .small { display: block; font-size: 0.68rem; opacity: 0.85; }
.appstore-btn .big { display: block; font-size: 1.15rem; font-weight: 600; }

.price-note { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Trust strip ---------- */

.trust-strip {
  margin: 48px 0;
}

.trust-strip ul {
  list-style: none;
  margin: 0;
  padding: 18px 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  justify-content: center;
  font-weight: 600;
  font-size: 0.98rem;
}

.trust-strip li { display: flex; align-items: center; gap: 8px; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.sage { background: var(--sage); }
.dot.blush { background: var(--blush); }
.dot.lavender { background: var(--lavender); }
.dot.coral { background: var(--coral); }

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

.section { padding: 56px 0; }

.section-intro {
  max-width: 640px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.split img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.split .kicker,
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sage-deep);
  margin: 0 0 0.6em;
}

/* ---------- Feature grid ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.feature-card .body { padding: 20px 22px 24px; }

.feature-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 12px;
}

.tag.free { background: color-mix(in srgb, var(--sage) 25%, transparent); color: var(--sage-deep); }
.tag.premium { background: color-mix(in srgb, var(--lavender) 30%, transparent); color: var(--text); }

/* ---------- Product / suggestion cards ---------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-card h3 { margin: 6px 0 0; }

.product-card .product-byline {
  margin: 0;
  color: var(--text-secondary, var(--text-muted));
  font-size: 0.92rem;
}

.product-card p { margin: 6px 0 0; color: var(--text-muted); font-size: 0.95rem; }

.product-card .product-credit { font-size: 0.85rem; font-style: italic; }

.tag.kind {
  align-self: flex-start;
  background: color-mix(in srgb, var(--sage) 22%, transparent);
  color: var(--sage-deep);
  margin: 0;
}

.product-link {
  margin-top: auto;
  padding-top: 14px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.product-link:hover { text-decoration: underline; }

.button-link {
  display: inline-block;
  background: var(--sage-deep);
  color: #FDFBF6;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 999px;
}

.button-link:hover { background: var(--sage); }

/* ---------- Callouts ---------- */

.callout {
  border-radius: var(--radius);
  padding: 28px 32px;
  margin: 24px 0;
  background: var(--card);
  box-shadow: var(--shadow);
  border-inline-start: 6px solid var(--sage);
}

.callout.warning { border-inline-start-color: var(--coral); }

.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Banner / quote ---------- */

.banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.banner img { width: 100%; object-fit: cover; }

/* ---------- CTA section ---------- */

.cta-final {
  text-align: center;
  padding: 72px 0;
}

.cta-final .hero-badges { justify-content: center; margin-top: 28px; }

.section-intro.centered { margin-left: auto; margin-right: auto; }

/* ---------- Prose pages (security, contact, imprint) ---------- */

.page-hero { padding: 56px 0 8px; }
.page-hero p.lead { color: var(--text-muted); font-size: 1.15rem; max-width: 680px; }

.prose { max-width: 760px; }

/* Same reading width as .prose, but left-aligned with the rest of the page
   instead of re-centering the container. */
.prose-block > * { max-width: 820px; }
.prose-block h2 { margin-top: 2em; }
.prose h2 { margin-top: 2em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }

.placeholder {
  background: color-mix(in srgb, var(--coral) 18%, transparent);
  border-radius: 6px;
  padding: 0 6px;
  font-style: italic;
}

.contact-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin: 24px 0;
  max-width: 560px;
}

.contact-card p { margin: 0.4em 0; }

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

.site-footer {
  margin-top: 64px;
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  padding: 40px 0 48px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 64px;
  margin-bottom: 24px;
}

.site-footer h3 { font-size: 0.95rem; color: var(--text); }

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

.footer-disclaimer {
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  padding-top: 20px;
  font-size: 0.85rem;
}

/* ---------- Language switcher ---------- */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.lang-switcher label { font-size: 1.1rem; }

.lang-switcher select {
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--text) 15%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

/* ---------- Cookie banner ---------- */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 520px;
  margin: 0 auto;
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  padding: 18px 22px;
  display: none;
}

.cookie-banner.visible { display: block; }

.cookie-banner p { margin: 0 0 14px; font-size: 0.92rem; }

.cookie-banner .actions { display: flex; gap: 12px; align-items: center; }

.cookie-banner button {
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 8px 22px;
  cursor: pointer;
  background: var(--sage-deep);
  color: #FDFBF6;
}

.cookie-banner button:hover { background: var(--sage); }

.cookie-banner a { font-size: 0.88rem; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero .container, .split { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { order: -1; max-width: 420px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .split.reverse img { order: -1; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; font-size: 0.9rem; }
}
