/* Diarion — diarion.org
   One stylesheet, no scripts, no third-party requests. Palette mirrors the app
   (Resources/Styles/Colors.xaml); fonts are self-hosted subsets of Montserrat. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/montserrat-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/montserrat-semibold.woff2") format("woff2");
}

:root {
  color-scheme: light dark;

  --midnight: #22282C;
  --ocean: #929FA7;
  --earth: #E9E7E1;
  --dust: #E0E6EA;
  --snow: #FFFFFF;
  --coral: #C26D53;
  --sage: #8FA083;
  --amber: #C9985A;
  --berry: #A87C8E;

  --bg: var(--earth);
  --surface: var(--snow);
  --surface-2: #F3F2EE;
  --text: var(--midnight);
  --muted: #5B666D;
  --line: rgba(34, 40, 44, 0.12);
  --accent: var(--coral);
  --accent-ink: #A0553D;
  --ok: #6F8264;
  --band-bg: var(--midnight);
  --band-text: var(--earth);
  --band-muted: #B7C0C6;
  --band-line: rgba(233, 231, 225, 0.14);
  --screen-bg: var(--earth);
  --screen-card: var(--snow);
  --shadow: 0 30px 60px -30px rgba(34, 40, 44, 0.45);

  --radius: 20px;
  --radius-sm: 12px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--midnight);
    --surface: #2B3237;
    --surface-2: #343C42;
    --text: var(--earth);
    --muted: #A9B2B8;
    --line: rgba(233, 231, 225, 0.12);
    --accent: #D4836A;
    --accent-ink: #E4A38D;
    --ok: #A3B497;
    --band-bg: #1B2023;
    --band-text: var(--earth);
    --band-muted: #A9B2B8;
    --band-line: rgba(233, 231, 225, 0.12);
    --screen-bg: #2B3237;
    --screen-card: #343C42;
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  }
}

/* ---------- base ---------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul {
  padding-left: 1.2em;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

.wrap {
  width: min(var(--max), 100% - 2.5rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--surface);
  padding: 0.6rem 1rem;
  z-index: 10;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- header ---------- */

.site-header {
  padding: 1.25rem 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.brand svg {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav {
  display: flex;
  gap: 0.25rem 1.4rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}

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

.nav .lang {
  color: var(--muted);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(2rem, 6vw, 5rem) 0 clamp(2.5rem, 6vw, 5rem);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 34em;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1.75rem 0 1rem;
}

.store {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
  padding: 0.6rem 1.1rem 0.65rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  min-width: 10.5rem;
  text-decoration: none;
}

.store small {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.store[aria-disabled="true"] {
  cursor: default;
}

.ghost {
  padding: 0.6rem 0.4rem;
  font-weight: 600;
}

.fine {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- phone mock ---------- */

.phone-wrap {
  display: flex;
  justify-content: center;
}

.phone {
  width: min(300px, 100%);
  aspect-ratio: 9 / 18.5;
  background: var(--phone-bg, var(--midnight));
  border: 1px solid var(--line);
  border-radius: 44px;
  padding: 12px;
  box-shadow: var(--shadow);
}

@media (prefers-color-scheme: dark) {
  .phone {
    --phone-bg: #15191C;
  }
}

.screen {
  height: 100%;
  border-radius: 34px;
  background: var(--screen-bg);
  padding: 1.35rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.4;
}

.s-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0.2rem 0.3rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.s-top i {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--midnight);
  position: relative;
}

.s-top i::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 3px;
  width: 4px;
  height: 8px;
  background: var(--coral);
}

.s-card {
  background: var(--screen-card);
  border-radius: 14px;
  padding: 0.6rem 0.7rem;
}

.s-label {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.s-moods {
  display: flex;
  gap: 0.45rem;
}

.s-moods i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--line);
}

.s-moods i.on {
  background: var(--coral);
  border-color: var(--coral);
}

.s-text p {
  margin: 0;
}

.s-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.s-val {
  font-weight: 600;
  font-size: 0.9rem;
}

.s-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.s-chips span {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.7rem;
}

.s-chips span.ok {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--snow);
}

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

.strip {
  padding: 0 0 clamp(2rem, 5vw, 4rem);
}

.strip .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 720px) {
  .strip .wrap {
    grid-template-columns: 1fr;
  }
}

.tile {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  border-top: 4px solid var(--accent);
}

.tile h3 {
  margin-bottom: 0.25rem;
}

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

/* ---------- sections ---------- */

.section {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.section-head {
  max-width: 40em;
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--muted);
  font-size: 1.1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.2rem;
}

.card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  color: var(--accent-ink);
}

.card .icon svg {
  width: 22px;
  height: 22px;
}

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

/* ---------- privacy band ---------- */

.band {
  background: var(--band-bg);
  color: var(--band-text);
}

.band .section-head p,
.band .muted {
  color: var(--band-muted);
}

.band a {
  color: var(--band-text);
}

.band-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .band-grid {
    grid-template-columns: 1fr;
  }
}

.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.9rem;
}

.checks li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0.8rem;
  align-items: start;
}

.checks svg {
  width: 26px;
  height: 26px;
  color: var(--sage);
  margin-top: 0.1rem;
}

.checks strong {
  display: block;
  font-weight: 600;
}

.checks span {
  color: var(--band-muted);
  font-size: 0.95rem;
}

.callout {
  border: 1px solid var(--band-line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1rem;
}

.callout h3 {
  margin-bottom: 0.5rem;
}

.callout p {
  margin: 0;
  color: var(--band-muted);
  font-size: 0.97rem;
}

.callout p + p {
  margin-top: 0.6em;
}

.band .link-row {
  margin-top: 2rem;
  font-weight: 600;
}

/* ---------- details strip ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.chips li {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.95rem;
}

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

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer a {
  color: var(--text);
}

/* ---------- article pages (privacy, support, 404) ---------- */

.prose {
  max-width: 72ch;
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem);
}

.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin-bottom: 0.4em;
}

.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.2em;
  margin-bottom: 0.5em;
}

.prose h3 {
  margin-top: 1.6em;
}

.prose li {
  margin-bottom: 0.35em;
}

.prose .lead {
  font-size: 1.15rem;
}

.meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1.25rem;
  margin: 1.25rem 0 2rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.meta dt {
  color: var(--muted);
}

.meta dd {
  margin: 0;
}

.notice {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.notice p:last-child {
  margin-bottom: 0;
}

.faq details {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.2rem 1.25rem;
  margin-bottom: 0.75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--accent-ink);
  font-weight: 400;
  font-size: 1.3em;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details > *:not(summary) {
  padding-bottom: 0.5rem;
}

.faq details p:last-child,
.faq details ol:last-child {
  margin-bottom: 0.75rem;
}

.path {
  white-space: nowrap;
  font-weight: 600;
}

.big-404 {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  margin: 0 0 1rem;
}

@media print {
  .site-header, .site-footer, .nav {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
