/* Attendlr marketing site — brand tokens mirror the app (lib/core/theme).
   Brand coral #EF4444, Inter, Material-3-adjacent neutrals. */

:root {
  --brand: #ef4444;
  --brand-dark: #c82f2f;
  --brand-tint: #fef2f2;
  --ink: #1c1b1f;
  --ink-soft: #49454f;
  --ink-faint: #79747e;
  --line: #e7e0ec;
  --surface: #ffffff;
  --surface-alt: #faf9fb;
  --on-brand: #ffffff;

  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;
  --sp-2xl: 32px;
  --sp-3xl: 48px;
  --sp-4xl: 80px;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 999px;

  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

section { padding: var(--sp-4xl) 0; }
.section-alt { background: var(--surface-alt); border-block: 1px solid var(--line); }

.section-head { max-width: 620px; margin-bottom: var(--sp-3xl); }
.section-head p { color: var(--ink-soft); margin-top: var(--sp-md); font-size: 1.05rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: var(--sp-sm);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand img { width: 48px; height: 48px; }

.nav {
  display: flex;
  gap: var(--sp-xl);
  margin-left: auto;
  align-items: center;
}
/* Scoped to the section links only. A bare `.nav a` also out-specifies
   `.btn-primary` (0,1,1 beats 0,1,0), which painted the header CTA's label
   grey-on-coral instead of white. */
.nav > a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav > a:not(.btn):hover { color: var(--ink); }

/* Language switcher: both flags, the current one marked. Flag emoji don't render
   on Windows, so these are real SVG assets. */
.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.lang-switch a {
  display: block;
  width: 30px;
  height: 20px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
  opacity: 0.5;
  filter: saturate(0.6);
  transition: opacity 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.lang-switch a:hover { opacity: 1; filter: none; }
.lang-switch a[aria-current="true"] {
  opacity: 1;
  filter: none;
  box-shadow: 0 0 0 2px var(--brand);
  cursor: default;
}
.lang-switch img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 13px 22px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.28);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }

/* ---------- hero ---------- */

.hero {
  padding: var(--sp-4xl) 0;
  background:
    radial-gradient(60rem 30rem at 78% -10%, var(--brand-tint), transparent 65%),
    var(--surface);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--sp-4xl);
  align-items: center;
}
.hero p.lead {
  margin-top: var(--sp-xl);
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 34em;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  margin-top: var(--sp-2xl);
}
.hero-note {
  margin-top: var(--sp-lg);
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.hero-trust {
  margin-top: var(--sp-md);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.phone {
  border: 10px solid #111;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(28, 27, 31, 0.22);
  max-width: 300px;
  margin: 0 auto;
  background: #111;
}
/* The screenshots are 1080x1920 (9:16). Let the height follow the width or the
   image stretches — an explicit height that doesn't match the real ratio is what
   made the phones look elongated. */
.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  display: block;
}

/* Tablet: 3:4 portrait, thinner bezel than the phone. */
.tablet {
  border: 12px solid #111;
  border-radius: 24px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 30px 70px rgba(28, 27, 31, 0.22);
  max-width: 400px;
  margin: 0 auto;
}
.tablet img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  display: block;
}

/* Laptop: a browser window, because this one is the web app in a browser. */
.laptop {
  border-radius: var(--r-md);
  overflow: hidden;
  background: #eceaf0;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(28, 27, 31, 0.22);
  max-width: 560px;
  margin: 0 auto;
}
.laptop .chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px var(--sp-md);
}
.laptop .chrome i {
  width: 9px;
  height: 9px;
  border-radius: var(--r-full);
  background: #c9c5d0;
}
.laptop .chrome .url {
  margin-left: var(--sp-sm);
  flex: 1;
  background: var(--surface);
  border-radius: var(--r-full);
  font-size: 0.7rem;
  color: var(--ink-faint);
  padding: 3px var(--sp-md);
  font-style: normal;
}
.laptop img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  display: block;
}

/* One line under a device shot, for the argument the picture can't make. */
.media-note {
  margin-top: var(--sp-lg);
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

/* ---------- store badges ---------- */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-md);
  margin-top: var(--sp-xl);
}
.store-badges a,
.store-badges .badge-soon {
  display: inline-flex;
  align-items: center;
}
/* Google ships its badge with generous built-in padding; Apple's has none.
   Sizing by height and clipping Google's padding keeps the two optically equal. */
.store-badges img {
  height: 54px;
  width: auto;
}
.store-badges .play img {
  height: 78px;
  margin: -12px;
}
.store-badges .badge-soon {
  position: relative;
  opacity: 0.45;
  filter: grayscale(1);
  cursor: default;
}
.badge-note {
  width: 100%;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: calc(-1 * var(--sp-xs));
}
.cta-band .badge-note { color: #a49fae; }
.cta-band .store-badges { justify-content: center; }

/* ---------- benefit cards ---------- */

.q-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-xl);
}
.q-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
}
.q-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--brand-tint);
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-lg);
}
.q-icon svg { width: 22px; height: 22px; display: block; }
.q-card .q {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.02rem;
  margin-bottom: var(--sp-md);
}
.q-card .a { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- features ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4xl);
  align-items: center;
  padding: var(--sp-3xl) 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
.feature.flip .feature-media { order: -1; }
.feature h2 { margin-bottom: var(--sp-lg); }
.feature p { color: var(--ink-soft); }
.feature ul {
  list-style: none;
  padding: 0;
  margin: var(--sp-xl) 0 0;
  display: grid;
  gap: var(--sp-md);
}
.feature li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-soft);
}
.feature li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--brand);
  font-weight: 800;
}

.tier-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--brand-tint);
  color: var(--brand-dark);
  border: 1px solid rgba(239, 68, 68, 0.25);
  vertical-align: 2px;
  margin-left: var(--sp-sm);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-xl);
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
}
.card h3 { margin-bottom: var(--sp-sm); }
.card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- pricing ---------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-lg);
  align-items: start;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.plan.featured {
  border-color: var(--brand);
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.14);
}
.plan-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-brand);
  background: var(--brand);
  padding: 3px 10px;
  border-radius: var(--r-full);
  margin-bottom: var(--sp-md);
}
.plan h3 { font-size: 1.05rem; }
.plan .price {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: var(--sp-md);
}
.plan .price span { font-size: 0.9rem; font-weight: 500; color: var(--ink-faint); }
.plan .per-year { font-size: 0.85rem; color: var(--ink-faint); margin-top: var(--sp-xs); }
.plan ul {
  list-style: none;
  padding: 0;
  margin: var(--sp-xl) 0 0;
  display: grid;
  gap: var(--sp-sm);
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.plan li { position: relative; padding-left: 22px; }
.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}
.plan li.soon { color: var(--ink-faint); }
.plan li.soon::before { content: "◦"; color: var(--ink-faint); }

.price-note {
  margin-top: var(--sp-xl);
  font-size: 0.9rem;
  color: var(--ink-faint);
  max-width: 62em;
}

/* ---------- faq ---------- */

.faq { max-width: 780px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: var(--sp-lg) 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--sp-lg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--brand);
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  margin-top: var(--sp-md);
  color: var(--ink-soft);
}

/* ---------- final cta ---------- */

.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-xl);
  padding: var(--sp-4xl) var(--sp-2xl);
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfc9d4; margin-top: var(--sp-md); }
.cta-band .hero-cta { justify-content: center; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: #4a4753; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--sp-3xl) 0;
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xl);
  justify-content: space-between;
  align-items: center;
}
.footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-xl); }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- legal pages ---------- */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--sp-4xl) var(--sp-xl);
}
.legal h1 { font-size: 2rem; margin-bottom: var(--sp-lg); }
.legal h2 {
  font-size: 1.25rem;
  margin: var(--sp-2xl) 0 var(--sp-md);
  padding-top: var(--sp-lg);
  border-top: 1px solid var(--line);
}
.legal h3 { font-size: 1rem; margin: var(--sp-xl) 0 var(--sp-sm); }
.legal p, .legal li { color: var(--ink-soft); }
.legal p { margin: var(--sp-md) 0; }
.legal ul, .legal ol { padding-left: var(--sp-xl); }
.legal li { margin: var(--sp-sm) 0; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-lg) 0;
  font-size: 0.92rem;
}
.legal th, .legal td {
  border: 1px solid var(--line);
  padding: var(--sp-md);
  text-align: left;
  vertical-align: top;
}
.legal th { background: var(--surface-alt); color: var(--ink); }
.legal blockquote {
  margin: var(--sp-lg) 0;
  padding: var(--sp-lg);
  background: var(--surface-alt);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.legal blockquote p:first-child { margin-top: 0; }
.legal blockquote p:last-child { margin-bottom: 0; }
.legal .updated { color: var(--ink-faint); font-size: 0.9rem; }
.legal .lang-switch {
  display: flex;
  gap: var(--sp-md);
  margin-bottom: var(--sp-2xl);
  font-size: 0.9rem;
}

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin: var(--sp-lg) 0;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-grid, .feature { grid-template-columns: 1fr; gap: var(--sp-2xl); }
  .feature.flip .feature-media { order: 0; }
  .q-grid, .price-grid { grid-template-columns: repeat(2, 1fr); }
  section { padding: var(--sp-3xl) 0; }
  /* Hide the section links. The language switcher is a div, so it survives. */
  .nav > a:not(.btn) { display: none; }
  .tablet, .laptop { max-width: 100%; }
}

@media (max-width: 600px) {
  .q-grid, .price-grid { grid-template-columns: 1fr; }
  .site-header .wrap { gap: var(--sp-md); }
  /* Long Hungarian CTA labels ("Ingyen kipróbálom a böngészőben") are wider than a phone
     viewport, and nowrap would push the whole page sideways. Let them wrap here. */
  .hero-cta .btn { width: 100%; white-space: normal; text-align: center; }
  .wrap { padding: 0 var(--sp-lg); }
}
