/* ============================================
   LA TORRETTA — PWA
   Palette: blu lago, pietra, ottone, crema
   Tipografia: Fraunces (display) + Outfit (body)
   ============================================ */

:root {
  --lake-50:  #eef4f8;
  --lake-100: #d6e4ed;
  --lake-200: #a9c4d5;
  --lake-300: #6f9bb5;
  --lake-400: #3d7395;
  --lake-500: #1e4a6b;
  --lake-600: #14354f;
  --lake-700: #0c2438;
  --brass:    #b48a3c;
  --brass-dk: #8a6825;
  --stone:    #5b6b75;
  --ink:      #16232e;
  --ink-soft: #2e4050;
  --cream:    #f7f9fb;

  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:  'Outfit', system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Subtle atmospheric overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(61, 115, 149, 0.05) 0, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(180, 138, 60, 0.03) 0, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* ====== HEADER ====== */
.hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top));
  background: rgba(247, 249, 251, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.4s var(--ease), box-shadow 0.3s var(--ease);
}
.hdr--scrolled { box-shadow: 0 1px 0 rgba(22, 35, 46, 0.08); }
.hdr--hidden { transform: translateY(-100%); }

.hdr__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
}
.hdr__mark { display: flex; align-items: center; gap: 10px; }
.hdr__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brass);
}
.hdr__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hdr__menu {
  width: 40px; height: 40px;
  background: transparent; border: none;
  display: flex; flex-direction: column;
  justify-content: center; gap: 5px;
  cursor: pointer;
  padding: 10px;
}
.hdr__menu span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.3s var(--ease);
}
.hdr__menu span:nth-child(1) { width: 20px; }
.hdr__menu span:nth-child(2) { width: 14px; margin-left: auto; }
.hdr__menu span:nth-child(3) { width: 20px; }

/* ====== NAV FLYOUT ====== */
.nav {
  position: fixed;
  top: 0; right: 0;
  width: min(85vw, 380px);
  height: 100vh;
  background: var(--lake-100);
  z-index: 200;
  padding: 80px 40px 40px;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
  display: flex;
  flex-direction: column;
}
.nav.is-open { transform: translateX(0); }
.nav__close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  background: transparent;
  border: none;
  font-size: 32px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
}
.nav ul { list-style: none; }
.nav li { margin-bottom: 6px; }
.nav a {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 0;
  letter-spacing: -0.02em;
  transition: color 0.2s, transform 0.3s var(--ease);
}
.nav a:hover { color: var(--lake-500); transform: translateX(4px); }
.nav__foot {
  margin-top: auto;
  font-size: 13px;
  color: var(--stone);
  font-style: italic;
}

/* overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 35, 46, 0.3);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  backdrop-filter: blur(2px);
}
.nav-overlay.is-active { opacity: 1; pointer-events: auto; }

/* ====== HERO ====== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--lake-200) 0%, var(--lake-100) 50%, var(--cream) 100%);
  overflow: hidden;
  padding: 40px 24px;
}
.hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  top: -200px; right: -200px;
  background: radial-gradient(circle, rgba(61, 115, 149, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
}
.hero::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  bottom: -150px; left: -150px;
  background: radial-gradient(circle, rgba(180, 138, 60, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
}
.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero__wrap {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 640px;
  animation: fadeUp 1.2s var(--ease) both;
}
.hero__kicker {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lake-500);
  margin-bottom: 30px;
  font-weight: 500;
  animation: fadeUp 0.8s var(--ease) both;
}
.hero__title {
  font-family: var(--serif);
  font-size: clamp(60px, 18vw, 130px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 28px;
  font-variation-settings: "opsz" 144;
}
.hero__title span {
  display: block;
  animation: fadeUp 1s var(--ease) both;
}
.hero__title span:nth-child(2) { animation-delay: 0.15s; }
.hero__title--italic {
  font-style: italic;
  font-weight: 300;
  color: var(--lake-500);
}
.hero__sub {
  font-family: var(--serif);
  font-size: clamp(16px, 4vw, 20px);
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.5;
  animation: fadeUp 1s var(--ease) 0.5s both;
}
.hero__scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  animation: fadeUp 1s var(--ease) 0.8s both;
}
.hero__arrow {
  width: 1px;
  height: 30px;
  background: var(--stone);
  animation: arrowPulse 2s var(--ease) infinite;
  transform-origin: top;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes arrowPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(0.4) translateY(16px); opacity: 1; }
}

/* ====== SECTIONS ====== */
.sec {
  padding: 90px 24px;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.sec__mark {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--lake-500);
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  opacity: 0.7;
}
.sec__kicker {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 16px;
  font-weight: 500;
}
.sec__title {
  font-family: var(--serif);
  font-size: clamp(40px, 10vw, 68px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 40px;
  font-variation-settings: "opsz" 144;
}
.sec__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--lake-500);
}
.sec__lead {
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 48px;
  max-width: 560px;
}

/* ====== CARDS (intro) ====== */
.cards {
  display: grid;
  gap: 14px;
}
.card {
  background: var(--lake-50);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:active { transform: scale(0.98); }
.card__icon {
  font-size: 24px;
  color: var(--lake-500);
  margin-bottom: 14px;
  display: inline-block;
  width: 44px; height: 44px;
  line-height: 44px;
  text-align: center;
  background: var(--lake-200);
  border-radius: 50%;
}
.card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.card__meta {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 10px;
  margin-bottom: 2px;
  font-weight: 500;
}
.card__val {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.card p:not(.card__meta):not(.card__val) {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.card em { font-style: italic; color: var(--lake-500); }
.card__btn {
  margin-top: 14px;
  background: var(--lake-600);
  color: var(--cream);
  border: none;
  padding: 10px 18px;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s;
}
.card__btn:hover, .card__btn:active { background: var(--brass); }
.card--wifi {
  background: linear-gradient(135deg, var(--lake-100) 0%, var(--lake-200) 100%);
}

/* ====== TERRITORY: TABS ====== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  background: var(--lake-100);
  padding: 4px;
  border-radius: 100px;
  position: sticky;
  top: 70px;
  z-index: 50;
  backdrop-filter: blur(10px);
}
.tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.tab.is-active {
  background: var(--lake-600);
  color: var(--cream);
}

.feed__panel {
  display: none;
  animation: fadeIn 0.5s var(--ease);
}
.feed__panel.is-active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.spot {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid rgba(91, 107, 117, 0.18);
}
.spot:last-child { border-bottom: 1px solid rgba(91, 107, 117, 0.18); }
.spot__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--brass);
  font-weight: 300;
  min-width: 32px;
  padding-top: 4px;
}
.spot__body { flex: 1; }
.spot h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.spot__tag {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lake-500);
  font-weight: 500;
  margin-bottom: 10px;
}
.spot p:last-child {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ====== GASTRONOMIA ====== */
.sec--food {
  background: var(--lake-50);
  max-width: none;
  padding-left: 24px;
  padding-right: 24px;
}
.sec--food .sec__mark,
.sec--food .sec__kicker,
.sec--food .sec__title,
.sec--food .foods,
.sec--food .food__note {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.foods {
  display: grid;
  gap: 16px;
}
.food {
  background: var(--cream);
  padding: 28px 26px;
  border-radius: var(--radius);
  position: relative;
  transition: transform 0.3s var(--ease);
}
.food:active { transform: scale(0.99); }
.food__rank {
  position: absolute;
  top: 20px; right: 20px;
  color: var(--brass);
  font-size: 20px;
}
.food h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}
.food__type {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lake-500);
  font-weight: 500;
  margin-bottom: 12px;
}
.food p:not(.food__type):not(.food__dist) {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 14px;
}
.food__dist {
  display: inline-block;
  font-size: 12px;
  color: var(--stone);
  padding: 4px 12px;
  background: var(--lake-100);
  border-radius: 100px;
  font-weight: 500;
}
.food__note {
  margin-top: 30px;
  font-size: 12px;
  font-style: italic;
  color: var(--stone);
  text-align: center;
}

/* ====== FAQ ====== */
.faq { display: grid; gap: 2px; }
.faq__item {
  background: var(--lake-50);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: background 0.3s;
}
.faq__item[open] {
  background: var(--lake-100);
}
.faq__item summary {
  padding: 20px 22px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 50px;
  letter-spacing: -0.01em;
  user-select: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  position: absolute;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: var(--lake-500);
  font-weight: 300;
  transition: transform 0.3s var(--ease);
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p {
  padding: 0 22px 22px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.faq__item a { color: var(--lake-500); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ====== CONTATTI ====== */
.contacts { display: grid; gap: 2px; }
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 4px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(91, 107, 117, 0.18);
  transition: padding 0.3s var(--ease);
}
.contact:first-child { border-top: 1px solid rgba(91, 107, 117, 0.18); }
.contact:active { padding-left: 16px; background: var(--lake-50); }
.contact__lab {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 500;
  min-width: 100px;
}
.contact__val {
  flex: 1;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  text-align: right;
  margin-right: 14px;
  letter-spacing: -0.01em;
}
.contact__arr {
  color: var(--lake-500);
  font-size: 18px;
  transition: transform 0.3s var(--ease);
}
.contact:hover .contact__arr { transform: translateX(4px); }

/* ====== FOOTER ====== */
.ftr {
  background: var(--lake-700);
  color: var(--cream);
  padding: 60px 24px 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  text-align: center;
  margin-top: 40px;
}
.ftr__wrap { max-width: 720px; margin: 0 auto; }
.ftr__sign {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.ftr__sub {
  font-size: 13px;
  color: var(--lake-200);
  margin-bottom: 30px;
  letter-spacing: 0.05em;
}
.ftr__meta {
  font-size: 11px;
  color: var(--lake-300);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ftr__install {
  display: inline-block;
  margin-top: 24px;
  background: var(--cream);
  color: var(--ink);
  border: none;
  padding: 14px 26px;
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s;
}
.ftr__install:active { transform: scale(0.97); }

/* ====== TOAST ====== */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--lake-700);
  color: var(--cream);
  padding: 14px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s var(--ease);
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ====== REVEAL ON SCROLL ====== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== TABLET/DESKTOP ADAPT ====== */
@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .foods { grid-template-columns: 1fr 1fr; }
  .sec { padding: 120px 40px; }
}
