/* Nanix presentation site. Colours follow the mobile app's theme (apps/mobile/src/lib/theme.ts in ivobrabec/nanix). */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #F6F5F1;
  --card: #FFFFFF;
  --text: #1D2420;
  --muted: #5C6660;
  --border: #DAD8D0;
  --primary: #2F6B4F;
  --primary-dark: #204E39;
  --deep: #17362A;
  --soft: #E3EFE8;
  --warn: #8A5A00;
  --warn-soft: #FFF1D6;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(29, 36, 32, .06), 0 12px 32px -12px rgba(29, 36, 32, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

h1, h2 { font-family: var(--serif); font-weight: 560; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); }
h1 em { font-style: normal; color: var(--primary); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 650; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; text-wrap: pretty; }
.fine { font-size: .92rem; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px;
  background: var(--primary); color: #fff; font-weight: 650; text-decoration: none; border-radius: 14px;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-small { min-height: 42px; padding: 0 18px; border-radius: 12px; font-size: .95rem; }
.btn-ghost { background: var(--soft); color: var(--primary); }
.btn-ghost:hover { background: #D5E6DC; }
.btn-light { background: #fff; color: var(--deep); }
.btn-light:hover { background: var(--soft); }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(246, 245, 241, .88); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.nav.scrolled { border-bottom-color: var(--border); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 600 1.35rem/1 var(--serif); color: var(--text); text-decoration: none; }
.logo svg { width: 32px; height: 32px; }
.nav nav { display: flex; gap: 26px; margin-left: auto; }
.nav nav a { color: var(--text); text-decoration: none; font-size: .96rem; font-weight: 500; }
.nav nav a:hover { color: var(--primary); }

/* Phone frame */
.phone {
  display: block; padding: 9px; background: #1D2420; border: 0; border-radius: 42px; box-shadow: var(--shadow), 0 30px 60px -30px rgba(23, 54, 42, .45);
  width: 100%; max-width: 300px; aspect-ratio: 408 / 862; overflow: hidden;
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 34px; }

/* QR sticker */
.sticker {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: #fff; border: 1.5px dashed #B9B6AA; border-radius: 14px;
}
.sticker img { flex: none; image-rendering: pixelated; }
.sticker div { display: grid; line-height: 1.3; }
.sticker strong { font-size: 1rem; }
.sticker small { color: var(--muted); font-size: .86rem; }
.sticker-icon { font-size: 1.25rem; line-height: 1; margin-bottom: 4px; }

/* Hero */
.hero { padding: 56px 0 72px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero .lead { margin-top: 22px; font-size: 1.22rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-points { margin-top: 26px; display: grid; gap: 8px; color: var(--muted); font-size: .98rem; }
.hero-points li { padding-left: 26px; position: relative; }
.hero-points li::before, .ticks li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.3l2.3 2.3 4.7-5' fill='none' stroke='%232F6B4F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.hero-art { position: relative; display: grid; justify-items: center; padding: 20px 0; }
.hero-art::before { content: ""; position: absolute; inset: 6% 4% 0; background: var(--soft); border-radius: 48% 52% 44% 56% / 52% 46% 54% 48%; }
.phone-hero { position: relative; max-width: 310px; }
.sticker-hero { position: absolute; z-index: 2; left: 0; bottom: 14%; box-shadow: var(--shadow); transform: rotate(-4deg); }
.toast {
  position: absolute; z-index: 2; right: -12px; top: 1%; display: flex; gap: 12px; align-items: center; padding: 12px 16px;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow); line-height: 1.3;
}
.toast div { display: grid; }
.toast small { color: var(--muted); font-size: .84rem; }
.toast-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 5px var(--soft); }

/* Trio */
.trio { padding-bottom: 88px; }
.trio-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.trio article { padding: 30px 30px 32px; }
.trio article + article { border-left: 1px solid var(--border); }
.trio-icon { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.trio p { color: var(--muted); margin-top: 6px; font-size: 1rem; }

/* Sections */
section { position: relative; }
.section-head { margin-bottom: 44px; }
.section-head h2 { max-width: 20ch; }
.section-head .lead { margin-top: 18px; }
.section-head-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; }

/* QR */
.qr { background: var(--card); border-block: 1px solid var(--border); padding: 96px 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { padding: 26px; background: var(--bg); border-radius: var(--radius); }
.step-n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; font: 600 1.1rem var(--serif); margin-bottom: 16px; }
.steps p { color: var(--muted); margin-top: 6px; font-size: 1rem; }

.home { margin-top: 28px; padding: 30px; background: var(--soft); border-radius: var(--radius); }
.home-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 22px; }
.home-head h3 { font: 600 1.35rem var(--serif); }
.home-head p { color: var(--muted); font-size: .98rem; }
.stickers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stickers .sticker { transition: transform .2s; }
.stickers .sticker:nth-child(odd):hover { transform: rotate(-1.5deg) scale(1.02); }
.stickers .sticker:nth-child(even):hover { transform: rotate(1.5deg) scale(1.02); }
.sticker-door { border-color: var(--primary); border-style: solid; }

.door { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 80px; }
.door-text h3 { font: 560 clamp(1.5rem, 2.6vw, 2rem)/1.15 var(--serif); letter-spacing: -.01em; }
.door-text > p { margin-top: 14px; color: var(--muted); }
.ticks { display: grid; gap: 10px; margin-top: 20px; }
.ticks li { position: relative; padding-left: 28px; }
.door-text .fine { margin-top: 24px; padding: 16px 18px; background: var(--warn-soft); color: #5E4300; border-radius: 14px; }
.door-phones { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; justify-items: center; }
.door-phones .phone { max-width: 250px; }
.phone-back { margin-top: 56px; }

/* Alzheimer */
.alz { padding: 96px 0; }
.alz .section-head h2 { max-width: 24ch; }
.alz-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.card h3 { font: 600 1.25rem/1.25 var(--serif); }
.card p { color: var(--muted); margin-top: 8px; font-size: 1rem; }
.alz-quote { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; margin-top: 56px; padding: 44px 56px; background: var(--deep); color: #EAF2ED; border-radius: 28px; }
.alz-quote .phone { max-width: 250px; background: #0C1F18; }
.alz-quote h3 { font: 560 clamp(1.5rem, 2.6vw, 2.1rem)/1.15 var(--serif); color: #fff; }
.alz-quote p { margin-top: 14px; max-width: 48ch; }
.alz-quote .fine { color: #A9C4B6; margin-top: 22px; }

/* Gallery */
.gallery { background: var(--card); border-block: 1px solid var(--border); padding: 96px 0 72px; }
.gallery .section-head { margin-bottom: 28px; }
.gallery-nav { display: flex; gap: 10px; flex: none; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.round:hover { background: var(--soft); border-color: var(--primary); }
.strip {
  display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 20px max(20px, calc((100vw - 1120px) / 2)) 28px;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.strip figure { flex: none; width: 250px; scroll-snap-align: center; }
.strip .phone { cursor: zoom-in; transition: transform .2s; }
.strip .phone:hover { transform: translateY(-4px); }
.strip figcaption { margin-top: 16px; font-size: .95rem; color: var(--muted); line-height: 1.45; }
.strip figcaption strong { display: block; color: var(--text); font-size: 1.02rem; }

/* Roles */
.roles { padding: 96px 0; }
.roles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: start; }
.role { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.role h3 { font: 600 1.5rem var(--serif); }
.role-lead { color: var(--muted); margin-top: 4px; }
.role .ticks { font-size: .98rem; }
.role-main { background: var(--soft); border-color: transparent; }
.role-main .ticks li::before { background-color: #fff; }

/* Pricing */
.pricing { background: var(--card); border-top: 1px solid var(--border); padding: 96px 0; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 18px; align-items: stretch; }
.price { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.price h3 { font: 600 1.5rem/1.2 var(--serif); }
.period { display: inline-flex; align-self: start; gap: 4px; margin-top: 18px; padding: 4px; background: #fff; border: 1px solid var(--border); border-radius: 999px; }
.period button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font: 600 .95rem var(--sans); color: var(--muted); cursor: pointer; }
.period button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.period button span { margin-left: 4px; padding: 2px 7px; border-radius: 999px; background: var(--warn-soft); color: #5E4300; font-size: .8rem; }
.price-amount { margin-top: 18px; color: var(--muted); }
.price-amount strong { font: 600 2.6rem/1 var(--serif); color: var(--text); letter-spacing: -.02em; margin-right: 4px; }
.price-note { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.price-badge { align-self: start; margin-top: 16px; padding: 6px 14px; background: var(--warn-soft); color: #5E4300; font-weight: 650; font-size: .92rem; border-radius: 999px; }
.price .ticks { font-size: .98rem; margin-bottom: 26px; }
.price .btn { margin-top: auto; }
.price-main { background: var(--soft); border-color: var(--primary); }
.price-main .ticks li::before { background-color: #fff; }
.price-refer { background: var(--deep); border-color: transparent; color: #EAF2ED; }
.price-refer h3 { color: #fff; }
.price-refer p { margin-top: 14px; }
.price-refer strong { color: #fff; }
.price-refer .fine { color: #A9C4B6; margin-top: auto; padding-top: 18px; }
.refer-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-top: 26px; }
.refer-bar span { height: 12px; border-radius: 4px; background: #7FC4A1; }
.refer-bar span:nth-child(1) { opacity: .28; } .refer-bar span:nth-child(2) { opacity: .36; }
.refer-bar span:nth-child(3) { opacity: .44; } .refer-bar span:nth-child(4) { opacity: .52; }
.refer-bar span:nth-child(5) { opacity: .6; } .refer-bar span:nth-child(6) { opacity: .68; }
.refer-bar span:nth-child(7) { opacity: .76; } .refer-bar span:nth-child(8) { opacity: .84; }
.refer-bar span:nth-child(9) { opacity: .92; }
.price-refer .refer-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: .86rem; color: #A9C4B6; }

.modules { margin-top: 18px; padding: 30px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); }
.modules-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-bottom: 22px; }
.modules-head h3 { font: 600 1.5rem/1.2 var(--serif); }
.modules-head p { color: var(--muted); }
.modules-head strong { color: var(--text); }
.modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.module { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; }
.module-icon { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.module h4 { margin: 0; font-size: 1.1rem; font-weight: 650; }
.module p { color: var(--muted); font-size: .96rem; margin-top: 6px; }
[data-plan][hidden] { display: none; }

/* Trust */
.trust { background: var(--soft); padding: 88px 0; }
.trust-in { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.trust-list { display: grid; gap: 22px; }
.trust-list li { padding-left: 20px; border-left: 3px solid var(--primary); color: #33403A; }
.trust-list strong { display: block; color: var(--text); }

/* FAQ */
.faq { padding: 96px 0; }
.faq-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
.faq-list { display: grid; gap: 10px; align-content: start; }
details { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 0 22px; }
summary { cursor: pointer; padding: 18px 28px 18px 0; font-weight: 600; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%; font-size: 1.5rem; font-weight: 400; color: var(--primary); transition: rotate .2s; }
details[open] summary::after { rotate: 45deg; }
details p { padding-bottom: 20px; color: var(--muted); }

/* Final */
.final { padding: 0 0 96px; }
.final-in { background: var(--primary); color: #fff; border-radius: 28px; padding: 72px 32px; text-align: center; display: grid; justify-items: center; gap: 18px; }
.final h2 { max-width: 18ch; }
.final p { color: #D8E8DF; max-width: 46ch; }
.final .btn { margin-top: 10px; }

/* Footer */
.foot { border-top: 1px solid var(--border); padding: 36px 0 48px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; color: var(--muted); font-size: .95rem; }
.foot-small { margin-left: auto; font-size: .86rem; }

/* Lightbox */
dialog { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(23, 54, 42, .82); backdrop-filter: blur(4px); }
dialog img { height: min(88vh, 844px); width: auto; border-radius: 28px; border: 8px solid #1D2420; }
.lightbox-close { position: fixed; top: 18px; right: 18px; }

/* The policy page */
.prose { max-width: 760px; padding-block: 56px 96px; }
.prose h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.prose .lead { margin-top: 20px; }
.prose > .fine { margin-top: 12px; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-top: 52px; }
.prose p, .prose ul { margin-top: 14px; }
.prose ul { display: grid; gap: 10px; padding-left: 22px; list-style: disc; }
.prose li::marker { color: var(--primary); }
.prose code { font-size: .92em; background: var(--soft); padding: 2px 6px; border-radius: 6px; }
.prose .box { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px; }
.toc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; margin-top: 32px; padding: 20px 22px; background: var(--soft); border-radius: 16px; font-size: .96rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 560px) { .toc { grid-template-columns: 1fr; } }

/* Cookie consent */
.cookies {
  position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; margin-inline: auto; max-width: 760px;
  display: flex; align-items: center; gap: 20px; padding: 18px 22px; background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow), 0 20px 50px -20px rgba(23, 54, 42, .4);
}
.cookies[hidden] { display: none; }
.cookies p { font-size: .92rem; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.cookies-actions { display: flex; gap: 10px; flex: none; }
.cookies .btn { border: 0; cursor: pointer; font-family: inherit; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); text-decoration: underline; cursor: pointer; }
@media (max-width: 640px) {
  .cookies { flex-direction: column; align-items: stretch; gap: 14px; }
  .cookies-actions .btn { flex: 1; }
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .hero { padding-top: 32px; }
  .hero-in, .door, .trust-in, .faq-in { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 460px; margin-inline: auto; width: 100%; }
  .trio-in, .steps, .alz-grid, .roles-grid, .pricing-grid, .modules-grid { grid-template-columns: 1fr; }
  .trio article + article { border-left: 0; border-top: 1px solid var(--border); }
  .stickers { grid-template-columns: repeat(2, 1fr); }
  .alz-quote { grid-template-columns: 1fr; padding: 32px 24px; gap: 32px; justify-items: center; }
  .qr, .alz, .gallery, .roles, .faq, .pricing { padding-block: 72px; }
  .section-head-row { align-items: start; }
  .gallery-nav { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .stickers { grid-template-columns: 1fr; }
  .home { padding: 22px 16px; }
  .sticker-hero { left: -4px; bottom: 8%; padding: 10px 12px; }
  .sticker-hero img { width: 60px; height: 60px; }
  .toast { right: -4px; top: 0; }
  .phone-hero { max-width: 250px; }
  .cta-row .btn { width: 100%; }
  .foot-small { margin-left: 0; }
  .strip figure { width: 220px; }
  .final-in { padding: 56px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .strip .phone, .stickers .sticker { transition: none; }
}
