/* foodlove.shop: una pagina sola che porta a scaricare l'app. Colori e font dell'app (src/theme). */
:root {
  --ink: #14100C;
  --surface: #1F1912;
  --raised: #2B2118;
  --line: #3A2E1F;
  --gold: #D9A94E;
  --gold-soft: rgba(217, 169, 78, 0.38);
  --cream: #F3EAD9;
  --cream-dim: #CDBFA6;
  --quiet: #A8967A;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 1rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
figure { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
}
.hero-photo {
  --photo-h: max(260px, min(150vw, 100svh - 300px));
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--photo-h);
  overflow: hidden;
}
/* La foto resta intera in larghezza; se lo schermo è basso sale un po', e il mirino la segue. */
.frame {
  position: relative;
  margin-top: calc((var(--photo-h) - 150vw) * 0.45);
}
.frame img {
  width: 100%;
  height: auto;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(20, 16, 12, 0.6) 0%,
    rgba(20, 16, 12, 0) 20%,
    rgba(20, 16, 12, 0) 58%,
    rgba(20, 16, 12, 0.8) 80%,
    var(--ink) 100%);
}

/* Il mirino: quattro angoli dorati sopra la scatola, come quando si inquadra la tavola. */
.finder {
  position: absolute;
  z-index: 1;
  left: 4%;
  right: 4%;
  top: 27%;
  height: 44%;
  filter: drop-shadow(0 0 3px rgba(20, 16, 12, 0.7));
  animation: focus 1s cubic-bezier(0.2, 0.75, 0.25, 1) 0.25s both;
}
.finder i {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 0 solid var(--gold);
}
.finder i:nth-child(1) { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; }
.finder i:nth-child(2) { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; }
.finder i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; }
.finder i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; }
@keyframes focus {
  0% { opacity: 0; transform: scale(1.14); }
  60% { opacity: 1; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1); }
}

.hero-text {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: max(20px, env(safe-area-inset-top)) var(--gutter) max(28px, env(safe-area-inset-bottom));
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 auto;
  font: 600 1.25rem/1 var(--serif);
  letter-spacing: 0.01em;
}
.brand img { width: 40px; height: 40px; }

h1 {
  margin: 0;
  font: 600 clamp(3.1rem, 14vw, 4.4rem)/0.92 var(--serif);
  letter-spacing: -0.015em;
  max-width: 9ch;
  font-variant-numeric: lining-nums;
  text-wrap: balance;
}
.lead {
  margin: 16px 0 26px;
  max-width: 34ch;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--cream-dim);
  text-wrap: pretty;
}

/* ---------- Pulsanti degli store (nero, scritta bianca, bordo grigio come i badge ufficiali) ---------- */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 420px;
}
.store {
  flex: 1 1 0;
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  background: #000;
  color: #fff;
  border: 1px solid #A6A6A6;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease;
}
.store:active { transform: scale(0.98); }
.store svg { width: 24px; height: 24px; flex: none; }
.store-google svg { width: 22px; height: 24px; }
.store span {
  display: flex;
  flex-direction: column;
  font: 600 1.18rem/1.05 -apple-system, BlinkMacSystemFont, var(--sans);
  letter-spacing: -0.01em;
}
.store small { font-size: 0.66rem; font-weight: 500; letter-spacing: 0.01em; margin-bottom: 2px; }

/* Sul telefono giusto il suo store va per primo e a tutta larghezza; l'altro resta sotto. */
[data-platform="android"] .store-google { order: -1; }
[data-platform="ios"] .store-apple,
[data-platform="android"] .store-google {
  flex-basis: 100%;
  min-height: 64px;
}
[data-platform="ios"] .store-apple svg,
[data-platform="android"] .store-google svg { width: 28px; height: 28px; }
[data-platform="ios"] .store-apple span,
[data-platform="android"] .store-google span { font-size: 1.4rem; }
[data-platform="ios"] .store-google,
[data-platform="android"] .store-apple {
  flex: 0 1 auto;
  min-height: 46px;
  margin: 0 auto;
  padding: 6px 16px;
}
[data-platform="ios"] .store-google span,
[data-platform="android"] .store-apple span { font-size: 1rem; }

/* Ripetuti nel primo passo, più piccoli e sempre affiancati. */
.stores-small { margin-top: 14px; max-width: 340px; }
[data-platform] .stores-small .store {
  flex: 1 1 0;
  min-height: 46px;
  margin: 0;
  padding: 6px 10px;
  gap: 8px;
}
[data-platform] .stores-small .store span { font-size: 0.98rem; }
[data-platform] .stores-small .store svg { width: 20px; height: 20px; }
[data-platform] .stores-small .store small { font-size: 0.58rem; }

/* ---------- Come si ottiene il codice ---------- */
.how {
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px var(--gutter) 56px;
}
h2 {
  margin: 0 0 32px;
  font: 600 clamp(2.1rem, 9vw, 2.75rem)/1.02 var(--serif);
  letter-spacing: -0.01em;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding-bottom: 30px;
  counter-increment: step;
}
.steps li:last-child { padding-bottom: 0; }
/* Il filo dorato fra un passo e l'altro: è una sequenza. */
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 21.5px;
  top: 52px;
  bottom: 6px;
  width: 1px;
  background: var(--gold-soft);
}
.steps svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.steps h3 {
  margin: 6px 0 4px;
  font: 600 1.06rem/1.35 var(--sans);
}
.steps h3::before {
  content: counter(step) ".";
  margin-right: 8px;
  font: italic 500 1.3rem/1 var(--serif);
  color: var(--gold);
}
.steps p { margin: 0; color: var(--cream-dim); max-width: 42ch; text-wrap: pretty; }

.phone {
  width: min(62vw, 250px);
  margin: 48px auto 0;
}
.phone img {
  width: 100%;
  height: auto;
  border: 7px solid var(--raised);
  border-radius: 38px;
  box-shadow: 0 0 0 1px var(--line), 0 28px 60px rgba(0, 0, 0, 0.55);
}

/* ---------- Fiducia e nota ---------- */
.trust {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--line);
}
.trust p {
  margin: 0;
  max-width: 30ch;
  font: italic 500 clamp(1.45rem, 6vw, 1.85rem)/1.25 var(--serif);
  color: var(--cream);
  text-wrap: pretty;
}
.trust .ftc {
  margin-top: 18px;
  max-width: 52ch;
  font: 400 0.8125rem/1.5 var(--sans);
  color: var(--quiet);
}

/* ---------- Piè di pagina ---------- */
.foot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px var(--gutter) max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  font-size: 0.875rem;
  color: var(--quiet);
}
.foot .brand { margin: 0; font-size: 1.05rem; color: var(--cream-dim); }
.foot .brand img { width: 28px; height: 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { text-decoration-color: var(--gold-soft); text-underline-offset: 3px; }
.foot a:hover { color: var(--cream); }

/* ---------- Schermi larghi: testo a sinistra sul nero, foto a destra ---------- */
@media (min-width: 900px) {
  :root { --gutter: 48px; }
  .hero {
    min-height: min(100vh, 980px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
  .hero-photo { position: relative; inset: auto; height: auto; grid-column: 2; grid-row: 1; }
  .frame { position: absolute; inset: 0; margin: 0; }
  .frame img { height: 100%; object-fit: cover; object-position: 50% 30%; }
  .hero-photo::after {
    inset: 0 0 0 -2px;
    background:
      linear-gradient(90deg, var(--ink) 0%, rgba(20, 16, 12, 0) 16%),
      linear-gradient(0deg, var(--ink) 0%, rgba(20, 16, 12, 0) 14%);
  }
  .finder { left: 14%; right: 9%; top: 17%; height: 44%; }
  .finder i { width: 46px; height: 46px; }
  .hero-text {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
    padding: 40px 48px 64px max(48px, calc((100vw - 1344px) / 2));
  }
  .hero-text > .brand { position: absolute; top: 40px; left: max(48px, calc((100vw - 1344px) / 2)); }
  h1 { font-size: clamp(4.5rem, 7vw, 6.6rem); }
  .lead { font-size: 1.2rem; margin: 22px 0 34px; }
  .stores { max-width: 440px; }
  [data-platform] .store { flex: 1 1 0; min-height: 60px; margin: 0; padding: 8px 14px; }
  [data-platform] .store span { font-size: 1.25rem; }
  [data-platform] .store svg { width: 26px; height: 26px; }

  /* Stesso filo sinistro del titolo; il telefono sta sotto la colonna della foto. */
  .how, .trust, .foot {
    max-width: none;
    padding-left: max(48px, calc((100vw - 1344px) / 2));
    padding-right: max(48px, calc((100vw - 1344px) / 2));
  }
  .how {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 48px;
    align-items: center;
    padding-top: 104px;
    padding-bottom: 96px;
  }
  .phone { width: 280px; margin: 0; justify-self: center; }
  .trust p { max-width: 36ch; }
}

@media (prefers-reduced-motion: reduce) {
  .finder { animation: none; }
  .store { transition: none; }
}
