/* Paraige — website. Colours are those of the app's Premium theme (crates/app/themes/paraige.json). */

/* Fonts served with the site (no third party is contacted). SIL Open Font License 1.1:
   assets/fonts/OFL-Newsreader.txt, assets/fonts/OFL-HankenGrotesk.txt. Variable fonts: one
   file covers every weight; latin and latin-ext subsets only. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/newsreader-latin-ext.woff2") format("woff2");
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
  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: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/hanken-latin-ext.woff2") format("woff2");
  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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/hanken-latin.woff2") format("woff2");
  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 {
  --graphite: #23211e;      /* background */
  --graphite-deep: #1b1917; /* sidebar, alternate bands */
  --panel: #2d2a26;
  --line: #3d3832;
  --ivory: #ede7db;         /* text */
  --muted: #a89f91;
  --gold: #c9a24a;
  --gold-light: #e3c77a;
  --gold-head: #dcc07a;     /* table headers in the app */
  --silver: #c9ccd1;
  --gain: #3faa6b;
  --loss: #e0594f;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --text: "Hanken Grotesk", -apple-system, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html {
  background: var(--graphite);
  color: var(--ivory);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body { margin: 0; background: var(--graphite); }

img { display: block; max-width: 100%; height: auto; }

[hidden] { display: none !important; }

a { color: var(--gold-light); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.86em;
  color: var(--silver);
  overflow-wrap: anywhere;
}

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

/* Bilingual content: both languages are in the page, only one is shown. */
html[data-lang="en"] [lang="fr"]:not(html),
html[data-lang="fr"] [lang="en"]:not(html) { display: none !important; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--gold);
  color: var(--graphite-deep);
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 20;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(27, 25, 23, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ivory);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.brand img { border-radius: 8px; }
.brand.small { font-size: 1.05rem; }
.brand.small img { border-radius: 5px; }

.top-nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
}
.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
}
.top-nav a:hover { color: var(--ivory); }

.lang-switch {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px;
}
.lang-switch button {
  font: 600 0.8rem var(--text);
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 5px;
  padding: 4px 9px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--graphite-deep);
}

/* ---------- Type ---------- */

h1, h2 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  /* One line on a wide screen; wraps naturally on a narrow one. */
  max-width: 30ch;
}

h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
  line-height: 1.1;
  /* Wide enough for a title on one line; the narrow columns of the split sections wrap
     them anyway. */
  max-width: 34ch;
}

h3 {
  font-size: 1.06rem;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ivory);
}

p { margin: 0 0 12px; }

.lede, .section-intro {
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.08rem;
}
.lede { margin-top: 22px; font-size: 1.15rem; }
.section-intro { margin-top: 18px; }
.split .section-intro:first-child { margin-top: 0; }

/* ---------- Hero ---------- */

.hero { padding: clamp(56px, 9vw, 112px) 0 0; }

/* App window frame around screenshots. */
.window {
  position: relative;
  margin-top: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--graphite-deep);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}
.window::before {
  content: "";
  display: block;
  height: 26px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 14px 13px, #e0594f 4.5px, transparent 5px),
    radial-gradient(circle at 30px 13px, #e0a23a 4.5px, transparent 5px),
    radial-gradient(circle at 46px 13px, #3faa6b 4.5px, transparent 5px),
    var(--graphite-deep);
}
.hero .window { margin-top: clamp(40px, 5vw, 60px); margin-bottom: clamp(-120px, -8vw, -40px); position: relative; z-index: 1; }

/* ---------- Sections ---------- */

.band, .plain { padding: clamp(72px, 10vw, 128px) 0; }
.band { background: var(--graphite-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rhythm { padding-top: clamp(150px, 16vw, 230px); }

.split {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

/* ---------- At your own pace ---------- */

.rhythm h3 { margin-bottom: 16px; }

.spotlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  margin-top: clamp(48px, 6vw, 72px);
}
.spotlight figure { margin: 0; }
.spotlight .window { margin-top: 0; }
.spotlight figcaption { margin-top: 20px; }
.spotlight figcaption h3 {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.spotlight figcaption p { color: var(--muted); max-width: 52ch; }

/* ---------- Pages explorer (mirrors the app's sidebar) ---------- */

.explorer {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  margin-top: 44px;
}

.explorer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 88px;
  align-self: start;
}
.explorer-nav button {
  font: 500 0.98rem var(--text);
  text-align: left;
  color: var(--ivory);
  background: none;
  border: 0;
  border-radius: 7px;
  padding: 8px 12px;
  cursor: pointer;
}
.explorer-nav button:hover { background: var(--panel); }
.explorer-nav button[aria-selected="true"] {
  background: #3a3224; /* sidebar.accent.background */
  color: #e7cb7d;      /* sidebar.accent.foreground */
}

.explorer-panel .window { margin-top: 0; }
.explorer-panel:focus-visible { outline-offset: 6px; }

.page-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 40px;
  margin-top: 28px;
}
.page-text h3 {
  grid-column: 1 / -1;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--gold-light);
}
.page-text p { color: var(--ivory); max-width: 60ch; }

ul { margin: 0; padding: 0; list-style: none; }
.page-text li, .facts li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--muted);
}
.page-text li::before, .facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 1px;
  background: var(--gold);
}

/* ---------- Assistant: two real exchanges ---------- */

/* Shown in both languages: one exchange in French, one in English. */
html[data-lang="en"] .chat[lang="fr"],
html[data-lang="fr"] .chat[lang="en"] { display: flex !important; }

.chats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: clamp(40px, 5vw, 56px);
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--graphite-deep);
}
.chat .ask {
  align-self: flex-end;
  max-width: 85%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  background: #3a3224;
  color: var(--ivory);
}
.chat .answer {
  max-width: 92%;
  color: var(--ivory);
}
.chat .answer p { margin: 0 0 8px; }
.chat .answer strong { color: var(--gold-light); font-weight: 600; }

/* ---------- Import steps (a real sequence) ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  grid-row: 1 / span 3;
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
  color: var(--gold);
}
.steps p { color: var(--muted); margin: 0; max-width: 60ch; }

/* ---------- Price sources ---------- */

.sources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0 40px;
  margin: 44px 0 0;
}
.sources > div {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.sources dt {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--gold-head);
  margin-bottom: 4px;
}
.sources dd { margin: 0; color: var(--muted); }

/* ---------- Household ---------- */

.columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 40px;
}
.columns.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.columns p { color: var(--muted); }
.columns > div { border-top: 1px solid var(--gold); padding-top: 18px; }

/* ---------- Data ---------- */

.facts li { color: var(--ivory); margin-bottom: 14px; }

/* Optional encryption: what it is on the left, the three notions on the right. */
.vault {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
  margin-top: clamp(56px, 7vw, 88px);
  padding-top: clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.vault-title {
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.2vw, 1.8rem);
  font-weight: 500;
  color: var(--gold-light);
  line-height: 1.2;
  margin-bottom: 0;
}
.vault-note { margin-top: 18px; font-size: 0.92rem; color: var(--muted); }
.vault-modes { grid-template-columns: 1fr; margin-top: 0; }
.vault-modes > div:first-child { border-top: 0; padding-top: 0; }

/* ---------- Themes ---------- */

.themes {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 44px;
  align-items: end;
}
.themes figure { margin: 0; }
.themes img {
  border: 1px solid var(--line);
  border-radius: 8px;
}
.themes figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Footer ---------- */

.foot { padding: 36px 0 48px; }
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  color: var(--muted);
  font-size: 0.9rem;
}
.foot p { margin: 0; }

/* ---------- Footer text, legal page ---------- */

.foot-text { display: flex; flex-direction: column; gap: 4px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ivory); }

.legal { padding: clamp(48px, 8vw, 96px) 0; }
.legal section { margin-top: 48px; max-width: 72ch; }
.legal h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 14px; }
.legal h3 { margin-top: 18px; }
.legal p { color: var(--muted); }
.legal .facts li { color: var(--muted); }

/* ---------- Download buttons, install ---------- */

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  font: 600 0.98rem var(--text);
  color: var(--ivory);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 18px;
  background: var(--panel);
}
.button:hover { color: var(--ivory); border-color: var(--muted); }
.button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--graphite-deep);
}
.button.primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--graphite-deep); }
.cta-note { color: var(--muted); font-size: 0.9rem; }

.install-note { margin-top: 24px; font-size: 0.92rem; color: var(--muted); max-width: 62ch; }
.platforms { grid-template-columns: 1fr; margin-top: 0; }
.platforms > div:first-child { border-top: 0; padding-top: 0; }
.install-facts { margin-top: 28px; }

/* ---------- Narrow screens ---------- */

@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
  .spotlight { grid-template-columns: 1fr; }
  .chats { grid-template-columns: 1fr; }
  .columns, .columns.two { grid-template-columns: 1fr; gap: 28px; }
  .vault { grid-template-columns: 1fr; }
  .vault-modes > div:first-child { border-top: 1px solid var(--line); padding-top: 18px; }
  .themes { grid-template-columns: 1fr 1fr; }
  .themes figure:first-child { grid-column: 1 / -1; }
  .explorer { grid-template-columns: 1fr; gap: 18px; }
  .explorer-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 4px;
  }
  .explorer-nav button { white-space: nowrap; flex: none; }
  .page-text { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  html { font-size: 16px; }
  .top-nav { display: none; }
  .lang-switch { margin-left: auto; }
  .window::before { height: 18px; background:
    radial-gradient(circle at 11px 9px, #e0594f 3px, transparent 3.5px),
    radial-gradient(circle at 22px 9px, #e0a23a 3px, transparent 3.5px),
    radial-gradient(circle at 33px 9px, #3faa6b 3px, transparent 3.5px),
    var(--graphite-deep); }
}

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