/* Gratla's website. The colors, fonts and month pastels are the app's own (src/theme in the app
   repo), so the site looks like the app. Light and dark follow the visitor's phone or computer,
   until the button in the header chooses one (assets/theme.js sets data-theme on <html>).
   Everything is served from this site: no fonts, scripts or images from elsewhere. */

@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/Newsreader-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --bg: #FAFAFD;
  --surface: #FFFFFF;
  --surface-muted: #EFF0F9;
  --border: #E3E5F4;
  --ink: #21243C;
  --muted: #5E6277;
  --primary: #37459B;
  --on-primary: #FFFFFF;
  --accent: #37459B;
  --pink-strong: #D6336C;
  --butter: #FFEFA0;
  --phone-shadow: 0 30px 60px -30px rgba(20, 22, 41, .35), 0 2px 0 rgba(20, 22, 41, .03);
  /* The button in the header shows the moon in light mode and the sun in dark. */
  --show-sun: none;
  --show-moon: block;

  /* The twelve month pastels (--mN) and the strong color that goes on each (--omN), as in the app. */
  --m1: #BDE7FE; --om1: #076386;
  --m2: #A0F8FE; --om2: #00686E;
  --m3: #9EECD3; --om3: #086B55;
  --m4: #EEF4A5; --om4: #5D6001;
  --m5: #C0EFBA; --om5: #2F6A2A;
  --m6: #FEEAC7; --om6: #755508;
  --m7: #FFDFCC; --om7: #8B440C;
  --m8: #FFC5C2; --om8: #903C3D;
  --m9: #FFD1E3; --om9: #893C61;
  --m10: #F8CFFE; --om10: #784281;
  --m11: #E6E2FE; --om11: #5D4C95;
  --m12: #BBD4FF; --om12: #36589B;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 20px;
  color-scheme: light;
}

/* Dark, when chosen with the button, or when the system is dark and light was not chosen. The two
   blocks hold the same values. */
:root[data-theme="dark"] {
  --bg: #141629;
  --surface: #1E2140;
  --surface-muted: #292D52;
  --border: #363B66;
  --ink: #F0F1FA;
  --muted: #C3C7DE;
  --primary: #8C99F2;
  --on-primary: #141629;
  --accent: #AEB6FA;
  --pink-strong: #FF7AA8;
  --butter: #5C5424;
  --phone-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
  --show-sun: block;
  --show-moon: none;
  --m1: #025473; --om1: #9ADBFD;
  --m2: #006267; --om2: #85E3EA;
  --m3: #075140; --om3: #91E5CA;
  --m4: #4E510F; --om4: #DFE59F;
  --m5: #30582C; --om5: #B0E1AA;
  --m6: #644803; --om6: #FCD999;
  --m7: #7A4625; --om7: #FFC29D;
  --m8: #6E3332; --om8: #FEBFBB;
  --m9: #6F3852; --om9: #FEBAD7;
  --m10: #623C68; --om10: #EDBEF4;
  --m11: #564C80; --om11: #D1C9FE;
  --m12: #29416F; --om12: #BAD2FD;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141629;
    --surface: #1E2140;
    --surface-muted: #292D52;
    --border: #363B66;
    --ink: #F0F1FA;
    --muted: #C3C7DE;
    --primary: #8C99F2;
    --on-primary: #141629;
    --accent: #AEB6FA;
    --pink-strong: #FF7AA8;
    --butter: #5C5424;
    --phone-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
    --show-sun: block;
    --show-moon: none;
    --m1: #025473; --om1: #9ADBFD;
    --m2: #006267; --om2: #85E3EA;
    --m3: #075140; --om3: #91E5CA;
    --m4: #4E510F; --om4: #DFE59F;
    --m5: #30582C; --om5: #B0E1AA;
    --m6: #644803; --om6: #FCD999;
    --m7: #7A4625; --om7: #FFC29D;
    --m8: #6E3332; --om8: #FEBFBB;
    --m9: #6F3852; --om9: #FEBAD7;
    --m10: #623C68; --om10: #EDBEF4;
    --m11: #564C80; --om11: #D1C9FE;
    --m12: #29416F; --om12: #BAD2FD;
    color-scheme: dark;
  }
}

.m1 { --c: var(--m1); --oc: var(--om1); }
.m2 { --c: var(--m2); --oc: var(--om2); }
.m3 { --c: var(--m3); --oc: var(--om3); }
.m4 { --c: var(--m4); --oc: var(--om4); }
.m5 { --c: var(--m5); --oc: var(--om5); }
.m6 { --c: var(--m6); --oc: var(--om6); }
.m7 { --c: var(--m7); --oc: var(--om7); }
.m8 { --c: var(--m8); --oc: var(--om8); }
.m9 { --c: var(--m9); --oc: var(--om9); }
.m10 { --c: var(--m10); --oc: var(--om10); }
.m11 { --c: var(--m11); --oc: var(--om11); }
.m12 { --c: var(--m12); --oc: var(--om12); }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* Header and footer */
.site-header { padding-block: 18px; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand span { font-family: var(--serif); font-size: 28px; line-height: 1; }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.theme-toggle {
  width: 40px; height: 40px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  display: grid; place-items: center;
}
.theme-toggle:hover { background: var(--surface-muted); }
.theme-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: var(--show-sun); }
.theme-toggle .moon { display: var(--show-moon); }
.site-header nav a, .site-footer nav a { color: var(--muted); font-weight: 700; text-decoration: none; }
.site-header nav a:hover, .site-footer nav a:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] { color: var(--ink); }

.site-footer { margin-top: 88px; border-top: 1px solid var(--border); padding-block: 28px 40px; color: var(--muted); font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* Shared pieces */
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 19px; color: var(--muted); max-width: 34em; }
.button {
  display: inline-block; text-align: center; text-decoration: none; font-weight: 800;
  background: var(--primary); color: var(--on-primary); padding: 14px 24px; border-radius: 999px;
}
.soon { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 16px; font-size: 15px; }
.soon .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pink-strong); }

/* Front page: hero */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 40px; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-width: 0; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); }

/* A drawing of the app's home screen, made of the same pieces as the app. */
.phone {
  justify-self: center; width: 100%; max-width: 340px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 40px;
  padding: 18px 18px 26px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--phone-shadow);
  font-size: 15px; line-height: 1.35;
}
.phone .status { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; padding: 0 6px; }
.phone .greeting { font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.phone .small { font-size: 13px; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 7px; border-radius: 13px; border: 1px solid transparent; }
.day small { font-size: 10px; font-weight: 800; color: var(--muted); }
.day b { font-size: 14px; }
.day i { width: 5px; height: 5px; border-radius: 50%; }
.day.today { border-color: var(--accent); }
.day.has { border-color: var(--oc); color: var(--oc); }
.day.has small { color: var(--oc); }
.day.has i { background: var(--oc); }
.next { background: var(--c); border-radius: 22px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.next .left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.chip { align-self: flex-start; background: var(--surface); color: var(--oc); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800; }
.next .name { font-family: var(--serif); font-size: 27px; line-height: 1.05; color: var(--ink); }
.next .date { font-weight: 600; color: var(--oc); font-size: 14px; }
.age { flex: none; width: 58px; height: 58px; border-radius: 50%; background: var(--surface); color: var(--oc); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.age b { font-family: var(--serif); font-weight: 500; font-size: 26px; }
.age span { font-size: 10px; font-weight: 800; }
.phone .heading { font-weight: 800; font-size: 16px; display: flex; justify-content: space-between; }
.phone .heading span { color: var(--accent); font-size: 14px; }
.ticket { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 15px; overflow: hidden; }
.ticket + .ticket { margin-top: 8px; }
.stub { width: 50px; flex: none; background: var(--c); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; }
.stub b { font-family: var(--serif); font-weight: 500; font-size: 20px; line-height: 1; color: var(--ink); }
.stub span { font-size: 10px; font-weight: 800; color: var(--oc); }
.ticket .body { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 12px; min-width: 0; }
.ticket .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ticket .who b { font-weight: 600; }
.ticket .years { font-weight: 700; font-size: 18px; }
.pill { display: inline-block; margin-left: 6px; border: 1px solid var(--pink-strong); color: var(--pink-strong); font-size: 10px; font-weight: 800; border-radius: 999px; padding: 0 6px; line-height: 15px; vertical-align: 2px; }

/* Front page: sections */
.section { padding-top: 96px; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 40em; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 40px); }
.section-head p { color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.feature .icon { width: 44px; height: 44px; border-radius: 14px; background: var(--c); color: var(--oc); display: grid; place-items: center; margin-bottom: 6px; }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { font-family: var(--sans); font-weight: 800; font-size: 18px; line-height: 1.3; }
.feature p { color: var(--muted); font-size: 16px; }

.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; }
.month { background: var(--c); color: var(--oc); border-radius: 16px; aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; font-weight: 800; font-size: 14px; min-width: 0; }
.month b { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1; color: var(--ink); }

.promise { background: var(--butter); border-radius: 28px; padding: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; align-items: start; }
.promise h2 { font-size: clamp(28px, 3.2vw, 36px); }
.promise ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.promise li { display: flex; gap: 10px; font-weight: 600; }
.promise li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--pink-strong); }
.promise p { color: var(--ink); }
.promise-more { margin-top: 18px; font-weight: 800; }
.promise a { color: var(--ink); }

/* Text pages: privacy, support */
.page { padding-top: 40px; }
.prose { max-width: 42em; display: flex; flex-direction: column; gap: 16px; }
.prose h1 { font-size: clamp(36px, 5vw, 50px); margin-bottom: 4px; }
.prose h2 { font-size: 28px; margin-top: 28px; }
.prose h3 { font-family: var(--sans); font-weight: 800; font-size: 18px; margin-top: 12px; }
.prose ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.prose .updated { color: var(--muted); }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.prose .summary h2 { margin-top: 0; font-size: 22px; }
.prose .button { align-self: flex-start; }
.contact { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.contact a { font-weight: 800; font-size: 19px; word-break: break-all; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 20px; }
details + details { margin-top: -6px; }
summary { cursor: pointer; font-weight: 800; padding: 14px 0; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
details > :not(summary) { margin-bottom: 14px; }
details ol, details ul { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 6px; }

/* The page for shared birthdays */
.shared { max-width: 30em; display: flex; flex-direction: column; gap: 20px; }
.shared h1 { font-size: clamp(34px, 6vw, 46px); }
.shared .lede { font-size: 17px; }
.people { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.people li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.people li + li { border-top: 1px solid var(--border); }
.people .stub { width: 44px; height: 44px; border-radius: 12px; }
.people .who { display: flex; flex-direction: column; min-width: 0; }
.people .who b { font-weight: 700; }
.people .who span { font-size: 15px; color: var(--muted); }
.note { font-size: 15px; color: var(--muted); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
  .features { grid-template-columns: 1fr 1fr; }
  .months { grid-template-columns: repeat(6, 1fr); }
  .promise { grid-template-columns: 1fr; padding: 28px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .months { grid-template-columns: repeat(4, 1fr); }
  .section { padding-top: 72px; }
  .site-header nav { gap: 14px; }
}
