/* Daybreak.baby — shared marketing / legal styles */

:root {
  /* Match frontend default theme (peach) — see frontend/src/index.css */
  color-scheme: light;
  --accent: #f4a88a;
  --soft: #f7c9b8;
  --paper: #fdf6ee;
  --surface: #fffbf6;
  --ink: #3e2b25;
  --muted: #8c7165;
  --deep: #b05a3a;
  --line: #ecd9cc;
  --wash-a: rgba(247, 201, 184, 0.55);
  --wash-b: rgba(255, 226, 196, 0.45);
  --radius: 1rem;
  --shadow: 0 12px 32px rgba(176, 90, 58, 0.1);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Figtree", system-ui, -apple-system, sans-serif;
  --shell: min(42rem, 100%);
  --gutter: 1.25rem;
}

@media (min-width: 768px) {
  :root {
    --gutter: 1.75rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background-color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 38rem at 8% -8%, var(--wash-a), transparent 62%),
    radial-gradient(42rem 30rem at 105% 18%, var(--wash-b), transparent 62%),
    radial-gradient(52rem 40rem at 45% 112%, rgba(247, 201, 184, 0.35), transparent 62%);
}

a {
  color: var(--deep);
  font-weight: 600;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

code {
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  padding: 0.05em 0.35em;
  word-break: break-word;
}

/* Shell — single column, consistent gutters */
.site-shell {
  width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
}

@media (min-width: 768px) {
  .site-shell {
    padding-bottom: 5rem;
  }
}

/* Top nav — full-bleed within shell gutters */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 calc(var(--gutter) * -1) 1.75rem;
  padding: 0.85rem var(--gutter);
  background: rgba(253, 246, 238, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(236, 217, 204, 0.9);
}

.site-nav-brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
  text-decoration: none !important;
}

.site-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.9rem;
  font-size: 0.95rem;
}

.site-nav-links a {
  text-decoration: none;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
}

.site-nav-links a:hover,
.site-nav-links a[aria-current="page"] {
  color: var(--deep);
  text-decoration: underline;
}

/* Type */
.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.85rem, 11vw, 4.35rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

h1:not(.brand) {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 5.5vw, 2.55rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.lede {
  margin: 0 0 1.5rem;
  max-width: 28rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 3.4vw, 1.45rem);
  line-height: 1.35;
  color: var(--muted);
}

h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3 {
  margin: 1.25rem 0 0.45rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
}

p {
  margin: 0 0 1rem;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

ul.plain,
ol.plain {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

ul.plain li,
ol.plain li {
  margin-bottom: 0.45rem;
}

/* CTAs */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 2rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.35rem;
  border-radius: 0.65rem;
  background: var(--accent);
  color: var(--ink) !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  box-shadow: 0 10px 26px -10px rgba(244, 168, 138, 0.85);
  transition: transform 0.15s ease, background 0.15s ease;
}

.cta:hover {
  transform: translateY(-1px);
  background: #f2b396;
}

.cta:active {
  transform: translateY(0);
}

.cta.ghost {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
}

/* Panels / sections */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  margin: 1.25rem 0;
  box-shadow: var(--shadow);
}

.panel p:last-child {
  margin-bottom: 0;
}

.section {
  margin: 2.75rem 0 0;
}

.section > h2 {
  margin-top: 0;
}

.feature-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.feature-list li {
  position: relative;
  padding: 1rem 0 1rem 1.15rem;
  border-top: 1px solid var(--line);
}

.feature-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.4rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

.feature-list strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.feature-list span {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

/* TOC */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 1.25rem 0 0.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.toc a {
  text-decoration: none;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
}

.toc a:hover {
  text-decoration: underline;
}

/* Sync table → stacked rows on small screens */
.table-wrap {
  margin: 1rem 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sync-table {
  width: 100%;
  min-width: 32rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.sync-table th,
.sync-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.sync-table th {
  background: rgba(244, 168, 138, 0.22);
  font-weight: 700;
}

.sync-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 640px) {
  .sync-table {
    min-width: 0;
    display: block;
  }

  .sync-table thead {
    display: none;
  }

  .sync-table tbody,
  .sync-table tr,
  .sync-table td {
    display: block;
    width: 100%;
  }

  .sync-table tr {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
  }

  .sync-table tr:last-child {
    border-bottom: none;
  }

  .sync-table td {
    border: none;
    padding: 0.2rem 0;
  }

  .sync-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.1rem;
  }

  .sync-table td:first-child {
    font-weight: 700;
    margin-bottom: 0.4rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed var(--line);
  }

  .sync-table td:first-child::before {
    content: none;
  }
}

/* Platform banner (alias pages) */
.platform-banner {
  margin: 0 0 1.5rem;
}

/* Footer */
.site-footer {
  margin-top: 3.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-bottom: 0.85rem;
}

.site-footer a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--deep);
  text-decoration: underline;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .brand {
    animation: rise 0.7s ease both;
  }

  .lede {
    animation: rise 0.7s ease 0.08s both;
  }

  .cta-row {
    animation: rise 0.7s ease 0.16s both;
  }

  .panel {
    animation: rise 0.65s ease 0.22s both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.65rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
