/* ============================================================
   Marina Boutique — Grottaferrata
   Design system
   ============================================================ */

:root {
  /* Palette */
  --paper:      #F4EEE6;   /* carta calda */
  --paper-2:    #EBE2D6;   /* sabbia più profonda per sezioni alternate */
  --ink:        #241C1F;   /* nero-aubergine */
  --ink-soft:   #4A3E41;
  --wine:       #78293A;   /* garnet — vino dei Castelli */
  --wine-deep:  #571E2B;
  --blush:      #E3CCC5;   /* rosa cipria */
  --gold:       #A6825A;   /* oro antico — filetti, indici */
  --muted:      #8C7F78;   /* grigio didascalie */
  --line:       #D9CDBF;   /* filetti su carta */

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-y: clamp(4.5rem, 11vw, 9rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.02; }

p { margin: 0 0 1rem; }

::selection { background: var(--wine); color: var(--paper); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 0.75rem 1.25rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

/* ---------- Shared bits ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-weight: 600;
  color: var(--gold);
  margin: 0 0 1.4rem;
}
.eyebrow.light { color: var(--blush); }

.section-title {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.7rem);
  letter-spacing: -0.01em;
}
.section-title em, .hero-title em, .feature-title em, .pull-quote { font-style: italic; }

.section-head { max-width: 720px; margin: 0 0 clamp(2.5rem, 5vw, 4rem); }

/* Image frames */
.img-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blush), var(--paper-2));
  border-radius: 2px;
}
.img-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.ratio-portrait { aspect-ratio: 4 / 5; }
.ratio-tall     { aspect-ratio: 3 / 4; }
.ratio-card     { aspect-ratio: 3 / 4; }
.ratio-feature  { aspect-ratio: 5 / 6; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  padding: 0.95rem 1.6rem; border-radius: 100px;
  transition: all 0.4s var(--ease);
  border: 1px solid transparent;
}
.btn-solid { background: var(--wine); color: var(--paper); }
.btn-solid:hover { background: var(--wine-deep); transform: translateY(-2px); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: var(--blush); transform: translateY(-2px); }
.btn-line-light { border-color: var(--blush); color: var(--paper); }
.btn-line-light:hover { background: var(--blush); color: var(--wine-deep); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease), padding 0.4s var(--ease);
  padding: 1.5rem 0;
}
.site-header.scrolled {
  background: rgba(244, 238, 230, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding: 0.9rem 0;
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 0.9; }
.brand-mark { font-family: var(--display); font-size: 1.5rem; font-style: italic; }
.brand-sub {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.42em; color: var(--gold); margin-left: 2px;
}
.nav { display: flex; gap: 2.2rem; }
.nav a {
  text-decoration: none; font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.06em; position: relative; padding: 0.25rem 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--wine); transition: width 0.4s var(--ease);
}
.nav a:hover::after { width: 100%; }
.header-cta {
  text-decoration: none; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0.55rem 1.1rem; border: 1px solid var(--ink);
  border-radius: 100px; transition: all 0.4s var(--ease);
}
.header-cta:hover { background: var(--ink); color: var(--paper); }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none;
  cursor: pointer; padding: 6px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform 0.35s var(--ease), opacity 0.35s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-nav {
  display: none; flex-direction: column; padding: 0 var(--gutter);
  max-height: 0; overflow: hidden; transition: max-height 0.5s var(--ease);
  background: rgba(244, 238, 230, 0.97); backdrop-filter: blur(14px);
}
.mobile-nav.open { max-height: 420px; }
.mobile-nav a {
  text-decoration: none; padding: 1rem 0; border-bottom: 1px solid var(--line);
  font-size: 1.1rem; font-family: var(--display); font-style: italic;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(9rem, 16vh, 13rem) var(--gutter) clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center; position: relative;
}
.hero-coord {
  position: absolute; left: calc(var(--gutter) - 0.5rem); top: 46%;
  transform: rotate(-90deg) translateX(50%); transform-origin: left center;
  display: flex; gap: 1rem; align-items: center;
  font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; white-space: nowrap;
  pointer-events: none;
}
.hero-coord-deg { color: var(--gold); }
.hero-text { max-width: 34ch; }
.hero-title {
  font-size: clamp(2.9rem, 1.6rem + 6vw, 6rem);
  letter-spacing: -0.02em; margin-bottom: 1.6rem;
}
.hero-lede { color: var(--ink-soft); max-width: 40ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.hero-media { position: relative; }
.hero-caption {
  margin-top: 0.9rem; text-align: right; font-size: 0.72rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}

/* ---------- Marquee ---------- */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 1.1rem 0; overflow: hidden; background: var(--paper-2);
}
.marquee-track {
  display: flex; gap: 2rem; align-items: center; width: max-content;
  animation: scroll-x 32s linear infinite;
}
.marquee-track span {
  font-family: var(--display); font-style: italic;
  font-size: clamp(1.3rem, 1rem + 1.5vw, 2rem); color: var(--ink); white-space: nowrap;
}
.marquee-track .dot { color: var(--wine); font-style: normal; }
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---------- Intro ---------- */
.intro {
  max-width: var(--maxw); margin: 0 auto; padding: var(--section-y) var(--gutter);
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.pull-quote {
  font-family: var(--display); font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.2rem);
  line-height: 1.08; margin: 0 0 1.8rem; color: var(--wine); letter-spacing: -0.01em;
}
.intro-text p { color: var(--ink-soft); max-width: 46ch; }

/* ---------- Collezioni ---------- */
.collezioni {
  max-width: var(--maxw); margin: 0 auto; padding: var(--section-y) var(--gutter);
}
.collection-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2.5vw, 2rem);
}
.card { text-decoration: none; }
.card:hover .img-frame img { transform: scale(1.05); }
.card-body { padding: 1.1rem 0.2rem 0; }
.card-index {
  font-family: var(--display); font-style: italic; font-size: 0.85rem;
  color: var(--gold); display: block; margin-bottom: 0.3rem;
}
.card h3 { font-size: 1.5rem; font-style: italic; margin-bottom: 0.4rem; }
.card p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ---------- Feature (dark wine) ---------- */
.feature {
  background: var(--wine-deep); color: var(--paper);
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  gap: 0;
}
.feature-media .img-frame { border-radius: 0; height: 100%; min-height: 420px; background: var(--wine); }
.feature-media .img-frame img { transition: transform 1.4s var(--ease); }
.feature:hover .img-frame img { transform: scale(1.04); }
.feature-text {
  padding: clamp(3rem, 7vw, 6.5rem) clamp(1.5rem, 5vw, 5rem);
  display: flex; flex-direction: column; justify-content: center;
  max-width: 46ch;
}
.feature-title {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.6rem); margin-bottom: 1.5rem; color: var(--paper);
}
.feature-text p { color: var(--blush); margin-bottom: 2rem; }
.feature-text .btn { align-self: flex-start; }

/* ---------- La Boutique ---------- */
.atelier {
  max-width: var(--maxw); margin: 0 auto; padding: var(--section-y) var(--gutter);
  display: grid; grid-template-columns: 1fr 0.85fr; gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.atelier-text p { color: var(--ink-soft); max-width: 48ch; }
.atelier .section-title { margin-bottom: 1.5rem; }
.info-list { margin: 2.5rem 0 0; display: grid; gap: 1.4rem; }
.info-list div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.info-list dt {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em;
  font-weight: 700; color: var(--gold); padding-top: 0.2rem;
}
.info-list dd { margin: 0; font-size: 0.95rem; color: var(--ink); }
.info-list a { color: var(--wine); text-underline-offset: 3px; }

/* ---------- Servizi ---------- */
.servizi {
  background: var(--paper-2);
}
.servizi {
  padding: var(--section-y) 0;
}
.servizi .section-head,
.service-grid { max-width: var(--maxw); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.service { padding-top: 1.6rem; border-top: 1px solid var(--gold); }
.service h3 { font-size: 1.35rem; font-style: italic; margin-bottom: 0.6rem; }
.service p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }

/* ---------- Contatti ---------- */
.contatti {
  background: var(--ink); color: var(--paper);
  padding: clamp(5rem, 12vw, 9rem) var(--gutter);
  text-align: center;
}
.contatti-inner { max-width: 760px; margin: 0 auto; }
.contatti-title {
  font-size: clamp(2.2rem, 1.5rem + 3.5vw, 4rem); margin-bottom: 1.5rem; color: var(--paper);
}
.contatti-lede { color: var(--blush); max-width: 48ch; margin: 0 auto 2.5rem; }
.contatti-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 0 var(--gutter) 2.5rem; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 6vw, 4.5rem) 0;
  display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap;
  border-top: 1px solid rgba(227, 204, 197, 0.2);
}
.footer-brand .brand-mark { font-size: 1.9rem; font-style: italic; display: block; }
.footer-brand .brand-sub { color: var(--gold); }
.footer-tag { margin-top: 1rem; color: var(--blush); font-size: 0.9rem; }
.footer-nav { display: flex; flex-direction: column; gap: 0.9rem; }
.footer-nav a { text-decoration: none; font-size: 0.9rem; color: var(--blush); transition: color 0.3s; }
.footer-nav a:hover { color: var(--paper); }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.footer-coord { color: var(--gold); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav, .header-cta { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav { display: flex; }
  .hero { grid-template-columns: 1fr; padding-top: 8rem; }
  .hero-coord { display: none; }
  .hero-media { order: -1; max-width: 420px; }
  .intro, .atelier { grid-template-columns: 1fr; }
  .atelier-media { order: -1; max-width: 460px; }
  .feature { grid-template-columns: 1fr; }
  .feature-media .img-frame { min-height: 340px; }
  .collection-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .collection-grid { grid-template-columns: 1fr; gap: 2rem; }
  .service-grid { grid-template-columns: 1fr; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; justify-content: center; }
  .info-list div { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
