/* Ink & Dawn — base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-deep);
}

[data-theme="dark"] a:hover {
  color: var(--accent-soft);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

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

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

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

main [id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.section-head {
  max-width: 38rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.75rem);
  margin-bottom: 0.65rem;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.muted {
  color: var(--ink-faint);
}

.hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.25rem 0;
}

/* Atmosphere */
.page-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 12% -10%, var(--dawn-accent), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 8%, rgba(232, 145, 90, 0.12), transparent 50%),
    linear-gradient(180deg, var(--dawn-top), var(--dawn-mid) 40%, var(--bg));
}

.page-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Motion */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-copy,
  .hero-visual {
    animation: none !important;
  }

  .bento-tile:hover,
  .feature-item:hover,
  .privacy-item:hover,
  .story-block:hover,
  .premium-panel:hover,
  .faq-item:hover,
  .phone-frame:hover,
  .shot-stage img:hover,
  .tile-media:hover .media-card--photo,
  .tile-media:hover .media-card--sketch,
  .tile-media:hover .media-card--video,
  .tile-streak:hover .trophy-img,
  .tile-privacy:hover .lock-mark,
  .tile-calendar:hover .mosaic-cell,
  .tile-calendar:hover .mosaic-cell img,
  .feature-item:hover .feature-item-icon {
    transform: none;
  }

  .mood-line,
  .mood-emoji,
  .trophy-img,
  .trophy-glow,
  .lock-glow,
  .wave span {
    animation: none !important;
  }

  .mood-emoji {
    transform: translate(-50%, -50%) scale(1);
  }
}
