/* Tangerine — shared styles
   No build, no framework. Design tokens at the top, then layout. */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

/* --- Design tokens --- */
:root {
  --bg: #fff2ea;
  --bg-footer: #f6e7de;
  --text: #090933;
  --text-body: #1a1a2e;
  --text-muted: #8f6056;
  --rule: rgba(143, 96, 86, 0.2);

  --accent-habits: #ff8f00;
  --accent-mood: #f50057;
  --accent-journal: #8e2de2;
  --accent-data: #ff5959;
  --accent-link: #ff8f00;
  --accent-link-hover: #f50057;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Roboto, Helvetica, Arial, sans-serif;

  --container: 1200px;
  --container-pad: clamp(1.25rem, 4vw, 3rem);
  --section-pad: clamp(3rem, 8vw, 6.5rem);

  --radius-sm: 8px;
  --radius-md: 16px;
}

/* --- Base --- */
body {
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--bg);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
}

:focus-visible {
  outline: 3px solid var(--accent-habits);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; top: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Header --- */
.site-header { padding: 1.5rem 0; }
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-header__logo img { height: 36px; width: auto; }
.app-store-badge { display: inline-block; line-height: 0; }
.app-store-badge img {
  height: 48px;
  width: auto;
  transition: transform 0.15s ease;
}
.app-store-badge:hover img,
.app-store-badge:focus-visible img { transform: translateY(-2px); }

/* --- Hero --- */
.hero { padding: clamp(2rem, 5vw, 4rem) 0 var(--section-pad); }
.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 810px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
}
.hero__title {
  color: var(--text);
  font-weight: 900;
  font-size: clamp(2.125rem, 4.5vw + 0.75rem, 3.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.hero__subtitle {
  font-size: clamp(1.125rem, 1vw + 0.875rem, 1.5rem);
  line-height: 1.5;
  margin-bottom: 2rem;
  max-width: 28ch;
  color: var(--text-body);
}
@media (max-width: 809px) {
  .hero__title, .hero__subtitle { text-align: center; }
  .hero__subtitle { max-width: none; margin-inline: auto; }
  .hero__text .app-store-badge { display: block; text-align: center; }
}
.hero__art { margin-inline: auto; max-width: 600px; }

/* --- Intro --- */
.intro {
  padding-bottom: var(--section-pad);
  text-align: center;
}
.intro__title {
  font-weight: 900;
  color: var(--text);
  font-size: clamp(1.875rem, 3vw + 0.875rem, 3rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}
.intro__body {
  font-size: clamp(1.0625rem, 0.75vw + 0.875rem, 1.25rem);
  line-height: 1.7;
  max-width: 56ch;
  margin-inline: auto;
}

/* --- Feature sections --- */
.feature { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.feature__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 810px) {
  .feature__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .feature--reverse .feature__media { grid-column: 2; grid-row: 1; }
}
.feature__title {
  font-weight: 900;
  font-size: clamp(1.875rem, 2.5vw + 0.875rem, 3rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.feature__body {
  font-size: clamp(1.0625rem, 0.5vw + 0.875rem, 1.25rem);
  line-height: 1.7;
  max-width: 52ch;
}
.feature--habits .feature__accent { color: var(--accent-habits); }
.feature--mood .feature__accent { color: var(--accent-mood); }
.feature--journal .feature__accent { color: var(--accent-journal); }
.feature--data .feature__accent { color: var(--accent-data); }
.feature__media img { margin-inline: auto; }

@media (max-width: 809px) {
  .feature__title, .feature__body { text-align: center; }
  .feature__body { margin-inline: auto; }
}

/* --- Accolade / quote --- */
.accolade {
  padding: var(--section-pad) 0;
  text-align: center;
}
.accolade__art {
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  max-width: 880px;
}
.accolade__quote {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.75rem);
  line-height: 1.5;
  max-width: 32ch;
  margin: 0 auto 3rem;
  color: var(--text);
  font-weight: 500;
  font-style: italic;
}
.accolade__quote p { margin: 0 0 0.75rem; }
.accolade__quote cite {
  display: block;
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85em;
}
.accolade__badges {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2.5rem);
  justify-content: center;
  align-items: center;
}
.accolade__badges img {
  height: clamp(90px, 9vw + 1rem, 130px);
  width: auto;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-footer);
  color: var(--text-muted);
  padding: clamp(2rem, 4vw, 3rem) 0;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
}
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer__logo img { height: 28px; width: auto; }
.site-footer__tagline { color: var(--text-muted); }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
}
.site-footer__links a {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
.site-footer__links a:hover,
.site-footer__links a:focus-visible { color: var(--text); }
.site-footer__copyright {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}

/* --- Legal pages --- */
.legal { padding: clamp(2rem, 5vw, 4rem) 0 var(--section-pad); }
.legal__inner { max-width: 72ch; margin-inline: auto; }
.legal h1 {
  font-weight: 900;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.legal__meta {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 2.5rem;
}
.legal__intro {
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.legal h2 {
  font-weight: 700;
  font-size: clamp(1.375rem, 0.75vw + 1.125rem, 1.625rem);
  color: var(--text);
  margin: 2.75rem 0 1rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.legal h3 {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text);
  margin: 1.75rem 0 0.625rem;
  line-height: 1.4;
}
.legal p, .legal li {
  font-size: 1.0625rem;
  line-height: 1.75;
}
.legal p { margin-bottom: 1rem; }
.legal ul {
  padding-left: 1.5rem;
  margin: 0 0 1.25rem;
}
.legal li { margin-bottom: 0.5rem; }
.legal a {
  color: var(--accent-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}
.legal a:hover, .legal a:focus-visible { color: var(--accent-link-hover); }
.legal strong { font-weight: 600; color: var(--text); }

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