/* ==========================================================================
   Giveaway site – mobile-first styles
   Breakpoints: 600px (tablet), 1024px (desktop)
   ========================================================================== */

:root {
  --primary: #12306B;
  --primary-dark: #0A1F47;
  --accent: #FF7A3D;

  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --ink: #10162B;
  --ink-2: #3A4256;
  --muted: #4A5168;
  --on-primary-muted: #C9D2E8;
  --line: #DDE1EA;
  --line-soft: #EBEDF3;
  --field-border: #CDD2DE;
  --focus: #9DB4F0;

  --error: #B42318;
  --error-bg: #FFF5F4;
  --ok: #146C43;
  --ok-border: #1F8A5B;
  --ok-bg: #F3FBF6;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 12px;
  --radius-lg: 28px;
  --radius-md: 24px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

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

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Brand mark & header ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--primary);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.5px;
}
.brand-mark--sm { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.3px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 0;
}
.site-header--center { justify-content: center; padding-top: 22px; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.btn.header-cta { display: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.icon-btn {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
}
.header-spacer { width: 44px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: 18px;
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
}
.btn--block { display: flex; width: 100%; }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { color: var(--ink); filter: brightness(1.05); }
.btn--primary { background: var(--primary); color: #FFFFFF; }
.btn--primary:hover { color: #FFFFFF; background: var(--primary-dark); }
.btn--sm { min-height: 44px; padding: 0 20px; border-radius: 14px; font-size: 15px; }
.btn:focus-visible { outline-offset: 3px; }
.btn[disabled],
.btn[aria-disabled="true"] {
  background: #D3D7E2;
  color: var(--muted);
  cursor: not-allowed;
  filter: none;
}

.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Headings ---------- */

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
}
.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

/* ---------- Hero ---------- */

.hero {
  margin: 0 var(--gutter);
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: #FFFFFF;
  padding: 28px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}
.hero-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.badge {
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 42px;
  line-height: 1.02;
  letter-spacing: -1.2px;
}
.hl { color: var(--accent); }
.hero-sub { margin: 0; font-size: 17px; line-height: 1.5; color: #E4E9F5; }
.hero-cta { display: flex; flex-direction: column; gap: 12px; }
.hero-note { margin: 0; text-align: center; font-size: 13px; color: var(--on-primary-muted); }
.hero-figure {
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hero-figure svg { width: 300px; height: auto; }
.hero-figure figcaption { font-size: 12px; color: var(--on-primary-muted); text-align: center; }

/* ---------- Sections & cards ---------- */

.section {
  margin: 8px var(--gutter) 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section-head { margin: 0 8px 4px; display: flex; flex-direction: column; gap: 6px; }
.section-head p { margin: 0; font-size: 14px; color: var(--muted); }

.card-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
}

.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--primary);
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
}
.step-num--accent { background: var(--accent); color: var(--ink); }
.step h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.step p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); }

.placeholder-note {
  border: 2px dashed #B9802A;
  background: #FFF6E8;
  color: #6B4A12;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
}

.testimonial {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}
.testimonial blockquote { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 500; }
.testimonial figcaption { display: flex; align-items: center; gap: 12px; }
.avatar {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: #E3E7F1;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.person { display: flex; flex-direction: column; }
.person strong { font-size: 15px; }
.person span { font-size: 14px; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  margin: 16px var(--gutter) 0;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.site-footer p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand .person strong { font-size: 15px; }
.footer-brand .person span { font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; font-weight: 600; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer .copyright { font-size: 12px; color: #5A6178; }

/* ---------- Progress ---------- */

.progress { margin: 0 20px; display: flex; flex-direction: column; gap: 10px; }
.progress-label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.progress-label span:last-child { color: var(--muted); }
.progress-track { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: var(--primary); }

/* ---------- Entry layout (details / confirm) ---------- */

.entry-layout { display: flex; flex-direction: column; gap: 16px; }
.entry-aside { display: none; }

.panel {
  margin: 0 var(--gutter);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.panel-head { display: flex; flex-direction: column; gap: 6px; }
.panel-head .display { font-size: 32px; }

.stack { margin: 0 var(--gutter); display: flex; flex-direction: column; gap: 14px; }
.stack > .panel-head { margin: 6px 8px 4px; }

/* ---------- Form fields ---------- */

.fields { display: grid; grid-template-columns: 1fr; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-weight: 600; font-size: 15px; }
.field input {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--field-border);
}
.field input::placeholder { color: #6B7288; }
.field input:focus { outline: 3px solid var(--focus); outline-offset: 1px; }
.field.is-invalid input { border-color: var(--error); background: var(--error-bg); }
.field.is-valid input { border-color: var(--ok-border); background: var(--ok-bg); }

.tel-group { display: flex; gap: 8px; }
.tel-prefix {
  flex: none;
  min-height: 54px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--bg);
  border: 2px solid var(--line);
  display: flex; align-items: center;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink-2);
}
.tel-group input { flex: 1; min-width: 0; }

.field-msg {
  margin: 0;
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}
.field-msg svg { flex: none; }
.field.is-invalid .field-msg--err { display: flex; color: var(--error); }
.field.is-valid .field-msg--ok { display: flex; color: var(--ok); }

.form-note { margin: 0; text-align: center; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* ---------- Alerts ---------- */

.alert {
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.alert svg { flex: none; margin-top: 2px; }
.alert[hidden] { display: none; }
.alert--error { background: var(--error-bg); color: var(--error); border: 2px solid #F2B8B5; }
.alert--warn { background: #FFF6E8; color: #6B4A12; border: 2px solid #E8C48A; }

/* ---------- Confirm page ---------- */

.summary-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; }
.summary-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.edit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 4px;
  font-weight: 600;
  font-size: 15px;
}
.summary { margin: 0; display: flex; flex-direction: column; }
.summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.summary dt { color: var(--muted); font-size: 15px; }
.summary dd { margin: 0; font-weight: 600; font-size: 15px; text-align: right; overflow-wrap: anywhere; }

.consent { display: flex; flex-direction: column; gap: 18px; }
.check { display: flex; gap: 14px; align-items: flex-start; }
.check input {
  flex: none;
  margin: 1px 0 0;
  width: 24px; height: 24px;
  accent-color: var(--primary);
  cursor: pointer;
}
.check-body { display: flex; flex-direction: column; gap: 6px; }
.check label { font-size: 15px; line-height: 1.5; font-weight: 500; cursor: pointer; }
.check-hint { font-size: 13px; color: var(--muted); }
.tag-required {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #8A2C0D;
  background: #FFEDE4;
  padding: 3px 8px;
  border-radius: 6px;
}
.divider { height: 1px; background: var(--line-soft); }
.submit-hint { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }

/* ---------- Success page ---------- */

.success {
  align-items: center;
  text-align: center;
  padding: 40px 22px 28px;
}
.success-badge-wrap {
  position: relative;
  width: 132px; height: 132px;
  display: flex; align-items: center; justify-content: center;
}
.success-ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accent);
  animation: ring 1.4s 0.35s ease-out infinite;
}
.success-badge {
  position: relative;
  width: 112px; height: 112px;
  border-radius: 999px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  animation: pop 0.6s cubic-bezier(.2, .8, .2, 1) both;
}
.success-check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.45s 0.5s ease-out forwards;
}
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ring { 0% { transform: scale(.85); opacity: .55; } 100% { transform: scale(1.55); opacity: 0; } }

.success h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  letter-spacing: -1px;
  line-height: 1.05;
}
.success-copy { display: flex; flex-direction: column; gap: 10px; }
.success-copy p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink-2); }
.success .divider { width: 100%; }
.share { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.share h2 { margin: 0; font-size: 16px; font-weight: 700; }
.copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 6px 6px 16px;
  border-radius: 18px;
  border: 2px solid var(--line);
}
.copy-row span {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 15px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  font-size: 16px;
}

/* ---------- Legal pages ---------- */

.legal h1 { font-size: 32px; }
.legal h2 { margin: 8px 0 0; font-size: 20px; font-weight: 700; }
.legal p, .legal li { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal section { display: flex; flex-direction: column; gap: 10px; }
.legal mark { background: #FFEDE4; color: #8A2C0D; padding: 0 4px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .success-check { stroke-dashoffset: 0; }
}

/* ==========================================================================
   ≥ 600px – tablet
   ========================================================================== */
@media (min-width: 600px) {
  :root { --gutter: 24px; }

  .site-header { padding: 24px 24px 4px; }
  .btn.header-cta { display: inline-flex; }
  .brand-mark { width: 44px; height: 44px; border-radius: 13px; font-size: 18px; }
  .brand-name { font-size: 22px; }
  .pill { padding: 10px 14px; font-size: 14px; }

  .hero { padding: 40px; border-radius: 32px; }
  .hero h1 { font-size: 56px; letter-spacing: -1.6px; }
  .hero-sub { font-size: 19px; }
  .hero-cta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; }
  .hero-cta .btn { width: auto; padding: 0 32px; }
  .hero-note { text-align: left; font-size: 15px; }

  .section { margin-top: 20px; gap: 20px; }
  .section-head { margin: 0; }
  .section-title { font-size: 36px; }
  .section-head--split { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
  .section-head--split .placeholder-note { max-width: 420px; font-size: 14px; }

  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .card { border-radius: 28px; padding: 28px; }
  .step { flex-direction: column; gap: 14px; }
  .step-num { width: 52px; height: 52px; border-radius: 16px; font-size: 24px; }
  .step h3 { font-size: 21px; }
  .step p { font-size: 16px; }
  .testimonial { gap: 28px; }
  .testimonial blockquote { font-size: 19px; }

  .site-footer { padding: 32px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .site-footer .footer-disclaimer { flex: 1 1 100%; order: 3; }
  .site-footer .copyright { flex: 1 1 100%; order: 4; }

  .panel { padding: 36px; border-radius: 32px; }
  .panel-head .display { font-size: 40px; }
  .fields { grid-template-columns: repeat(2, 1fr); gap: 22px 20px; }
  .progress { margin: 0 var(--gutter); }

  .entry-narrow { width: 100%; max-width: 640px; margin: 0 auto; }
}

/* ==========================================================================
   ≥ 1024px – desktop
   ========================================================================== */
@media (min-width: 1024px) {
  :root { --gutter: 40px; }

  .wrap { gap: 28px; padding-bottom: 40px; }
  .site-header { padding: 24px var(--gutter) 4px; }

  .hero {
    flex-direction: row;
    align-items: center;
    gap: 40px;
    padding: 64px;
    border-radius: 36px;
  }
  .hero-copy { flex: 1 1 420px; gap: 22px; }
  .hero h1 { font-size: 72px; line-height: 1; letter-spacing: -2px; }
  .hero-sub { font-size: 20px; }
  .badge { font-size: 13px; padding: 8px 14px; }
  .hero-figure { flex: 1 1 340px; margin: 0; }
  .hero-figure svg { width: 380px; }
  .hero-figure figcaption { font-size: 13px; }

  .section-title { font-size: 40px; letter-spacing: -1px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }

  /* Entry pages: brand aside + form side by side */
  .entry-layout {
    margin: 0 var(--gutter);
    flex-direction: row;
    align-items: stretch;
    gap: 24px;
  }
  .entry-layout .panel,
  .entry-layout .stack { margin: 0; flex: 2 1 0; }
  .entry-aside {
    flex: 1 1 320px;
    max-width: 420px;
    border-radius: 32px;
    background: var(--primary);
    color: #FFFFFF;
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .entry-aside h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 40px;
    line-height: 1.05;
    letter-spacing: -1px;
  }
  .aside-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
  .aside-steps li { display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 600; color: var(--on-primary-muted); }
  .aside-steps li.is-current,
  .aside-steps li.is-done { color: #FFFFFF; }
  .aside-steps .n {
    flex: none;
    width: 36px; height: 36px;
    border-radius: 12px;
    border: 2px solid #7F92C0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
  }
  .aside-steps li.is-current .n,
  .aside-steps li.is-done .n { border: 0; background: var(--accent); color: var(--ink); }
  .aside-steps small { font-size: 13px; font-weight: 500; color: var(--on-primary-muted); }
  .entry-aside p { margin: auto 0 0; font-size: 13px; line-height: 1.55; color: var(--on-primary-muted); }

  .entry-progress { display: none; }
  .entry-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
  .entry-actions .btn--block { width: auto; padding: 0 36px; }
  .entry-actions .form-note,
  .entry-actions .submit-hint { text-align: left; }
}
