/* Elphi AI — the app's palette: white / #1E1E1E floor, #F2F2F5 / #2A2A2C
   surface, navy accent in light, gold in dark. */
:root {
  --bg: #ffffff;
  --surface: #f2f2f5;
  --text: #1d1d1f;
  --muted: #5b5b61;
  --line: #e2e2e7;
  --accent: #0e3a6e;
  --accent-ink: #ffffff;
  --radius: 18px;
  color-scheme: light;
}
/* Dark: the system's setting unless the header button chose light, or the
   button's choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1e1e1e; --surface: #2a2a2c; --text: #f5f5f7; --muted: #a8a8ad;
    --line: #3a3a3c; --accent: #e8bb51; --accent-ink: #0b1f3a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1e1e1e; --surface: #2a2a2c; --text: #f5f5f7; --muted: #a8a8ad;
  --line: #3a3a3c; --accent: #e8bb51; --accent-ink: #0b1f3a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 18px; text-decoration: none; }
.brand img { border-radius: 7px; }
.site-nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; }
.site-nav a, .lang { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-nav a[aria-current="page"], .site-nav a:hover, .lang:hover { color: var(--text); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--text); }
.theme-toggle:focus-visible, .lang:focus-visible, .site-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The icon shows the theme a click switches to: a moon in light, a sun in dark. */
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* Home */
.hero { padding: 88px 0 56px; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-icon { width: 128px; height: 128px; border-radius: 28px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18); }
.hero h1 { font-size: clamp(34px, 6vw, 56px); margin: 28px 0 16px; max-width: 16ch; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 40em; margin: 0 auto; }
.hero-note { margin: 16px auto 0; font-weight: 600; }
.badge { display: inline-block; margin-top: 28px; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; }

.features { padding: 24px 0 56px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); padding: 22px 24px; }
.card h2, .card h3 { font-size: 19px; margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); }
.plus { padding: 32px 0 88px; text-align: center; }
.plus h2 { font-size: clamp(26px, 3.6vw, 34px); margin: 0 0 14px; }
.plus p { color: var(--muted); margin: 0; }
.plus p + p { margin-top: 14px; }

/* Pages */
.page { padding: 56px 0 88px; }
.page h1 { font-size: clamp(30px, 5vw, 42px); margin: 0 0 12px; }
.note { color: var(--muted); font-size: 15px; }
.contact-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 32px 0; }
.contact-grid .card p + p { margin-top: 12px; }
.mail { font-weight: 600; word-break: break-all; }
address { font-style: normal; color: var(--muted); line-height: 1.7; }

/* Legal documents */
.legal h2 { font-size: 24px; margin: 44px 0 12px; padding-top: 8px; scroll-margin-top: 80px; }
.legal h3 { font-size: 19px; margin: 28px 0 8px; scroll-margin-top: 80px; }
.legal p, .legal li { color: var(--text); }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin: 6px 0; }
.legal li > ul { margin-top: 6px; }
.legal em { color: var(--muted); }
.toc { background: var(--surface); border-radius: var(--radius); padding: 16px 22px; margin: 24px 0 8px; }
.toc summary { cursor: pointer; font-weight: 600; }
.toc ol { margin: 12px 0 0; columns: 2; column-gap: 28px; font-size: 15px; }
.toc li { break-inside: avoid; margin: 4px 0; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 14px; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; gap: 18px; }
.footer-row a { color: var(--muted); }

@media (max-width: 640px) {
  /* Top and bottom only: the row keeps .wrap's side padding (the shorthand
     zeroed it and the brand and the language pill touched the edges). */
  .header-row { flex-wrap: wrap; padding-top: 12px; padding-bottom: 10px; gap: 12px 16px; min-height: 0; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 20px; padding-bottom: 2px; }
  .theme-toggle { margin-left: auto; }
  .hero { padding-top: 56px; }
}
@media (max-width: 380px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .site-nav { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
