/* GiftBuddy showcase site. Colors and type mirror lib/design_system/tokens. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff") format("woff");
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff") format("woff");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #FAF7F4;        /* GBColors.background */
  --surface: #FFFEFB;      /* GBColors.surface */
  --surface-muted: #F1EBE5;/* GBColors.surfaceMuted */
  --ink: #2A211C;          /* GBColors.text */
  --ink-soft: #5A4F48;     /* neutralTones[2], readable secondary text */
  --line: #D9CFC5;         /* GBColors.border */
  --coral: #FF6F61;        /* GBColors.primary */
  --wine: #7A1F2E;         /* GBColors.primaryButton */
  --gold: #D4AF37;         /* GBColors.secondary */
  --gold-soft: #F8EFC4;
  --danger: #B3231E;       /* GBColors.error */

  /* Brand: terracotta gradient of the store screenshots, confetti of the app icon. */
  --terracotta: linear-gradient(170deg, #FFD9CF 0%, #FFAE9F 38%, #FF7E6E 72%, #E25A49 100%);
  --sky: #3FACFC;          /* the blue confetti of the app icon */

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 10px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
}

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

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

h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--wine); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 44rem; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* Header & footer */

.site-header { padding-block: 1.25rem; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 600 1.35rem/1 var(--serif); color: var(--ink); text-decoration: none;
}
.brand-mark { width: 36px; height: 36px; border-radius: 23%; }

.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--wine); text-decoration: underline; }

.site-footer {
  margin-top: clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.footer-inner { display: grid; gap: 1rem; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; font-family: var(--serif); font-size: 1.1rem; color: var(--ink); margin: 0; }
.footer-mark { width: 32px; height: 32px; border-radius: 23%; flex: none; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.footer-links a { color: var(--ink-soft); }
.footer-links a[aria-current="page"] { color: var(--wine); }
.footer-copy { margin: 0; }

/* Hero: the terracotta of the store screenshots, with the icon's confetti. */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--terracotta);
  color: var(--ink);
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.hero-logo {
  width: clamp(72px, 9vw, 104px); height: auto;
  border-radius: 23%;
  box-shadow: 0 18px 40px -14px rgba(122, 31, 46, 0.55);
  margin-bottom: 1.75rem;
}
.hero-copy h1 { max-width: 13ch; }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.25rem); color: var(--ink); max-width: 34rem; }
.get-app { margin-top: 0.5rem; }
.get-app-links { display: flex; align-items: center; gap: 1.5rem; }
.get-app-note { margin: 0.75rem 0 0; font-size: 0.95rem; color: var(--ink); }

/* Apple's official badge: keep its proportions, never recolor it. */
.store-badge { display: inline-block; line-height: 0; border-radius: 9px; }
.store-badge img { width: auto; height: 52px; }
.store-badge:focus-visible { outline: 3px solid var(--wine); outline-offset: 3px; }

/* The QR code only helps on a computer: scanned with the phone. */
.store-qr { margin: 0; display: grid; justify-items: center; gap: 0.35rem; }
.store-qr img { width: 96px; height: 96px; border-radius: 10px; background: #fff; padding: 6px; }
.store-qr figcaption { font-size: 0.8rem; color: var(--ink); }

/* Confetti pieces, cut like the ones popping out of the icon's box. */
.confetti span {
  position: absolute;
  display: block;
  width: var(--size, 28px); height: var(--size, 28px);
  background: var(--piece, var(--wine));
  clip-path: polygon(50% 0, 100% 100%, 0 70%);
  opacity: 0.9;
}
.confetti span:nth-child(1) { --piece: var(--wine);   --size: 34px; top: 12%; left: 46%; transform: rotate(-18deg); }
.confetti span:nth-child(2) { --piece: var(--sky);    --size: 22px; top: 8%;  left: 62%; transform: rotate(32deg); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.confetti span:nth-child(3) { --piece: #fff; --size: 26px; top: 20%; right: 6%; transform: rotate(60deg); }
.confetti span:nth-child(4) { --piece: var(--gold);   --size: 18px; top: 46%; left: 50%; transform: rotate(140deg); }
.confetti span:nth-child(5) { --piece: var(--gold); --size: 14px; top: 6%;  left: 30%; transform: rotate(200deg); }
.confetti span:nth-child(6) { --piece: #fff; --size: 20px; bottom: 18%; right: 3%; transform: rotate(-40deg); }

/* Phone mockups built around the app screenshots. */
.phone {
  margin: 0;
  justify-self: center;
  width: clamp(230px, 26vw, 300px);
  padding: 9px;
  border-radius: 46px;
  background: #1C1C1E;
  box-shadow: 0 40px 70px -30px rgba(122, 31, 46, 0.5);
}
.phone img { width: 100%; height: auto; border-radius: 37px; }
.hero-phone {
  transform: rotate(3deg);
  box-shadow: 0 40px 80px -24px rgba(90, 20, 20, 0.55);
}

/* Features, in Alex's order of importance: share, import, reminders. */

.features { padding-block: clamp(4rem, 9vw, 6rem) clamp(3rem, 7vw, 5rem); }
.features-title { text-align: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature:nth-of-type(even) .feature-copy { order: 2; }
.feature-copy { max-width: 32rem; }
.feature-copy h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.feature-copy > p:not(.feature-kicker) { color: var(--ink-soft); }
.feature-kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 600; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.feature-kicker::before {
  content: "";
  width: 18px; height: 18px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 100%, 0 70%);
}
.feature-share { --accent: var(--coral); }
.feature-import { --accent: var(--gold); }
.feature-reminders { --accent: var(--wine); }
.feature-points { margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.7rem; }
.feature-points li { position: relative; padding-left: 1.6rem; }
.feature-points li::before {
  content: "";
  position: absolute; left: 0; top: 0.5em;
  width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent);
  transform: rotate(45deg);
}
.feature-note { margin: 1.25rem 0 0; font-size: 0.92rem; color: var(--ink-soft); }

/* Points */

.points { padding-block: clamp(3.5rem, 8vw, 6rem); }
.points-inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 5vw, 4rem); }
.point-list { margin: 0; display: grid; gap: 1.75rem; }
.point-list div { padding-left: 1.25rem; border-left: 3px solid var(--gold); }
.point-list dt { font: 600 1.2rem/1.3 var(--serif); margin-bottom: 0.35rem; }
.point-list dd { margin: 0; color: var(--ink-soft); }

/* FAQ */

.faq h2, .faq details { max-width: 44rem; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 0; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 500 1.4rem/1 var(--serif); color: var(--wine); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-soft); margin: 0 0 1.25rem; }

/* Prose pages (legal, confirmations) */

.prose { padding-top: clamp(2rem, 6vw, 4rem); }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 0.9rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.65rem; text-align: left; vertical-align: top; min-width: 9rem; }
.prose th { background: var(--surface-muted); }

.placeholder {
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}
.placeholder p { margin: 0; }

.confirm h1 { max-width: 16ch; }

/* Buttons */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75rem 1.4rem;
  border: 2px solid var(--wine); border-radius: 999px;
  background: var(--wine); color: #fff;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  margin: 0.25rem 0.5rem 0.25rem 0;
}
.button:hover { background: #5C1C18; border-color: #5C1C18; text-decoration: none; }
.button-quiet { background: transparent; color: var(--wine); }
.button-quiet:hover { background: var(--surface-muted); border-color: var(--wine); }
.button-danger { background: var(--danger); border-color: var(--danger); }
.button-danger:hover { background: #8F1C18; border-color: #8F1C18; }

/* Forms */

.form-page { padding-top: clamp(2rem, 6vw, 4rem); }
.form-page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.form { margin-top: 2rem; display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; }
.optional { font-weight: 400; color: var(--ink-soft); }

.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; color: var(--ink);
  background: var(--surface);
  border: 1px solid #BEB2AA;
  border-radius: var(--radius);
  padding: 0.75rem 0.9rem;
  min-height: 48px;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--wine); outline-offset: 1px; border-color: var(--wine);
}

.field-check { grid-template-columns: auto 1fr; align-items: start; gap: 0.75rem; }
.field-check input { width: 22px; height: 22px; min-height: 0; margin-top: 0.15rem; accent-color: var(--wine); }
.field-check label { font-weight: 500; }

.form-notice { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.form .button { justify-self: start; }
.aside-link { margin-top: 2.5rem; color: var(--ink-soft); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Closing band */

.closing { margin-top: clamp(3.5rem, 8vw, 5rem); }
.closing-inner {
  display: flex; align-items: center; gap: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--terracotta); color: var(--ink);
  border-radius: 28px;
  padding: clamp(1.75rem, 5vw, 3rem);
}
.closing-inner > div { min-width: 0; }
.closing h2 { margin-bottom: 0.4em; }
.closing p { margin: 0; }
.closing a:not(.store-badge) { color: var(--ink); font-weight: 600; }
.closing .store-badge { margin-top: 1.25rem; }
.closing-logo { width: clamp(64px, 10vw, 96px); height: auto; border-radius: 23%; flex: none; box-shadow: 0 14px 30px -12px rgba(122, 31, 46, 0.55); }
/* Small screens */

@media (max-width: 760px) {
  .hero-inner, .points-inner, .feature { grid-template-columns: 1fr; }
  .hero-phone { width: min(70vw, 260px); }
  .confetti span:nth-child(1), .confetti span:nth-child(3), .confetti span:nth-child(4) { display: none; }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
  .feature .phone { width: min(68vw, 260px); }
  .closing-inner { flex-direction: column; align-items: flex-start; }
  .site-nav { gap: 1rem; font-size: 0.95rem; }
  .store-qr { display: none; }
}
