/* Deep Dish Milano landing mock-up. Mobile-first: most visitors arrive from the Instagram in-app browser. */

:root {
  --cream: #fff6e5;
  --paper: #ffffff;
  --ink: #1b1410;
  --muted: #6b5d52;
  --tomato: #d62b1f;
  --tomato-dark: #b01f15;
  --cheese: #f6c445;
  --cheese-pale: #fbe6a6;
  --crust: #b8712f;
  --topping: #7a3b2e;
  --line: #e7d9c0;
  --radius: 16px;
  --gutter: 20px;
  --night: #1b130c;
  /* How far the background photo is pushed down, so the slice sits below the headline */
  --bg-shift: 170px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Fixed video behind the page; a fixed element because background-attachment: fixed is unreliable on iOS */
.bg {
  position: fixed;
  inset: 0;
  height: 100lvh;
  z-index: -1;
  overflow: hidden;
  background: var(--night);
}

.bg__video {
  position: absolute;
  left: 0;
  top: var(--bg-shift);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Hides the seam at the top of the shifted photo and darkens the area behind the headline */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    var(--night) 0,
    var(--night) var(--bg-shift),
    rgba(27, 19, 12, 0.7) calc(var(--bg-shift) + 50px),
    rgba(27, 19, 12, 0.3) 42%,
    rgba(27, 19, 12, 0) 58%
  );
}

/* Language switching (bilingual variant only) */
html[data-lang="en"] [lang="it"],
html[data-lang="it"] [lang="en"] {
  display: none;
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-left)) 0 max(var(--gutter), env(safe-area-inset-right));
}

/* Top strip */
.strip {
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: calc(8px + env(safe-area-inset-top)) 0 8px;
  background: var(--ink);
  color: var(--cheese);
}

.strip--caution {
  color: var(--ink);
  background: repeating-linear-gradient(-45deg, var(--cheese) 0 14px, var(--ink) 14px 28px);
}

.strip__track b {
  font-weight: inherit;
}

.strip__track {
  display: inline-block;
  animation: strip-scroll 22s linear infinite;
}

.strip--caution .strip__track > span {
  background: var(--cheese);
  padding: 2px 10px;
  margin-right: 28px;
}

.strip:not(.strip--caution) .strip__track > span {
  margin-right: 28px;
}

@keyframes strip-scroll {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .strip__track {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Header */
.topbar {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 16px;
  padding-bottom: 4px;
}

.brand-logo {
  display: block;
  height: 84px;
  width: auto;
}


.lang-toggle {
  position: absolute;
  top: 14px;
  right: max(var(--gutter), env(safe-area-inset-right));
  display: inline-flex;
  border: 2px solid var(--cream);
  border-radius: 999px;
  overflow: hidden;
}

.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-width: 36px;
  min-height: 32px;
  padding: 0 8px;
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--cream);
  color: var(--ink);
}

/* Hero */
/* Fills the first screen below the strip and logo, so the form sits at its bottom edge */
.hero {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 136px);
  padding-bottom: 16px;
}

.hero h1 {
  margin: 6px 0 0;
  font-size: clamp(30px, 8.6vw, 44px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-align: center;
  text-wrap: balance;
  color: var(--cream);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.hero h1 em {
  display: block;
  font-style: normal;
  color: var(--cheese);
}

.kicker {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--cream);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* Flexible empty area that lets the background photo show through between headline and form */
.hero__window {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 120px;
  padding-bottom: 6px;
  font-size: 11px;
  color: rgba(255, 246, 229, 0.7);
}

/* Cream panel that scrolls up over the photo */
.sheet {
  background: var(--cream);
  border-radius: 24px 24px 0 0;
  padding-top: 22px;
  /* Leaves room for the sticky call-to-action bar */
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.lead {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--ink);
}

.lead strong {
  font-weight: 800;
}

/* Signup card */
.card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 5px 5px 0 var(--ink);
}

.card h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* 16px minimum prevents iOS from zooming the page when the field is focused */
.input {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 12px;
  appearance: none;
}

.input:focus-visible,
.btn:focus-visible,
.lang-toggle button:focus-visible,
.chip input:focus-visible + span,
.consent input:focus-visible {
  outline: 3px solid var(--cheese);
  outline-offset: 2px;
}

.btn {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 10px;
  padding: 0 16px;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  background: var(--tomato);
  border: 2px solid var(--ink);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  line-height: 1.15;
  appearance: none;
}

/* Links styled as buttons need explicit centering; long labels may wrap on narrow phones */
a.btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn:active {
  background: var(--tomato-dark);
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.6;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  min-height: 44px;
  margin-top: 4px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.consent input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--tomato);
}

.consent a {
  color: inherit;
}

.note {
  margin: 8px 0 0;
  font-size: 14px;
  text-align: center;
}

.note:empty {
  display: none;
}

.error {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--tomato-dark);
}

.error:empty {
  display: none;
}

.chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  position: relative;
  display: block;
}

.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
}

.chip > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 6px;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--cream);
}

.chip input:checked + span {
  background: var(--cheese);
}

.done-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--cheese);
  border: 2px solid var(--ink);
  font-size: 22px;
  font-weight: 900;
}

[hidden] {
  display: none !important;
}

/* Sections */
.section {
  padding-top: 44px;
}

.section h2 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.section > .wrap > p {
  margin: 0 0 18px;
  color: var(--muted);
}

/* Cross-section of the pizza: pan walls are the crust, layers are stacked top to bottom */
.slice {
  border: 14px solid var(--crust);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  background: var(--crust);
  overflow: hidden;
}

.slice__layer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slice__layer b {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
}

.slice__layer--tomato {
  height: 46px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 40%, var(--tomato-dark) 0 7px, transparent 8px),
    radial-gradient(circle at 58% 65%, var(--tomato-dark) 0 9px, transparent 10px),
    radial-gradient(circle at 88% 35%, var(--tomato-dark) 0 6px, transparent 7px),
    var(--tomato);
}

.slice__layer--topping {
  height: 34px;
  color: #fff;
  background: var(--topping);
}

.slice__layer--cheese {
  height: 58px;
  color: var(--ink);
  background: linear-gradient(var(--cheese-pale), var(--cheese));
}

.slice__layer--crust {
  height: 30px;
  color: #fff;
  background: var(--crust);
}

.layers {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  counter-reset: layer;
}

.layers li {
  position: relative;
  padding: 12px 0 12px 38px;
  border-top: 1px solid var(--line);
  counter-increment: layer;
}

.layers li::before {
  content: counter(layer);
  position: absolute;
  left: 0;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-size: 14px;
  font-weight: 800;
}

.layers strong {
  display: block;
  font-weight: 800;
}

.layers li > span {
  color: var(--muted);
  font-size: 15px;
}

footer {
  margin-top: 28px;
  padding-bottom: 12px;
  font-size: 13px;
  color: var(--muted);
}

footer a {
  color: inherit;
}

footer details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

footer summary {
  font-weight: 700;
  min-height: 32px;
  cursor: pointer;
}

footer details p {
  margin: 8px 0 0;
}

/* Sticky call-to-action, shown while the form button is off screen */
.sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 10px max(var(--gutter), env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-right));
  background: rgba(255, 246, 229, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 2px solid var(--ink);
  transform: translateY(110%);
  transition: transform 0.2s ease;
}

.sticky.is-visible {
  transform: none;
}

.sticky .btn {
  max-width: 480px;
  margin: 0 auto;
}

@media (max-width: 350px) {
  body {
    font-size: 16px;
  }
  .brand-logo {
    height: 72px;
  }
  .btn {
    font-size: 16px;
  }
}

@media (min-width: 700px) {
  .wrap {
    max-width: 560px;
  }
  .hero h1 {
    font-size: 48px;
  }
  .bg__video {
    object-position: center 30%;
  }
}
