/* Birthday Countdown Pro — website styles. No frameworks, no external fonts. */

:root {
  color-scheme: light;
  --bg: #EDEBE6;          /* soft warm off-white, less glare than #F5F5F5 */
  --card: #FAF9F6;
  --ink: #111111;
  --muted: #8E8E93;          /* decorative / large text only */
  --muted-text: #636366;     /* readable secondary text (AA contrast on --bg and --card) */
  --accent: #FF8A65;
  --accent-soft: #FFE1D6;
  --lavender: #D4C4FF;
  --pink: #FFD4E5;
  --mint: #C4FFD4;
  --peach: #FFE4C4;
  --sky: #C4E4FF;
  --lemon: #FFF4C4;
  --radius: 20px;
  --radius-sm: 14px;
  --border: 1px solid var(--ink);
  --shadow: 3px 3px 0 var(--ink);
  --max: 1080px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--accent); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 10;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header { padding: 16px 0; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; border: var(--border); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--ink); background: var(--card); }
.brand span { white-space: nowrap; }
@media (max-width: 520px) {
  .nav .nav-hide-sm { display: none; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand img { width: 32px; height: 32px; border-radius: 8px; }
  .nav a { padding: 6px 10px; }
}
@media (max-width: 359px) { .nav { display: none; } }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Landing page (one screen on desktop) ---------- */
.landing {
  width: 100%; max-width: 1320px; margin: 0 auto;
  padding: 28px 20px 32px;
  display: flex; flex-direction: column; gap: 36px;
}

.intro { display: flex; flex-direction: column; }
.intro-title { display: flex; align-items: center; gap: 16px; }
.hero-icon {
  width: 64px; height: 64px; border-radius: 15px; border: var(--border);
  box-shadow: var(--shadow); flex-shrink: 0;
}
.intro h1 { margin: 0; font-size: clamp(2rem, 8.5vw, 3.2rem); }
.intro .tagline { margin: 18px 0 6px; font-size: clamp(1.1rem, 3.6vw, 1.35rem); font-weight: 700; }
.intro .lede { margin: 0; color: var(--muted-text); max-width: 30em; }
.hl { background: linear-gradient(transparent 60%, var(--accent-soft) 60%); padding: 0 .08em; }

.download { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 26px; }
.badge-link { display: inline-block; border-radius: 10px; flex-shrink: 0; }
/* Never distort the official badge: fixed height, natural width. */
.badge-link img { height: 54px; width: auto; max-width: none; }
.qr {
  display: none; /* shown on desktop only */
  align-items: center; gap: 12px;
  background: var(--card); border: var(--border); border-radius: var(--radius-sm); padding: 8px 14px 8px 8px;
}
.qr img { width: 88px; height: 88px; border-radius: 6px; image-rendering: pixelated; }
.qr p { margin: 0; font-size: .86rem; color: var(--muted-text); max-width: 9em; line-height: 1.35; }
.qr strong { color: var(--ink); display: block; }
/* Desktop = wide screen with a precise pointer (mouse/trackpad). */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .qr { display: inline-flex; }
}
.fine-print { margin: 22px 0 0; font-size: .86rem; line-height: 1.6; color: var(--muted-text); }

/* Phone + feature tags */
.showcase { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.phone {
  width: min(260px, 68vw); aspect-ratio: 390 / 844;
  border: var(--border); border-radius: 40px; background: var(--card);
  padding: 9px; box-shadow: 6px 6px 0 var(--ink);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; }

.tags { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 12px; }
@media (min-width: 560px) { .tags { grid-template-columns: 1fr 1fr; } }
.tag {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: var(--border); border-radius: 16px;
  padding: 10px 14px 10px 10px; box-shadow: 3px 3px 0 var(--ink);
}
.tag-text { display: flex; flex-direction: column; line-height: 1.3; }
.tag-text strong { font-size: .98rem; }
.tag-text span { font-size: .86rem; color: var(--muted-text); }
.feature-icon {
  width: 40px; height: 40px; border-radius: 12px; border: var(--border); flex-shrink: 0;
  display: grid; place-items: center; color: var(--ink);
}
.feature-icon svg { width: 22px; height: 22px; display: block; }
.bg-lavender { background: var(--lavender); }
.bg-pink { background: var(--pink); }
.bg-mint { background: var(--mint); }
.bg-peach { background: var(--peach); }
.bg-sky { background: var(--sky); }
.bg-lemon { background: var(--lemon); }

/* Phones/tablets: screenshot and features after the intro, small print at the very bottom. */
@media (max-width: 1179px) {
  .landing { gap: 0; }
  .intro { display: contents; }
  .showcase { order: 1; margin-top: 36px; }
  .fine-print { order: 2; margin-top: 32px; text-align: center; }
}

/* Desktop: everything on one screen, tags float loosely around the phone. */
@media (min-width: 1180px) {
  .landing {
    --ph: clamp(440px, calc(100vh - 160px), 620px); /* phone height */
    --tag-w: 200px;   /* max card width */
    --tag-gap: 28px;  /* minimum space between cards and the phone */
    min-height: 100vh; min-height: 100svh;
    flex-direction: row; align-items: center; justify-content: space-between; gap: 28px;
    padding: 32px 32px;
  }
  .intro { flex: 1 1 0; min-width: 0; max-width: 500px; }
  .hero-icon { width: 76px; height: 76px; border-radius: 18px; }
  .intro h1 { font-size: 3.2rem; }

  .showcase { display: block; position: relative; flex: 0 0 auto; height: var(--ph); width: calc(var(--ph) * .4621 + 2 * (var(--tag-w) + 24px + var(--tag-gap))); }
  .phone { position: absolute; left: 50%; top: 0; transform: translateX(-50%); height: 100%; width: auto; }
  .tags { display: block; position: absolute; inset: 0; pointer-events: none; }
  .tag {
    position: absolute; top: var(--y); width: max-content; max-width: var(--tag-w);
    transform: rotate(var(--r)); pointer-events: auto;
  }
  /* Anchored to the phone's edge, so there is always a gap however wide a card is. */
  .tag-l { right: calc(50% + var(--ph) * .23105 + var(--tag-gap) + var(--x)); }
  .tag-r { left: calc(50% + var(--ph) * .23105 + var(--tag-gap) + var(--x)); }
}

/* ---------- Legal / text pages ---------- */
.page { padding: 20px 0 64px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose .card { padding: clamp(22px, 5vw, 44px); }
.prose h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose h3 { font-size: 1.05rem; margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose .meta { color: var(--muted-text); font-size: .95rem; }
.contact-card { display: grid; gap: 14px; align-items: center; background: var(--sky); }
@media (min-width: 700px) { .contact-card { grid-template-columns: 1fr auto; } }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; text-decoration: none; color: var(--ink);
  background: var(--accent); border: var(--border); border-radius: 999px;
  padding: 12px 22px; box-shadow: var(--shadow); transition: transform .1s ease, box-shadow .1s ease;
}
.button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.email-text { font-weight: 700; overflow-wrap: anywhere; }

/* Narrower laptops: QR code without its caption so it stays next to the badge. */
@media (min-width: 1180px) and (max-width: 1365px) {
  .qr { padding: 8px; }
  .qr p { display: none; }
}
