:root {
  --bg: #F3EEE4;
  --surface: #FFFDF8;
  --text: #1C1A16;
  --muted: #5E584E;
  --line: #E2DACB;
  --accent: #E2552B;
  --accent-hover: #B34322;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

/* No sideways scrolling: on both, because iOS Safari ignores it on body alone */
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--accent); transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
a[href^="mailto:"] { text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0; font-weight: 800; }
p { margin: 0; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 800px; }

/* Header: stays on top while scrolling */
.site-header {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--line); padding: 16px 0;
  background: rgba(243, 238, 228, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
.site-header .container {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px 20px;
}
.logo {
  font-size: 26px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none; line-height: 1;
}
.logo span { color: var(--accent); }
.logo:hover { color: var(--text); }
.lang { font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.lang strong { font-weight: 800; color: var(--text); }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--accent); }

/* Sections */
section { margin-top: 72px; scroll-margin-top: calc(var(--header-h) + 16px); }
.section-title { font-size: clamp(26px, 5vw, 32px); line-height: 1.15; letter-spacing: -0.02em; }
.section-lead { margin-top: 8px; color: var(--muted); }
.section-body { margin-top: 24px; }

.grid { display: flex; flex-wrap: wrap; gap: 16px; }
.grid.steps > * { flex: 1 1 260px; }
.grid.safety > * { flex: 1 1 300px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
}
.card h3 { font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.card p { color: var(--muted); }
.num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--text); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 16px;
}

/* Buttons */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 26px; border-radius: 16px;
  font-size: 16px; font-weight: 700; text-decoration: none; text-align: center;
  background: var(--text); color: var(--bg); border: 1.5px solid var(--text);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:hover { color: var(--bg); background: #000; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(28, 26, 22, 0.18); }
.btn:active { transform: scale(0.97); box-shadow: none; }

/* Hero */
.hero {
  position: relative;
  margin-top: 0; padding: 72px 0 56px;
  /* wrap-reverse: when the event card does not fit on the right, it goes above the text */
  display: flex; flex-wrap: wrap-reverse; align-items: center; gap: 48px;
}
.hero-text { flex: 1 1 420px; }
.eyebrow {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--accent);
}
.hero h1 {
  margin-top: 16px; font-size: clamp(36px, 8vw, 56px); line-height: 1.04; letter-spacing: -0.03em;
}
.intro { margin-top: 20px; font-size: clamp(17px, 2.4vw, 19px); color: var(--muted); max-width: 34em; }
.hero .buttons { margin-top: 32px; }
.hero-visual { position: relative; isolation: isolate; flex: 0 0 300px; margin: 0 auto; }
/* Soft warm glow behind the phone */
.hero-visual::before {
  content: ""; position: absolute; inset: -12% -18%; z-index: -1;
  background: radial-gradient(closest-side, rgba(226, 85, 43, 0.22), transparent);
  filter: blur(8px);
}
.phone {
  width: 300px; border-radius: 28px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(28, 26, 22, 0.12);
}
.phone img { display: block; width: 100%; height: 260px; object-fit: cover; }
.phone .body { padding: 20px; }
.phone .meta { font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.phone h3 { font-size: 20px; margin-top: 6px; }
.phone .going { margin-top: 6px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
/* "Live" dot */
.phone .going::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: #2E9E5B; box-shadow: 0 0 0 0 rgba(46, 158, 91, 0.5);
}
.phone .btn { width: 100%; margin-top: 16px; height: 48px; }
.phone .btn:hover, .phone .btn:active { background: var(--text); transform: none; box-shadow: none; }

/* Support */
.support { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.faq { flex: 1 1 480px; }
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq summary {
  font-weight: 700; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  transition: color 0.2s;
}
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; font-weight: 800; font-size: 20px; line-height: 1; color: var(--muted);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { margin-top: 8px; color: var(--muted); }
.faq details[open] p { animation: fade-down 0.35s var(--ease); }
.contact { flex: 1 1 300px; }
.contact h3 { margin-bottom: 12px; }
.contact .email { font-size: 17px; font-weight: 700; }
.contact p + p { margin-top: 12px; }

.delete-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.delete-card p { max-width: 36em; }
/* Legal pages */
.legal { padding-top: 40px; }
.back { font-size: 15px; font-weight: 600; text-decoration: none; }
.legal h1 { margin-top: 24px; font-size: clamp(32px, 7vw, 44px); line-height: 1.08; letter-spacing: -0.02em; }
.legal .date { margin-top: 10px; color: var(--muted); }
.legal h2 { margin-top: 28px; margin-bottom: 10px; font-size: clamp(20px, 4vw, 22px); line-height: 1.25; scroll-margin-top: calc(var(--header-h) + 16px); }
.legal p + p, .legal ul + p, .legal ol + p { margin-top: 12px; }
.legal ul, .legal ol { margin: 0; padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal p + ul, .legal p + ol { margin-top: 10px; }
.legal p, .legal li { overflow-wrap: anywhere; }

/* Footer */
.site-footer {
  margin-top: 72px; border-top: 1px solid var(--line);
  padding: 32px 0 40px; font-size: 14px; color: var(--muted);
}
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.site-footer .logo { font-size: 22px; display: inline-block; margin-bottom: 10px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* Motion */
@keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: none; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(46, 158, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 158, 91, 0); } }

@media (prefers-reduced-motion: no-preference) {
  /* Hero comes in on page load, one line after another */
  .hero-text > * { animation: rise 0.8s var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: 0.08s; }
  .hero-text > :nth-child(3) { animation-delay: 0.16s; }
  .hero-text > :nth-child(4) { animation-delay: 0.24s; }
  .hero-text > :nth-child(5) { animation-delay: 0.32s; }
  .hero-visual { animation: rise 1s 0.2s var(--ease) both; }
  .phone .going::before { animation: pulse 2s infinite; }

  /* Cards and titles slide in while scrolling (where the browser supports it) */
  @supports (animation-timeline: view()) {
    .section-title, .section-lead, .grid .card, .faq details, .contact, .delete-card {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Phones */
@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .container { padding: 0 16px; }

  .site-header { padding: 14px 0; }
  .logo { font-size: 24px; }
  .lang a { padding: 6px 0; }

  section { margin-top: 56px; }
  .hero { padding: 36px 0 24px; gap: 40px; }
  .eyebrow { font-size: 12px; }
  .hero .buttons { flex-direction: column; }
  .hero .buttons .btn { width: 100%; }
  .hero-visual, .phone { width: 100%; max-width: 320px; }
  /* Keep the glow inside the screen */
  .hero-visual::before { inset: -8% -4%; }
  .phone img { height: 220px; }

  .card { padding: 20px; border-radius: 18px; }
  .grid { gap: 12px; }
  .grid.safety > *, .grid.steps > * { flex-basis: 100%; }

  /* Steps: number on the left, text on the right */
  .grid.steps .card { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; align-items: start; }
  .grid.steps .num { grid-row: span 2; width: 40px; height: 40px; margin: 0; }
  .grid.steps .card h3 { margin-bottom: 2px; }

  .faq summary { padding: 4px 0; }
  .delete-card .btn { width: 100%; }

  .site-footer { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .site-footer .container { flex-direction: column; }
  .footer-links { gap: 2px; }
  .footer-links a { padding: 6px 0; }
}
