/*
  Dayloom website: shared styles.
  The palette is sampled from the app icon (sunrise peach, sun gold, coral,
  sage and teal) on top of the deep forest ink used for its wordmark.
*/

:root {
  color-scheme: light dark;

  --sun: #fecf74;
  --sun-deep: #f3ad45;
  --hero-1: #fddcb9;
  --hero-2: #fff0df;
  --sun-disc-1: #fed98f;
  --sun-disc-2: #f9b95c;
  --sun-halo: rgb(254 207 116 / 0.55);
  --wave-1: #fdb591;
  --wave-2: #b9cbb4;
  --wave-3: #8fb09f;

  --bg: #fffaf3;
  --bg-soft: #fbf0e0;
  --surface: #ffffff;
  --chip: #f3e9d8;
  --ink: #23332b;
  --muted: #52625a;
  --line: rgb(35 51 43 / 0.12);
  --line-strong: rgb(35 51 43 / 0.24);
  --header-bg: rgb(255 250 243 / 0.74);

  --accent: #2f5d4b;
  --btn: #2f5d4b;
  --btn-ink: #ffffff;
  --btn-shadow: rgb(47 93 75 / 0.55);
  --focus: #2f5d4b;
  --mark: rgb(254 207 116 / 0.7);

  --shadow-sm: 0 1px 2px rgb(90 55 20 / 0.06), 0 6px 18px -8px rgb(90 55 20 / 0.14);
  --shadow-md: 0 2px 4px rgb(90 55 20 / 0.05), 0 24px 48px -24px rgb(90 55 20 / 0.28);

  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", var(--font-body);

  --header-h: 68px;
  --gutter: clamp(20px, 5vw, 40px);
  --maxw: 1120px;
  --radius-s: 14px;
  --radius-m: 22px;
  --radius-l: 30px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --hero-1: #243a30;
    --hero-2: #18251f;
    --sun-disc-1: #f2c06a;
    --sun-disc-2: #d98f3c;
    --sun-halo: rgb(247 193 106 / 0.22);
    --wave-1: #8a5a4a;
    --wave-2: #3d5a4c;
    --wave-3: #2b453a;
    --bg: #131c18;
    --bg-soft: #18241f;
    --surface: #1c2924;
    --chip: #263530;
    --ink: #f2ebdd;
    --muted: #a8b8ad;
    --line: rgb(242 235 221 / 0.12);
    --line-strong: rgb(242 235 221 / 0.24);
    --header-bg: rgb(19 28 24 / 0.72);

    --accent: #9fd0b7;
    --btn: #f7c16a;
    --btn-ink: #14201b;
    --btn-shadow: rgb(247 193 106 / 0.4);
    --focus: #f7c16a;
    --mark: rgb(247 193 106 / 0.24);

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 18px -8px rgb(0 0 0 / 0.5);
    --shadow-md: 0 2px 4px rgb(0 0 0 / 0.3), 0 24px 48px -24px rgb(0 0 0 / 0.7);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

:where(a, summary):where(:focus-visible) {
  border-radius: 6px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.container {
  width: min(100% - var(--gutter) * 2, var(--maxw));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.skip-link {
  position: absolute;
  top: -120px;
  left: 16px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-s);
  background: var(--btn);
  color: var(--btn-ink);
  font-weight: 650;
  text-decoration: none;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    backdrop-filter: saturate(1.6) blur(18px);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font: 700 1.25rem/1 var(--font-display);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 2px 5px rgb(120 70 20 / 0.28));
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 560;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  background: var(--line);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 650 1rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: var(--btn);
  color: var(--btn-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 10px 22px -10px var(--btn-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 16px 28px -12px var(--btn-shadow);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: rgb(255 255 255 / 0.5);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  .btn-secondary {
    background: rgb(255 255 255 / 0.06);
  }
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* Footer */

.site-footer {
  padding: 36px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 3px rgb(120 70 20 / 0.25));
}

.footer-brand p {
  margin: 0;
}

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

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Privacy policy */

.wave-1 { fill: var(--wave-1); }
.wave-2 { fill: var(--wave-2); }
.wave-3 { fill: var(--wave-3); }
.wave-4 { fill: var(--bg); }

.page-hero {
  --strip-h: clamp(72px, 9vw, 120px);
  position: relative;
  isolation: isolate;
  padding: clamp(44px, 8vw, 84px) 0 calc(var(--strip-h) + clamp(8px, 2vw, 20px));
  background: linear-gradient(180deg, var(--hero-1) 0%, var(--hero-2) 70%, var(--bg) 100%);
  overflow: hidden;
  overflow: clip;
}

.page-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  right: clamp(20px, 13vw, 190px);
  bottom: calc(var(--strip-h) * 0.1);
  width: clamp(140px, 20vw, 230px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(170deg, var(--sun-disc-1), var(--sun-disc-2));
  box-shadow: 0 0 70px 16px var(--sun-halo);
}

@media (prefers-color-scheme: dark) {
  .page-hero::before {
    opacity: 0.8;
  }
}

.page-waves {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: var(--strip-h);
}

.page-hero h1 {
  font-size: clamp(2.4rem, 1.2rem + 4.6vw, 4rem);
}

.page-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.55);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 560;
}

@media (prefers-color-scheme: dark) {
  .page-meta {
    background: rgb(255 255 255 / 0.05);
  }
}

.page-meta::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun-deep);
}

.legal {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding: clamp(36px, 6vw, 64px) 0 clamp(64px, 9vw, 112px);
}

.toc {
  display: none;
}

@media (min-width: 960px) {
  .legal {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 72px;
  }

  .toc {
    display: block;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 28px);
  }
}

.toc-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding: 0 0 0 2px;
  border-left: 1px solid var(--line);
  list-style: none;
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 7px 0 7px 16px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover {
  border-left-color: var(--sun-deep);
  color: var(--ink);
}

.prose {
  max-width: 44rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin: 2.6em 0 0.6em;
  font-size: clamp(1.4rem, 1.15rem + 1vw, 1.75rem);
}

.prose p,
.prose li {
  font-size: 1.0625rem;
  line-height: 1.72;
}

.prose ul {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.prose li {
  margin: 0 0 0.55em;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--sun-deep);
}

.prose .intro {
  margin: 0 0 12px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.prose .intro p {
  font-size: 1.12rem;
}

.prose .intro p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .page-hero::before {
    right: -24px;
    width: 120px;
  }

  .nav {
    gap: 0;
  }

  .nav a {
    padding: 12px 9px;
    font-size: 0.9rem;
  }

  .nav .nav-extra {
    display: none;
  }
}

@media (max-width: 400px) {
  .brand {
    gap: 9px;
    font-size: 1.1rem;
  }
}

@media (max-width: 340px) {
  .brand-name {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .toc,
  .skip-link,
  .page-waves,
  .page-hero::before {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .page-hero {
    padding: 0 0 12pt;
    border: 0;
    background: none;
  }

  .legal {
    display: block;
    padding: 0;
  }

  a {
    color: inherit;
  }
}
