/* Colours come from theme.css, which build.py writes from profile.json. */

@font-face {
  font-family: "DM Sans";
  src: url(fonts/dm-sans-latin-wght-normal.woff2) format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}

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

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

body {
  margin: 0;
  min-height: 100lvh;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--grad-bottom);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ------------------------------------------------------------ page shell */

.backdrop { position: fixed; inset: 0; z-index: -2; background: var(--backdrop); }

.frame {
  position: relative;
  width: 100%;
  max-width: 580px;
  min-height: 100lvh;
  margin: 0 auto;
  padding-bottom: 96px;
}

/* The gradient is pinned to the viewport and clipped to the card, so the
   colours stay put while the links scroll over them. */
.frame-bg { position: absolute; inset: 0; z-index: -1; clip-path: inset(0); }
.gradient {
  position: fixed;
  top: 0;
  left: 50%;
  width: 100%;
  max-width: 580px;
  height: 100lvh;
  transform: translateX(-50%);
  background: linear-gradient(0deg, var(--grad-bottom), var(--grad-top));
}

/* lava.js / smoke.js drop their canvas in here; until (or unless) it draws, the gradient shows. */
.lava, .smoke { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease-out; }
.lava.is-on, .smoke.is-on { opacity: 1; }

@media (min-width: 640px) {
  .backdrop::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .2); }
  .frame {
    margin-top: 40px;
    min-height: calc(100lvh - 40px);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 24px 32px rgb(0 0 0 / .15);
  }
  .frame-bg { clip-path: inset(0 round 24px 24px 0 0); }
}

/* ------------------------------------------------------------ top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  height: 0;               /* floats over the header without pushing it down */
  padding: 0 12px;
  pointer-events: none;
}
.glass-btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-top: 12px;
  border-radius: 16px;
  color: #000;
  background: color-mix(in srgb, rgb(255 255 255 / .5), #03202f 12%);
  outline: 1px solid rgb(255 255 255 / .4);
  -webkit-backdrop-filter: blur(16px) brightness(1.4);
  backdrop-filter: blur(16px) brightness(1.4);
  transition: transform .3s ease-out;
}
.glass-btn:active { transform: scale(.95); }
.glass-btn:focus-visible { outline: 2px solid #fff; }

@media (min-width: 640px) {
  .topbar { padding: 0 28px; }
  .glass-btn { margin-top: 28px; }
}

/* ------------------------------------------------------------ profile */

.profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 104px 42px 0;
  text-align: center;
}
.avatar { display: block; width: 96px; height: 96px; border-radius: 9999px; object-fit: cover; }
.profile h1 { margin-top: 15px; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.3px; }
/* text that sits straight on the background gets a soft shadow for when a bright wisp passes behind it */
.profile h1, .bio, .foot { text-shadow: 0 1px 10px rgb(1 14 21 / .55); }
.social svg { filter: drop-shadow(0 1px 6px rgb(1 14 21 / .45)); }
.bio { margin-top: 5px; font-size: 16px; font-weight: 500; line-height: 24px; text-wrap: balance; }

.socials { display: flex; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.social { display: flex; padding: 8px; border-radius: 12px; transition: transform .15s ease-out; }
.social:hover { transform: scale(1.1); }

/* ------------------------------------------------------------ links */

.links { display: flex; flex-direction: column; gap: 14px; padding: 32px 14px 0; }
@media (min-width: 640px) { .links { padding: 32px 28px 0; } }

.link {
  position: relative;
  border: 1px solid var(--text);
  border-radius: 32px;
  /* frosted glass: smoke drifting behind a label must not cost it its legibility */
  background: rgb(3 32 47 / .35);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
  transition: transform .15s cubic-bezier(.2, .8, .2, 1), background-color .15s;
}
.link:hover { transform: scale(1.02); background: rgb(167 25 48 / .55); }
.link:active { transform: scale(.99); }
.link.is-target { animation: nudge .9s ease-out 2; }
@keyframes nudge { 40% { transform: scale(1.04); background: rgb(255 255 255 / .28); } }

.link-hit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  padding: 8px 64px;
  border-radius: inherit;
  text-align: center;
}
.link-text { display: flex; flex-direction: column; align-items: center; }
.link-title { font-size: 16px; font-weight: 500; line-height: 1.2; letter-spacing: -.35px; text-wrap: balance; }
.link-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: -.2px;
  opacity: .75;
}

.thumb {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  overflow: hidden;
  pointer-events: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.link-more {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 64px;
  opacity: .7;
  transition: opacity .15s, background-color .15s;
}
.link-more:hover { opacity: 1; background: rgb(255 255 255 / .2); }
/* finger-sized hit area without changing the visual size */
.link-more::before { content: ""; position: absolute; inset: -10px; }

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

.frame { display: flex; flex-direction: column; padding-bottom: 0; }
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: auto;                 /* pinned to the bottom of the card when the links are few */
  padding: 72px 24px max(28px, env(safe-area-inset-bottom));
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}
.foot a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ privacy page */

.doc-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 14px 0; }
.doc-back, .doc-who { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.doc-back { height: 40px; padding: 0 16px 0 12px; border-radius: 16px; color: #000; background: color-mix(in srgb, rgb(255 255 255 / .5), #03202f 12%); outline: 1px solid rgb(255 255 255 / .4); }
.doc-who img { width: 40px; height: 40px; border-radius: 999px; }
.doc-paper { margin: 20px 14px 0; padding: 28px 22px 26px; border-radius: 24px; color: #1b1c19; background: #fff; box-shadow: 0 16px 32px rgb(0 0 0 / .12); }
.doc-paper h1 { font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.6px; }
.doc-paper h2 { margin-top: 28px; font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -.2px; }
.doc-paper p, .doc-paper ul { margin-top: 10px; font-size: 15px; line-height: 24px; color: #3d3f38; text-wrap: pretty; }
.doc-paper ul { padding-left: 20px; list-style: disc; }
.doc-paper li + li { margin-top: 8px; }
.doc-paper strong { color: #1b1c19; font-weight: 700; }
.doc-paper a { color: #a71930; text-decoration: underline; text-underline-offset: 3px; }
.doc-paper .doc-lede { margin-top: 14px; font-size: 17px; line-height: 26px; color: #1b1c19; }
.doc-paper .doc-date { margin-top: 28px; padding-top: 16px; border-top: 1px solid #e6e6e1; font-size: 13px; color: #676b5f; }
.doc .foot { padding-top: 32px; }
@media (min-width: 640px) {
  .doc-head { padding: 28px 28px 0; }
  .doc-paper { margin: 24px 28px 0; padding: 36px 36px 30px; }
}

/* ------------------------------------------------------------ QR (desktop) */

.qr {
  position: fixed;
  right: 32px;
  bottom: 32px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
}
.qr svg { display: block; width: 120px; height: 120px; }
@media (min-width: 1022px) { .qr.is-ready { display: flex; } }

/* ------------------------------------------------------------ dialogs */

dialog {
  padding: 0;
  border: 0;
  color: #000;
  background: #fff;
  max-width: none;
  max-height: none;
  overflow: hidden;
}
dialog::backdrop { background: rgb(0 0 0 / .6); }
/* Only the share dialog rises. Sheets morph out of the link that opened them:
   see morph() in app.js, which needs them to start with no CSS animation. */
.share[open] { animation: rise .28s cubic-bezier(.2, .8, .2, 1); }
dialog[open]::backdrop { animation: fade .2s linear; }
dialog.is-closing::backdrop { opacity: 0; transition: opacity .2s linear; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

body:has(dialog[open]) { overflow: hidden; }

/* content sheet: contact card, product list */
.sheet {
  width: min(524px, 100%);
  height: min(874px, calc(100dvh - 126px));
  margin: auto;
  border-radius: 32px;
}
.sheet[open] { display: flex; flex-direction: column; }
.sheet-head { padding: 22px 56px 0; text-align: center; }
.sheet-head h2 { font-size: 16px; font-weight: 700; line-height: 1.2; letter-spacing: -.2px; }
.sheet-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  line-height: 18px;
  color: #676b5f;
}
.sheet-body { flex: 1; overflow-y: auto; padding: 32px 24px 96px; display: flex; flex-direction: column; }
.sheet-empty { margin: auto; font-size: 14px; color: #676b5f; }
.sheet-foot {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.sheet-foot > * { pointer-events: auto; }
.sheet-actions { margin-right: auto; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #a71930;
  box-shadow: 0 8px 20px rgb(0 0 0 / .18);
  transition: transform .15s;
}
.pill-btn:hover { transform: scale(1.03); }
.round-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(0 0 0 / .16), 0 0 0 1px rgb(0 0 0 / .04);
  transition: transform .15s;
}
.round-btn:hover { transform: scale(1.06); }

.contact-name { font-size: 20px; font-weight: 700; text-align: center; letter-spacing: -.3px; }
.contact-role { margin-top: 2px; font-size: 14px; color: #676b5f; text-align: center; }
.contact-rows { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.contact-rows li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: #f3f3f1; }
.contact-ico { display: flex; color: #676b5f; }
.contact-field { display: flex; flex-direction: column; min-width: 0; }
.contact-label { font-size: 12px; line-height: 16px; color: #676b5f; }
.contact-val { font-size: 15px; font-weight: 600; line-height: 22px; overflow-wrap: anywhere; }
a.contact-val:hover { text-decoration: underline; }

/* contact form */
.form-intro { margin-bottom: 20px; font-size: 15px; line-height: 22px; color: #3d3f38; text-align: center; text-wrap: pretty; }
.form { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px 12px; border-radius: 16px; background: #f3f3f1; border: 1.5px solid transparent; cursor: text; transition: border-color .15s, background-color .15s; }
.field > span { font-size: 12px; line-height: 16px; color: #676b5f; }
.field input, .field textarea {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  font: inherit;
  font-size: 16px;           /* below 16px iOS zooms the page on focus */
  font-weight: 500;
  line-height: 22px;
  color: #000;
  background: none;
  resize: none;
}
.field:focus-within { border-color: #000; background: #fff; }
.field.is-bad { border-color: #c4320a; background: #fff6f3; }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 12px; line-height: 18px; color: #676b5f; text-align: center; }
.form-note a { text-decoration: underline; text-underline-offset: 2px; }
.form-status { min-height: 20px; font-size: 14px; line-height: 20px; color: #c4320a; text-align: center; }

.form-done { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; outline: 0; }
.form-done-ico { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 10px; border-radius: 999px; color: #fff; background: #1f8a4c; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.form-done h3 { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.form-done p { max-width: 320px; font-size: 15px; line-height: 22px; color: #3d3f38; }
.text-btn { margin-top: 10px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.pill-btn[disabled] { background: #9a9a9a; box-shadow: none; cursor: default; transform: none; }
.pill-btn.is-busy .pill-label::after { content: "…"; }

.product-desc { font-size: 15px; line-height: 22px; color: #3d3f38; text-align: center; text-wrap: pretty; }
.product-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.product { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 16px; background: #f3f3f1; }
.product img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.product-title { font-size: 14px; font-weight: 600; line-height: 18px; }
.product-price { font-size: 13px; color: #676b5f; }

/* share dialog */
.share { width: min(520px, 100%); margin: auto; border-radius: 24px; }
.share-head { position: relative; padding: 26px 56px 0; text-align: center; }
.share-head h2 { font-size: 16px; font-weight: 700; line-height: 20px; }
.icon-btn {
  position: absolute;
  right: 20px;
  top: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
.icon-btn:hover { background: #f3f3f1; }

.share-preview { display: flex; justify-content: center; padding: 26px 28px 0; }
.share-card { display: flex; flex-direction: column; align-items: center; text-align: center; border-radius: 24px; }
.share-card-page { width: 100%; padding: 32px 24px 30px; color: #fff; background: #232b2f; }
.share-card-page img { width: 112px; height: 112px; border-radius: 999px; }
.share-card-page .share-card-title { margin-top: 18px; font-size: 24px; font-weight: 800; line-height: 1.15; letter-spacing: -.4px; }
.share-card-page .share-card-sub { font-size: 16px; font-weight: 600; opacity: .9; }
.share-card-link { width: 326px; max-width: 100%; padding: 24px 24px 26px; background: #f3f3f1; border: 1px solid #e0e2d9; box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
.share-card-thumb { display: flex; align-items: center; justify-content: center; width: 120px; height: 120px; border-radius: 8px; overflow: hidden; color: #fff; background: linear-gradient(0deg, var(--grad-bottom), var(--grad-top)); }
.share-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.share-card-link .share-card-title { margin-top: 16px; font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.4px; text-wrap: balance; }
.share-card-link .share-card-sub { margin-top: 6px; font-size: 14px; font-weight: 500; }

.share-targets {
  display: flex;
  gap: 4px;
  margin-top: 22px;
  padding: 4px 16px 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.share-targets::-webkit-scrollbar { display: none; }
.share-target { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 72px; padding: 2px 0; border-radius: 12px; }
.share-ico { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; color: #fff; transition: transform .15s; }
.share-target:hover .share-ico { transform: scale(1.08); }
.share-label { font-size: 12px; line-height: 16px; white-space: nowrap; }
.share-copy, .share-email, .share-more { color: #000; background: #e0e2d9; }
.share-x { background: #000; }
.share-facebook { background: #1877f2; }
.share-whatsapp { background: #25d366; }
.share-linkedin { background: #0a66c2; }
.share-messenger { color: #0084ff; background: #f0f0f0; }
.share-snapchat { color: #000; background: #fffc00; }

/* phones: dialogs become bottom sheets */
@media (max-width: 639px) {
  .sheet, .share { width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .sheet { height: min(100dvh - 48px, 760px); }
  .share-targets { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .sheet-foot { bottom: max(16px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, dialog[open], dialog[open]::backdrop { animation: none !important; transition: none !important; }
}

/* SMS opt-in form on /sms (#opt-in). Reuses .field / .field-hp / .form-status / .pill-btn from the
   contact form; these rules only add the consent row, the disclosure next to the button, and the
   screenshot figure. */
.optin { margin-top: 28px; padding: 22px 18px 20px; border-radius: 20px; background: #f7f7f5; border: 1px solid #e6e6e1; scroll-margin-top: 16px; }
.optin h2 { margin-top: 0; }
.optin-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.optin-form .field { background: #fff; border-color: #e0e0da; }
.optin-form .field:focus-within { border-color: #000; }
.optin-consent { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1.5px solid #e0e0da; }
.optin-consent.is-bad { border-color: #c4320a; background: #fff6f3; }
.optin-consent input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: #a71930; cursor: pointer; }
.optin-consent label { font-size: 14px; line-height: 21px; color: #1b1c19; cursor: pointer; }
.optin-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.optin-submit .pill-btn { flex: none; }
.optin-disclosure { flex: 1 1 220px; margin: 0 !important; font-size: 13px !important; line-height: 19px !important; color: #3d3f38; }
.optin-turnstile:empty { display: none; }
.optin-turnstile:not(:has(iframe)) { margin-bottom: -10px; }   /* invisible (interaction-only) widget: no extra gap */
.optin-turnstile iframe { max-width: 100%; }
.optin-done { margin-top: 14px; padding: 16px; border-radius: 16px; background: #eaf6ee; border: 1px solid #b8e0c6; outline: 0; }
.optin-done h3 { font-size: 18px; font-weight: 700; color: #145c33; }
.optin-done p { margin-top: 6px; }
.optin-shot { margin-top: 22px; scroll-margin-top: 16px; }
.optin-shot img { display: block; width: 100%; max-width: 560px; height: auto; border-radius: 14px; border: 1px solid #e0e0da; }
.optin-shot figcaption { margin-top: 8px; font-size: 13px; line-height: 19px; color: #676b5f; }
