/*
  Lenori — lenoriapp.com

  The palette is not an approximation. Every token below is taken from
  the Lenori app's own theme definitions: Rose Clay carries the site,
  with Linen, Sage and Lagoon used where a second or third voice is
  needed. If a theme is retuned in the app, retune it here to match.
*/

/* ---------------------------------------------------------------- type */

@font-face {
  font-family: "Fraunces";
  /* The variable font the app itself registers, served from this origin
     rather than from a font CDN: a third-party request would be the one
     piece of tracking on an otherwise quiet site. */
  src: url("fonts/Fraunces.ttf") format("truetype-variations");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------------------------------- tokens */

:root {
  /* Rose Clay, light — the app's default theme */
  --page: #f4d9d3;
  --card: #fef0eb;
  --sunken: #ebcfc8;
  --divider: #d9aea9;
  --border: #c77d83;
  --ink: #3c242a;
  --ink-secondary: #72565b;
  --accent: #9e4f5c;
  --accent-ink: #fef0eb;
  /*
    The same rose, darkened, for text on a light surface. The app's
    accent is #9e4f5c and it stays that on a filled button, where it is
    the *background*. As a text colour on the page it measures 4.22:1,
    which is under WCAG AA for body size. This clears 4.5 on all three
    light surfaces — page 5.02, card 6.03, sunken 4.57.
  */
  --accent-text: #8d4652;

  /* The other three, for the theme strip and for accents that need to
     be something other than rose. */
  --linen: #dfd8c8;
  --linen-ink: #1f1c16;
  --sage: #b9c6af;
  --sage-ink: #1a2016;
  --sage-accent: #85957e;
  --lagoon: #a8c0bd;
  --lagoon-ink: #101f1e;
  --lagoon-accent: #6e8985;

  --glass: rgb(254 240 235 / 0.72);
  --glass-edge: rgb(255 255 255 / 0.55);
  --shadow: 0 1px 2px rgb(60 36 42 / 0.06), 0 12px 32px rgb(60 36 42 / 0.09);
  --shadow-lift: 0 2px 6px rgb(60 36 42 / 0.08), 0 24px 56px rgb(60 36 42 / 0.14);

  --serif: "Fraunces", ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --measure: 34rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 20px;
  --radius-lg: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Rose Clay, dark — the same theme's night composition. */
    --page: #241318;
    --card: #3a2228;
    --sunken: #2e1a20;
    --divider: #51333a;
    --border: #7c4b54;
    --ink: #f6e7e4;
    --ink-secondary: #c7a9a9;
    --accent: #e9a3ab;
    --accent-ink: #241318;
    /* On the night palette the accent already measures 8.71:1. */
    --accent-text: #e9a3ab;

    --linen: #2a2119;
    --linen-ink: #f3ece0;
    --sage: #1d2a20;
    --sage-ink: #e6efe4;
    --sage-accent: #9bb393;
    --lagoon: #142b2c;
    --lagoon-ink: #e0eeec;
    --lagoon-accent: #8fb3ae;

    --glass: rgb(58 34 40 / 0.66);
    --glass-edge: rgb(255 255 255 / 0.10);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px rgb(0 0 0 / 0.36);
    --shadow-lift: 0 2px 6px rgb(0 0 0 / 0.34), 0 24px 56px rgb(0 0 0 / 0.46);
  }
}

/* --------------------------------------------------------------- reset */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--page);
  /* A dawn that never quite resolves — the same gradient idea the app's
     page background uses, kept far enough back to stay out of the way
     of text. */
  background-image:
    radial-gradient(60rem 36rem at 72% -8%, rgb(254 240 235 / 0.85), transparent 62%),
    radial-gradient(44rem 28rem at 8% 4%, rgb(199 125 131 / 0.22), transparent 58%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

/* ------------------------------------------------------------- a11y */

:focus-visible {
  outline: 3px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}
/* Only for browsers without :focus-visible — never remove the ring. */
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -120%;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 0 0 12px 12px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { translate: -50% 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ------------------------------------------------------------ layout */

.wrap {
  width: min(72rem, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { width: min(48rem, 100%); }

section { padding-block: clamp(3rem, 8vw, 6rem); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--glass);
  backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid var(--divider);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--card); }
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding-block: 0.7rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  /* A 0.95rem line with 0.4rem of padding is a ~28px target. Flex with a
     44px minimum keeps the words exactly where they were and gives the
     touch area the size Apple and WCAG ask for. */
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.15rem;
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* --------------------------------------------------------- typography */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.3rem, 1.6rem + 3.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 1.08rem + 0.6vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
.lede {
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-secondary);
  max-width: 38rem;
}

a { color: var(--accent-text); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 0.9rem;
}

ul, ol { max-width: var(--measure); }
li { margin-bottom: 0.4em; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
}
.btn--primary:hover {
  color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}
.btn--quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn--quiet:hover { background: var(--card); color: var(--ink); }

/* -------------------------------------------------------------- cards */

.card {
  background: var(--card);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}
.card--glass {
  background: var(--glass);
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-color: var(--glass-edge);
}
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

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

.hero { padding-block: clamp(3rem, 9vw, 7rem) clamp(2rem, 6vw, 4rem); }
.hero__grid {
  display: grid;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 60rem) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}
.hero h1 { margin-bottom: 0.35em; }

/* ------------------------------------------------------------- device */

/*
  A phone-shaped frame drawn in CSS around a real capture. No vendor
  artwork, no stock mockup — the screenshot inside is the shipping app.
*/
.device {
  position: relative;
  width: min(300px, 76vw);
  margin-inline: auto;
  border-radius: 42px;
  padding: 10px;
  background: linear-gradient(170deg, #5a4046, #2b1a1f);
  box-shadow: var(--shadow-lift);
}
.device img { border-radius: 33px; display: block; }
.device--wide { width: min(560px, 90vw); border-radius: 26px; padding: 12px; }
.device--wide img { border-radius: 16px; }

.device-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 4vw, 2.5rem);
  justify-content: center;
  align-items: flex-start;
}
.device-row .device { margin-inline: 0; }

figure { margin: 0; }
figcaption {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--ink-secondary);
  text-align: center;
  max-width: 24rem;
  margin-inline: auto;
}

/* ------------------------------------------------------- feature rows */

.feature {
  display: grid;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
@media (min-width: 56rem) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature--flip .feature__media { order: -1; }
}

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

.themes {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}
.theme {
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid rgb(0 0 0 / 0.08);
  box-shadow: var(--shadow);
}
.theme h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.theme p { font-size: 0.88rem; margin: 0; opacity: 0.85; }
.theme--rose { background: #f4d9d3; color: #3c242a; }
.theme--rose h3 { color: #3c242a; }
.theme--linen { background: #dfd8c8; color: #1f1c16; }
.theme--linen h3 { color: #1f1c16; }
.theme--sage { background: #b9c6af; color: #1a2016; }
.theme--sage h3 { color: #1a2016; }
.theme--lagoon { background: #a8c0bd; color: #101f1e; }
.theme--lagoon h3 { color: #101f1e; }

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

.icons {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
}
.icons img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 22.37%;
  box-shadow: var(--shadow);
  border: 1px solid rgb(0 0 0 / 0.06);
}

/* ------------------------------------------------------------- notice */

.notice {
  border-left: 4px solid var(--accent);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--ink); }

/* ------------------------------------------------------- download box */

.download {
  text-align: center;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 6vw, 3.5rem);
}
.download p { margin-inline: auto; }
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1.5px dashed var(--border);
  color: var(--ink);
  font-weight: 600;
  background: var(--sunken);
}

/* ---------------------------------------------------------------- doc */

/* Long-form legal and support pages. */
.doc { padding-block: clamp(2.5rem, 6vw, 4rem); }
.doc h2 { margin-top: 2.5rem; }
.doc h3 { margin-top: 1.75rem; }
.doc p, .doc li { max-width: var(--measure); }
.doc dl { max-width: var(--measure); }
.doc dt { font-weight: 700; margin-top: 1rem; }
.doc dd { margin: 0.2rem 0 0; color: var(--ink-secondary); }
.doc__meta {
  font-size: 0.92rem;
  color: var(--ink-secondary);
  border-bottom: 1px solid var(--divider);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.toc {
  background: var(--sunken);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.toc h2 { font-size: 1rem; margin: 0 0 0.5rem; font-family: var(--sans); letter-spacing: 0.02em; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.toc li { margin-bottom: 0.2em; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.75rem;
  font-size: 0.95rem;
}
.table-scroll { overflow-x: auto; }
th, td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}
th { font-weight: 700; color: var(--ink); }
td { color: var(--ink-secondary); }

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

.site-footer {
  border-top: 1px solid var(--divider);
  background: var(--card);
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  margin-top: clamp(3rem, 8vw, 5rem);
}
.site-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}
.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 0.75rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.1rem; }
/* Same reasoning as the header nav: a footer link is a real target. */
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer__legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--divider);
  font-size: 0.9rem;
  color: var(--ink-secondary);
}
.site-footer__legal p { max-width: none; margin-bottom: 0.4rem; }

/* --------------------------------------------------------------- 404 */

.notfound {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
}
.notfound ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-inline: auto;
}

/* ------------------------------------------------------ print (legal) */

@media print {
  .site-header, .site-footer__grid, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}

/* ------------------------------------------------- spacing utilities */
/*
  These exist so no element needs a style="" attribute. That is what lets
  the Content-Security-Policy drop 'unsafe-inline' from style-src: with an
  inline style anywhere on the page, the policy has to allow every inline
  style, and the directive stops meaning much.
*/
.mt-sm { margin-top: 1.5rem; }
.mt-md { margin-top: 1.75rem; }
.mt-lg { margin-top: 2rem; }
.mt-xl { margin-top: 2.5rem; }
.mb-0  { margin-bottom: 0; }
.mb-xs { margin-bottom: 0.5rem; }
.mb-lg { margin-bottom: 2rem; }
.mi-auto { margin-inline: auto; }
.fs-sm { font-size: 0.95rem; }
.card__heading { margin-top: 0; font-size: 1.15rem; }
