/* Societies website - shared styles. Colours follow the app's Theme.xaml. */
:root {
  --bg: #F6F4FC;
  --surface: #FFFFFF;
  --text: #1F1A33;
  --subtle: #6B6680;
  --muted: #8A84A3;
  --accent: #512BD4;
  --accent-deep: #2B0B98;
  --accent-soft: #EEE9FC;
  --border: #E7E2F6;
  --divider: #EFEBF8;
  --magenta: #D600AA;
  --danger: #D93025;
  --shadow: 0 1px 2px rgba(31, 26, 51, .04), 0 8px 24px rgba(81, 43, 212, .08);
  --radius: 18px;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110D20;
    --surface: #1A1530;
    --text: #F1EEFB;
    --subtle: #B3ADCB;
    --muted: #8E88A8;
    --accent: #9C85F0;
    --accent-deep: #C9BCF7;
    --accent-soft: #261E47;
    --border: #2C2549;
    --divider: #241E3D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 99; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--divider);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.tile { background: linear-gradient(145deg, #6A45E8, #2B0B98); border-radius: 10px; display: grid; place-items: center; flex: none; }
.brand .tile { width: 36px; height: 36px; }
.brand .tile img { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--subtle); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; background: none; border: 0; color: var(--text); padding: 8px; border-radius: 10px; cursor: pointer; }
.menu-toggle:hover { background: var(--accent-soft); }

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 10px 16px 16px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 12px; }
  .nav .btn { margin: 8px 0 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff !important; text-decoration: none;
  font-weight: 700; font-size: .95rem; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--accent-deep); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #140E2A !important; } }
.btn-ghost { background: var(--accent-soft); color: var(--accent) !important; }
.btn-ghost:hover { background: var(--border); }

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: #0D0A1A; color: #fff; text-decoration: none;
  padding: 10px 18px 10px 14px; border-radius: 14px; min-width: 176px;
  border: 1px solid rgba(255, 255, 255, .14);
  transition: transform .15s ease;
}
.store:hover { transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: .68rem; opacity: .8; line-height: 1.1; }
.store strong { display: block; font-size: 1.05rem; line-height: 1.2; }

/* Hero */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.2rem; color: var(--subtle); max-width: 34em; margin-bottom: 28px; }
.hero-note { margin-top: 16px; font-size: .9rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
}

/* Phone mock-up */
.phone-stage { position: relative; display: grid; place-items: center; }
.phone-stage::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(81, 43, 212, .28), rgba(214, 0, 170, .10) 55%, transparent 70%);
  filter: blur(10px);
}
.phone {
  position: relative; width: 300px; max-width: 100%;
  background: #0D0A1A; border-radius: 44px; padding: 12px;
  box-shadow: 0 30px 60px rgba(43, 11, 152, .30), inset 0 0 0 2px #2a2440;
}
.screen { border-radius: 34px; background: #F6F4FC; overflow: hidden; }
.screen img { width: 100%; height: auto; }
.phone.sm { width: 100%; max-width: 240px; border-radius: 36px; padding: 9px; box-shadow: 0 18px 40px rgba(43, 11, 152, .22), inset 0 0 0 2px #2a2440; }
.phone.sm .screen { border-radius: 28px; }

/* Screenshot gallery: four across on desktop, swipeable row on phones */
.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.screens figure { margin: 0; display: grid; justify-items: center; align-content: start; gap: 16px; text-align: center; }
.screens figcaption { color: var(--subtle); font-size: .95rem; max-width: 240px; }
.screens figcaption b { display: block; color: var(--text); font-size: 1.05rem; margin-bottom: 2px; }
@media (max-width: 900px) {
  .screens {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px;
    margin: 0 -20px; padding: 4px 20px 16px; scrollbar-width: none;
  }
  .screens::-webkit-scrollbar { display: none; }
  .screens figure { flex: 0 0 64%; max-width: 240px; scroll-snap-align: center; }
}
.float-chip {
  position: absolute; background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); font-size: .85rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.float-chip.one { left: 0; bottom: 12%; }
.float-chip.two { right: 0; top: 7%; }
@media (max-width: 420px) { .float-chip { display: none; } }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin: 0 0 40px; }
.section-head p { color: var(--subtle); font-size: 1.1rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature p { color: var(--subtle); margin: 0; font-size: .98rem; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.icon svg { width: 22px; height: 22px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 24px 24px 24px 76px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 22px; top: 22px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(145deg, #6A45E8, #2B0B98);
}
.step p { color: var(--subtle); margin: 0; font-size: .98rem; }

.safety { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.safety .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .safety .wrap { grid-template-columns: 1fr; gap: 28px; } }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: ""; flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23512BD4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.cta-band {
  background: linear-gradient(135deg, #3A17B8, #512BD4 45%, #8A2BD4);
  color: #fff; border-radius: 28px; padding: 56px 40px; text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .85); font-size: 1.1rem; max-width: 34em; margin: 0 auto 28px; }
.cta-band .store-buttons { justify-content: center; }
@media (max-width: 600px) { .cta-band { padding: 40px 20px; border-radius: 22px; } }

/* Document pages (legal, child safety, support) */
.page-hero { padding: 56px 0 24px; }
.page-hero p { color: var(--subtle); font-size: 1.1rem; max-width: 40em; }
.meta { font-size: .9rem; color: var(--muted); font-weight: 600; }
.doc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; padding-bottom: 80px; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; gap: 20px; } }
.toc { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.toc b { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .95rem; }
.toc a { color: var(--subtle); text-decoration: none; }
.toc a:hover { color: var(--accent); }
@media (max-width: 900px) { .toc { position: static; } }
.doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); min-width: 0; }
@media (max-width: 600px) { .doc { padding: 24px 20px; } }
.doc section { padding: 0; scroll-margin-top: 90px; }
.doc section + section { margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--divider); }
.doc h2 { font-size: 1.5rem; }
.doc h3 { font-size: 1.08rem; margin: 1.6em 0 .5em; color: var(--text); }
.doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc li { margin-bottom: .5em; }
.doc li strong { color: var(--text); }
.doc p, .doc li { color: var(--subtle); }
.callout { background: var(--accent-soft); border-radius: 14px; padding: 16px 18px; color: var(--text) !important; margin: 1em 0; }
.callout a { font-weight: 700; }
.callout.warn { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }

/* Support page */
.support-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; padding-bottom: 80px; }
@media (max-width: 900px) { .support-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 24px; }
.panel h2 { font-size: 1.35rem; }
.panel p, .panel li { color: var(--subtle); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; width: 100%;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.hidden { display: none; }
details { border-top: 1px solid var(--divider); padding: 14px 0; }
details:first-of-type { border-top: 0; padding-top: 4px; }
summary { cursor: pointer; font-weight: 700; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p, details ol { margin: 10px 0 0; }
.contact-line { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; word-break: break-word; }
.contact-line .icon { margin: 0; width: 38px; height: 38px; }

/* Footer */
.site-footer { border-top: 1px solid var(--divider); padding: 48px 0 32px; font-size: .95rem; color: var(--subtle); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { color: var(--text); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--subtle); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.legal-line { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--divider); font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
