/* My Daily Notes website. Palette and shapes mirror the app (src/constants/theme.ts). No external requests. */
:root {
  --bg: #fbf6f0;
  --surface: #ffffff;
  --tile: #f4ede4;
  --line: #eadfd2;
  --text: #2b2119;
  --soft: #5e5147;
  --muted: #7f7165;
  --ember: #e8731a;
  --ember-text: #b4530b;
  --ember-soft: #fde9d8;
  --on-ember: #ffffff;
  --lilac: #e8e6f8;
  --lilac-deep: #5b55b5;
  --mint: #ddf2ec;
  --mint-deep: #1f7a68;
  --frame: #1d1510;
  --shadow: 0 24px 60px rgba(43, 33, 25, 0.22);
  --radius: 24px;
  --max: 1120px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110d;
    --surface: #211a14;
    --tile: #2a2119;
    --line: #3e3226;
    --text: #f6ebdd;
    --soft: #d3c5b5;
    --muted: #a69686;
    --ember: #f28a35;
    --ember-text: #f5a25c;
    --ember-soft: #3a2617;
    --on-ember: #1b120b;
    --lilac: #2e2b4f;
    --lilac-deep: #b7b3f2;
    --mint: #1d3a34;
    --mint-deep: #8fd9c6;
    --frame: #0b0705;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
}

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

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

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

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

a {
  color: var(--ember-text);
  text-underline-offset: 3px;
}

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ember);
  color: var(--on-ember);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

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

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  padding: 18px 0;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.15rem;
  color: inherit;
  text-decoration: none;
}

.brand img {
  border-radius: 12px;
  display: block;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current='page'] {
  border-bottom-color: currentColor;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--ember);
  color: var(--on-ember);
  font: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn-outline {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  overflow: hidden;
  min-height: 780px;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 100%;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 10, 8, 0.55) 0%, rgba(20, 10, 8, 0.1) 45%, rgba(20, 10, 8, 0.6) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
  padding: 56px 0 90px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero p.lead {
  margin: 0 0 28px;
  max-width: 34rem;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.92);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero .fineprint {
  margin: 20px 0 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
}

.hero-phones .phone:nth-child(2) {
  margin-left: -46px;
  margin-top: 56px;
}

/* ---------- Phone frame ---------- */
.phone {
  margin: 0;
  width: min(250px, 62vw);
  border: 9px solid var(--frame);
  border-radius: 40px;
  overflow: hidden;
  background: var(--frame);
  box-shadow: var(--shadow);
  flex: 0 0 auto;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 540 / 1169; /* the frame follows the screenshot, so nothing is cropped */
}

/* ---------- Sections ---------- */
section {
  padding: 84px 0;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember-text);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  line-height: 1.3;
}

.section-intro {
  max-width: 40rem;
  margin: 0 0 40px;
  color: var(--soft);
  font-size: 1.15rem;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: var(--tile);
  border-radius: var(--radius);
  padding: 26px;
}

.card p {
  margin: 0;
  color: var(--soft);
}

.icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-bottom: 16px;
  background: var(--ember-soft);
  color: var(--ember-text);
}

.icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon.lilac {
  background: var(--lilac);
  color: var(--lilac-deep);
}

.icon.mint {
  background: var(--mint);
  color: var(--mint-deep);
}

/* Screens gallery */
.gallery {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 20px 30px;
  margin-inline: -20px;
  scrollbar-width: thin;
}

.gallery figure {
  margin: 0;
  scroll-snap-align: center;
  flex: 0 0 auto;
  text-align: center;
}

.gallery figcaption {
  margin-top: 18px;
  font-weight: 600;
  color: var(--soft);
}

.more {
  margin-top: 28px;
}

/* Two-column feature */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.split .phones {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.split .phones .phone:nth-child(2) {
  margin-left: -40px;
  margin-top: 60px;
}

.checklist {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.checklist li {
  position: relative;
  padding-left: 36px;
  color: var(--soft);
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ember);
}

.checklist li::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  width: 8px;
  height: 4px;
  border-left: 2.5px solid var(--on-ember);
  border-bottom: 2.5px solid var(--on-ember);
  transform: rotate(-45deg);
}

.band {
  background: var(--tile);
}

.dark-phones {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
}

/* Translations */
.translation {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.translation .abbr {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--ember-soft);
  color: var(--ember-text);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.translation p {
  margin: 0;
  color: var(--soft);
  font-size: 0.98rem;
}

/* Privacy band */
.promise {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.promise p {
  margin: 0;
  color: var(--soft);
}

/* Get the app */
.get {
  text-align: center;
}

.get .card {
  max-width: 44rem;
  margin-inline: auto;
  background: var(--ember-soft);
}

.get .card p {
  color: var(--text);
}

/* ---------- Article pages (privacy, support) ---------- */
.page-head {
  background: var(--tile);
  padding: 48px 0 40px;
}

.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}

.page-head p {
  margin: 0;
  color: var(--soft);
}

.prose {
  max-width: 46rem;
  padding: 48px 0 84px;
}

.prose h2 {
  margin-top: 44px;
  font-size: 1.6rem;
}

.prose ul {
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: 6px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 0.98rem;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.prose th {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.callout {
  background: var(--ember-soft);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
}

details {
  background: var(--tile);
  border-radius: 18px;
  padding: 4px 22px;
  margin-bottom: 12px;
}

summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  font-size: 1.08rem;
}

details p,
details ul {
  margin: 0 0 16px;
  color: var(--soft);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer ul {
  display: flex;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-phones {
    order: 2;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  section {
    padding: 60px 0;
  }
}

@media (max-width: 600px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-bottom: 60px;
  }

  .hero-phones .phone:nth-child(2) {
    display: none;
  }

  .split .phones .phone {
    width: 42vw;
    border-width: 7px;
    border-radius: 32px;
  }

  .split .phones .phone:nth-child(2) {
    margin-left: -18px;
    margin-top: 40px;
  }

  .nav {
    gap: 2px 16px;
  }
}

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