/*
  TryMyDays public web — shared stylesheet (every page, legal routes included).
  No framework, no preprocessor.

  TMD Night: a layered charcoal / deep navy-black base with a soft cobalt
  glow, warm white text, and the logo's colours used with restraint: cobalt
  for glow and links, bubblegum for the one word that matters, sun only for
  tiny in-app details. Display type is the bundled Fredoka (SIL OFL); body
  copy is the system face. Only the home hero headline is display-sized.

  The four registered legal routes are verified after deployment against
  this exact file's bytes (src/legal/deployed-verifier.ts), so any change
  here is a legal-chrome change and must be redeployed together with those
  routes. Home-only styles live in marketing.css, which legal routes never
  load.
*/

@font-face {
  font-family: "Fredoka";
  src: url("/fonts/Fredoka-wdth-wght.ttf") format("truetype");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #06070b;
  --ink-2: #0a0d15;
  --ink-3: #10141f;
  --ink-4: #171c2a;
  --navy: #0c1226;
  --line: rgba(190, 205, 255, 0.09);
  --line-strong: rgba(190, 205, 255, 0.2);
  --text: #eef0f5;
  --text-2: #b4b9c6;
  --text-3: #7f8697;
  --cobalt: #2b4bf2;
  --sky: #8ea8ff;
  --bubble: #f87ca2;
  --sun: #ffd23f;
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --max-width: 1160px;
  --text-width: 68ch;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--ink);
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 620px at 82% -120px, rgba(43, 75, 242, 0.16), transparent 70%),
    radial-gradient(900px 520px at -8% 18%, rgba(248, 124, 162, 0.045), transparent 70%),
    linear-gradient(180deg, var(--navy) 0, var(--ink) 900px);
  background-repeat: no-repeat;
  background-color: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--sky);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: var(--text);
}

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

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

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

p {
  text-wrap: pretty;
}

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: none;
}

.content-anchor {
  position: relative;
  top: -80px;
  outline: none;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  background: var(--text);
  color: var(--ink);
  box-shadow: 0 10px 30px -12px rgba(142, 168, 255, 0.55);
}

.button--primary:hover {
  color: var(--ink);
  box-shadow: 0 16px 40px -12px rgba(142, 168, 255, 0.75);
}

.button--ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.button--ghost:hover {
  border-color: rgba(238, 240, 245, 0.55);
  color: var(--text);
}

/* Header */

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

/* The blur sits on a pseudo-element: a backdrop-filter on the header itself
   would become the containing block of the fixed phone-width menu panel. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 7, 11, 0.72);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 48px;
  height: auto;
  transition: transform 0.5s var(--spring);
}

.brand:hover .brand-mark {
  transform: rotate(-6deg) scale(1.05);
}

.wordmark {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-links .nav-cta {
  margin-left: 8px;
  background: var(--text);
  color: var(--ink);
  font-weight: 600;
}

.nav-links .nav-cta:hover {
  background: var(--text);
  color: var(--ink);
}

.menu-toggle,
.menu-close,
.menu-mascot {
  display: none;
}

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 16px 8px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
  }

  .menu-toggle-icon,
  .menu-toggle-icon::before,
  .menu-toggle-icon::after {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .menu-toggle-icon {
    position: relative;
  }

  .menu-toggle-icon::before,
  .menu-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .menu-toggle-icon::before {
    top: -5px;
  }

  .menu-toggle-icon::after {
    top: 5px;
    width: 10px;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 96px var(--gutter) 48px;
    background:
      radial-gradient(600px 420px at 90% 0%, rgba(43, 75, 242, 0.32), transparent 70%),
      linear-gradient(180deg, var(--navy), var(--ink));
    overflow-y: auto;
  }

  .site-nav:target,
  .menu-open .site-nav {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .nav-links a {
    padding: 6px 0;
    color: var(--text);
    font-family: var(--display);
    font-size: clamp(28px, 8vw, 38px);
    font-weight: 600;
    line-height: 1.15;
  }

  .nav-links a:hover {
    background: none;
    color: var(--bubble);
  }

  .nav-links .nav-cta {
    margin: 16px 0 0;
    padding: 10px 22px;
    font-family: var(--body);
    font-size: 17px;
  }

  .menu-close {
    display: inline-flex;
    align-self: flex-start;
    padding: 10px 20px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
  }

  .menu-mascot {
    display: block;
    position: absolute;
    right: var(--gutter);
    bottom: 48px;
    width: 104px;
    animation: bob 3s ease-in-out infinite;
  }

  .menu-open body {
    overflow: hidden;
  }

  .site-nav:target .nav-links li,
  .menu-open .nav-links li {
    animation: menu-in 0.5s var(--ease) both;
  }

  .nav-links li:nth-child(2) { animation-delay: 0.04s; }
  .nav-links li:nth-child(3) { animation-delay: 0.08s; }
  .nav-links li:nth-child(4) { animation-delay: 0.12s; }
  .nav-links li:nth-child(5) { animation-delay: 0.16s; }
  .nav-links li:nth-child(6) { animation-delay: 0.2s; }
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-3deg); }
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Page frame */

.page {
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(64px, 8vw, 112px);
}

:where(.page) h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  margin-bottom: 16px;
}

:where(.page) h2 {
  font-size: clamp(23px, 2.4vw, 28px);
}

:where(.page) h3 {
  font-size: 18px;
  font-weight: 600;
}

.lede {
  margin: 0 0 8px;
  color: var(--text-2);
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.55;
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--sky);
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before,
.kicker::before {
  content: "✦";
  color: var(--bubble);
  font-size: 11px;
  letter-spacing: 0;
}

.term {
  font-weight: inherit;
}

/* Article-style pages (creators, support, deletion, informational, legal) */

.article-page,
.legal-page {
  max-width: var(--text-width);
}

.page-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 8px;
}

.page-hero-art {
  width: clamp(110px, 16vw, 168px);
  padding: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1f2a55, #0b0f1f 70%);
  box-shadow: 0 0 0 1px var(--line), 0 20px 60px -20px rgba(43, 75, 242, 0.5);
}

@media (max-width: 620px) {
  .page-hero {
    grid-template-columns: 1fr;
  }

  .page-hero-art {
    grid-row: 1;
    width: 112px;
  }
}

.legal-intro p,
.article-page > .lede {
  color: var(--text-2);
}

.legal-section,
.article-section {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.legal-section h2,
.article-section h2 {
  margin-bottom: 12px;
}

.legal-section p,
.article-section p {
  margin: 12px 0;
}

.legal-section ul,
.article-section ul,
.legal-section ol,
.article-section ol {
  margin: 12px 0;
  padding-left: 22px;
}

.legal-section li,
.article-section li {
  margin: 8px 0;
}

.legal-page h1 {
  font-size: clamp(32px, 4.4vw, 48px);
}

.legal-metadata {
  margin: 0 0 20px;
  color: var(--text-3);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.legal-artifact-bytes {
  margin: 2rem 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 28px 0;
  padding: 24px 26px;
  border: 1px solid rgba(142, 168, 255, 0.25);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(43, 75, 242, 0.2), rgba(16, 20, 31, 0.6));
  box-shadow: 0 24px 60px -30px rgba(43, 75, 242, 0.6);
}

.contact-card strong {
  color: var(--sky);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-card a {
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(21px, 3vw, 26px);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-card a:hover {
  color: var(--bubble);
}

.contact-card p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

.faq-list section {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.faq-list h3 {
  margin-bottom: 8px;
}

.faq-list p {
  margin: 0;
  color: var(--text-2);
}

.steps,
.article-section .steps {
  margin: 16px 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 10px 0;
  padding: 16px 18px 16px 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(16, 20, 31, 0.7);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 16px;
  left: 18px;
  color: var(--bubble);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
}

.draft-banner,
.info-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px 0 28px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 210, 63, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(255, 210, 63, 0.06);
  color: #efe2b0;
}

.draft-banner strong,
.info-banner strong {
  font-size: 14px;
}

.draft-banner span,
.info-banner span {
  font-size: 15px;
}

.draft-banner a,
.info-banner a {
  color: inherit;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
}

.site-footer .wrap {
  padding-top: 56px;
  padding-bottom: 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: 40px;
  margin-bottom: 36px;
}

.footer-logo {
  display: inline-block;
}

.footer-mark {
  width: 96px;
  transition: transform 0.5s var(--spring);
}

.footer-logo:hover .footer-mark {
  transform: rotate(-5deg) scale(1.04);
}

.footer-tagline {
  margin: 12px 0 6px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
}

.footer-contact {
  margin: 0;
  color: var(--text-3);
  font-size: 14.5px;
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer-heading {
  margin: 0 0 12px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--text-2);
  font-size: 14.5px;
  text-decoration: none;
}

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

.footer-fine-print {
  margin: 8px 0 0;
  color: var(--text-3);
  font-size: 13px;
}

@media (max-width: 960px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .footer-groups {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 44px;
  }

  .wordmark {
    font-size: 17px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
