/* AfyaFamily public site — warm, editorial, calm. */
:root {
  --bg: #FFF9F7;
  --surface: #FFFFFF;
  --ink: #2A1220;
  --muted: #6E5463;
  --line: #F0DEE4;
  --rose: #B52061;
  --rose-bright: #D92D72;
  --blush: #FCEBF1;
  --peach: #FFE3DC;
  --night: #2B0F24;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 22px;
  --shadow: 0 18px 48px -24px rgba(91, 20, 58, .35);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.1; }
h1 em, h2 em { font-style: italic; color: var(--rose); }
p { margin: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid rgba(217, 45, 114, .45); outline-offset: 3px; border-radius: 8px; }

.eyebrow { font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--rose); margin-bottom: 18px; }
.eyebrow.light { color: #F6A9C7; }
.lead { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 34em; }
.fine { font-size: 13px; color: var(--muted); margin-top: 18px; }

/* Buttons and badges */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--rose); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; box-shadow: 0 10px 24px -12px rgba(181, 32, 97, .7); }
.button:hover { background: #9E1A53; transform: translateY(-1px); }
.button-dark { background: var(--ink); box-shadow: none; }
.button-dark:hover { background: #000; }
.store-badges { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; margin-top: 32px; }
.store-badges a { border-radius: 9px; transition: transform .2s ease, opacity .2s ease; }
.store-badges a:hover { transform: translateY(-2px); }
.badge-soon { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.badge-soon img { opacity: .55; }
.badge-soon small { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 249, 247, .82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s ease; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 19px/1 var(--serif); letter-spacing: -0.01em; }
.brand img { border-radius: 9px; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; opacity: .8; transition: opacity .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; }
.site-nav .nav-cta { opacity: 1; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; }
.site-nav .nav-cta:hover { background: var(--rose); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.menu-toggle i { display: block; width: 18px; height: 1.6px; background: var(--ink); border-radius: 2px; transition: transform .25s ease; }
.menu-toggle[aria-expanded="true"] i:first-of-type { transform: translateY(3.3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-3.3px) rotate(-45deg); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(44px, 6.2vw, 76px); line-height: 1.02; }
.hero .lead { margin-top: 24px; }
.hero-art { position: relative; height: 620px; }
.hero-glow { position: absolute; inset: 8% -10% 0 6%; background: radial-gradient(closest-side, #FFD3E2, rgba(255, 211, 226, 0)); filter: blur(8px); }
.device { position: absolute; filter: drop-shadow(0 30px 40px rgba(80, 14, 46, .25)); }
.device-front { width: 300px; right: 4%; top: 10px; }
.device-back { width: 270px; left: 2%; top: 70px; transform: rotate(-7deg); opacity: .97; }

/* Trust strip */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.trust-list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-list li { padding: 26px 20px; display: grid; gap: 4px; border-left: 1px solid var(--line); }
.trust-list li:first-child { border-left: 0; padding-left: 0; }
.trust-list strong { font: 500 20px/1.2 var(--serif); }
.trust-list span { font-size: 14px; color: var(--muted); }

/* Sections */
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(34px, 4.4vw, 52px); }
.features { padding: 104px 0 40px; }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding: 48px 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature-flip .feature-copy { order: 2; }
.feature-num { display: block; font: italic 500 18px/1 var(--serif); color: var(--rose); margin-bottom: 18px; }
.feature h3 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 18px; }
.feature p { color: var(--muted); font-size: 17px; max-width: 30em; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--blush) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.5L12 5.4' fill='none' stroke='%23B52061' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.feature-art { margin: 0; display: flex; justify-content: center; position: relative; }
.feature-art::before { content: ""; position: absolute; width: 78%; aspect-ratio: 1; top: 12%; border-radius: 50%; background: radial-gradient(closest-side, #FFE0EA, rgba(255, 224, 234, 0)); }
.feature-art img { position: relative; width: min(320px, 78%); filter: drop-shadow(0 26px 36px rgba(80, 14, 46, .22)); }
.feature-pair { gap: 0; }
.feature-pair img { width: min(270px, 48%); }
.feature-pair img:first-child { transform: rotate(-4deg) translateX(18px); }
.feature-pair img:last-child { transform: rotate(4deg) translate(-18px, 40px); }

.how { padding: 72px 0 104px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; }
.steps b { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blush); color: var(--rose); font: 600 17px/1 var(--serif); margin-bottom: 22px; }
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 15px; }

.privacy-band { background: var(--night); color: #fff; padding: 104px 0; }
.privacy-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; }
.privacy-band h2 { font-size: clamp(32px, 3.8vw, 46px); }
.privacy-band p { color: rgba(255, 255, 255, .72); margin-top: 20px; font-size: 17px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 24px; }
.link-light { display: inline-block; margin-top: 8px; color: #fff; font-weight: 600; }
.privacy-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255, 255, 255, .12); border-radius: var(--radius); overflow: hidden; }
.privacy-points li { background: var(--night); padding: 28px; }
.privacy-points h3 { font-size: 20px; color: #fff; }
.privacy-points p { font-size: 14.5px; margin-top: 8px; }

.partners { padding: 96px 0 0; }
.partners-grid { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 48px; border-radius: 28px; background: linear-gradient(135deg, var(--blush), var(--peach)); }
.partners h2 { font-size: clamp(30px, 3.4vw, 40px); }
.partners p { color: var(--muted); max-width: 40em; margin-top: 14px; }

.faq { padding: 104px 0; }
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font: 500 19px/1.35 var(--serif); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--blush) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3.5v9M3.5 8h9' stroke='%23B52061' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat; transition: transform .25s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { color: var(--muted); padding: 0 40px 22px 0; }

.download { padding: 0 0 104px; }
.download-inner { text-align: center; padding: 72px 24px 88px; border-radius: 32px; background: radial-gradient(90% 80% at 15% 0%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0)), linear-gradient(140deg, #8F174F, #D92D72 60%, #F06A9F); color: #fff; }
.download-inner img { margin: 0 auto 24px; border-radius: 18px; box-shadow: 0 16px 36px -14px rgba(0, 0, 0, .45); }
.download h2 { font-size: clamp(32px, 4vw, 50px); }
.download p { opacity: .85; margin-top: 12px; font-size: 17px; }
.download .store-badges { justify-content: center; }
.download .badge-soon small { color: rgba(255, 255, 255, .8); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 56px 0 32px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand p { color: var(--muted); margin-top: 14px; max-width: 24em; }
.site-footer nav { display: grid; gap: 10px; align-content: start; }
.site-footer h2 { font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.site-footer nav a { color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { color: var(--rose); }
.footer-base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* Inner pages */
.page-hero { padding: 72px 0 40px; }
.page-hero h1 { font-size: clamp(38px, 5vw, 60px); max-width: 16em; }
.page-hero .lead { margin-top: 18px; }
.page-hero .button { margin-top: 28px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 32px 0 0; }
.legal-meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.legal-meta dd { margin: 4px 0 0; font-weight: 600; }
.programme-notice { border: 1px solid var(--line); background: var(--surface); border-radius: 16px; padding: 18px 22px; font-size: 14px; color: var(--muted); }
.programme-notice strong { color: var(--ink); }
.legal-layout { display: grid; grid-template-columns: 230px 1fr; gap: 64px; padding: 48px 0 104px; }
.legal-toc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.legal-toc > p { font-weight: 600; margin-bottom: 12px; }
.legal-toc nav { display: grid; gap: 8px; }
.legal-toc nav a { color: var(--muted); text-decoration: none; }
.legal-toc nav a:hover { color: var(--rose); }
.legal-crosslink { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 6px; }
.legal-crosslink span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.legal-crosslink a { font-weight: 600; text-decoration: none; }
.legal-document { max-width: 760px; }
.legal-document section { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 36px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.legal-document section:first-child { border-top: 0; padding-top: 0; }
.section-number { font: italic 500 18px/1.6 var(--serif); color: var(--rose); }
.legal-document h2 { font-size: 28px; margin-bottom: 14px; }
.legal-document p, .legal-document li { color: #4A3341; font-size: 16px; line-height: 1.75; }
.legal-document p + p { margin-top: 14px; }
.legal-document ul { padding-left: 20px; margin: 14px 0; display: grid; gap: 8px; }
.legal-callout { margin-top: 20px; padding: 18px 20px; border-radius: 14px; background: var(--blush); }
.legal-callout strong { display: block; margin-bottom: 4px; }
.legal-close { margin-top: 32px; padding: 28px; border-radius: var(--radius); background: var(--night); color: #fff; }
.legal-close span { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; opacity: .7; }
.legal-close h2 { color: #fff; font-size: 24px; margin: 10px 0 16px; }
.legal-close a { color: #fff; font-weight: 600; }
.prose { padding-bottom: 104px; }
.prose > * { max-width: 760px; }
.prose h2 { font-size: 26px; margin: 40px 0 12px; }
.prose p, .prose li { color: #4A3341; line-height: 1.75; }
.prose ol, .prose ul { padding-left: 22px; display: grid; gap: 6px; margin: 0 0 14px; }
.support-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; padding-bottom: 104px; }
.support-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: sticky; top: 96px; }
.support-card h2 { font-size: 22px; }
.support-card p { color: var(--muted); font-size: 15px; margin: 8px 0 22px; }
.support-card p:last-child { margin-bottom: 0; }

/* Gentle entrance, only when scripting is available and motion is welcome */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Tablet */
@media (max-width: 980px) {
  .hero-grid, .feature, .privacy-grid, .faq-grid, .support-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-flip .feature-copy { order: 0; }
  .hero-art { height: 520px; max-width: 520px; margin: 0 auto; width: 100%; }
  .device-front { width: 250px; }
  .device-back { width: 225px; }
  .trust-list { grid-template-columns: repeat(2, 1fr); }
  .trust-list li:nth-child(3) { border-left: 0; padding-left: 0; }
  .trust-list li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .partners-grid { flex-direction: column; align-items: flex-start; padding: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc { position: static; }
  .support-card { position: static; }
}

/* Phone */
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
  .site-nav.open { visibility: visible; opacity: 1; transform: none; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); opacity: 1; }
  .site-nav .nav-cta { margin-top: 14px; text-align: center; border: 0; }
  .hero { padding: 36px 0 24px; }
  .lead { font-size: 16.5px; }
  .store-badges img { height: 46px; width: auto; }
  .hero-art { height: 430px; }
  .device-front { width: 200px; right: 6%; }
  .device-back { width: 180px; left: 4%; top: 50px; }
  .trust-list li { padding: 20px 12px 20px 0; }
  .trust-list li:nth-child(even) { padding-left: 14px; }
  .trust-list strong { font-size: 17px; }
  .trust-list span { font-size: 13px; }
  .features, .faq, .privacy-band { padding: 72px 0; }
  .feature { padding: 36px 0; gap: 28px; }
  .feature p { font-size: 16px; }
  .how { padding: 40px 0 72px; }
  .privacy-points { grid-template-columns: 1fr; }
  .partners { padding-top: 56px; }
  .partners-grid { padding: 28px 22px; border-radius: 22px; }
  .download { padding-bottom: 72px; }
  .download-inner { padding: 56px 20px 72px; border-radius: 24px; }
  .footer-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 0 28px; }
  .legal-document section { grid-template-columns: 1fr; }
  .faq-list details p { padding-right: 0; }
}
