/* =========================
   Irene & Alessio — Orizzonte (Studio)
   ========================= */

:root{
  --ink: #24313a;
  --ink-2: rgba(36,49,58,.72);
  --bg: #ffffff;
  --tint: #f6f1ea;
  --card: rgba(255,255,255,.78);
  --border: rgba(36,49,58,.10);
  --shadow: 0 14px 40px rgba(0,0,0,.08);

  --serif: "Cormorant Garamond", serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --max: 1080px;
  --pad: clamp(18px, 3vw, 34px);
  --radius: 22px;

  --compassOpacity: .18;   /* desktop */
  --heroOverlayTop: rgba(255,255,255,.22);
  --heroOverlayBottom: rgba(255,255,255,.88);
}

[data-theme="dark"]{
  --ink: rgba(255,255,255,.92);
  --ink-2: rgba(255,255,255,.70);
  --bg: #07111a;
  --tint: rgba(255,255,255,.06);
  --card: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.12);
  --shadow: 0 18px 52px rgba(0,0,0,.35);

  --heroOverlayTop: rgba(7,17,26,.35);
  --heroOverlayBottom: rgba(7,17,26,.90);
  --compassOpacity: .14;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  overflow-x:hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a{ color: inherit; text-decoration:none; }
strong{ font-weight: 600; }
.container{
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.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;
}
.muted{ color: var(--ink-2); }
.mt{ margin-top: 28px; }

/* Topbar */
.topbar{
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display:flex;
  justify-content:center;
  pointer-events:none;
}
.topbar::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, rgba(255,255,255,.80), rgba(255,255,255,0));
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .topbar::before{
  background: linear-gradient(to bottom, rgba(7,17,26,.72), rgba(7,17,26,0));
}
.topbar__brand,
.topbar__menu{ pointer-events:auto; position: relative; z-index: 2; }
.topbar__brand{
  margin-right:auto;
  font-family: var(--serif);
  letter-spacing:.04em;
  font-weight: 500;
  padding: 14px var(--pad);
  opacity:.92;
}
.topbar__menu{
  margin-left:auto;
  padding: 12px var(--pad);
  background: transparent;
  border:0;
  cursor:pointer;
  font-size: 20px;
  opacity:.85;
}
.topbar__menu:active{ transform: translateY(1px); }

/* Drawer */
.backdrop{
  position: fixed;
  inset:0;
  background: rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transition: opacity .22s ease;
  z-index: 70;
}
.backdrop.open{ opacity:1; pointer-events:auto; }
.drawer{
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 92vw);
  background: rgba(255,255,255,.94);
  border-left: 1px solid rgba(0,0,0,.08);
  transform: translateX(110%);
  transition: transform .28s ease;
  z-index: 80;
  box-shadow: var(--shadow);
  padding: 18px 18px 24px 18px;
}
[data-theme="dark"] .drawer{
  background: rgba(7,17,26,.92);
  border-left: 1px solid rgba(255,255,255,.10);
}
.drawer.open{ transform: translateX(0); }
.drawer__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 6px 14px 6px;
}
.drawer__title{
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing:.02em;
  font-size: 20px;
}
.drawer__close{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.55);
  padding: 10px 12px;
  border-radius: 999px;
  cursor:pointer;
  color: inherit;
}
[data-theme="dark"] .drawer__close{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}
.drawer__nav{
  display:grid;
  gap: 10px;
  padding: 6px;
}
.drawer__nav a{
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.65);
  font-weight: 500;
}
[data-theme="dark"] .drawer__nav a{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.drawer__nav a:hover{ background: rgba(246,241,234,.95); }
[data-theme="dark"] .drawer__nav a:hover{ background: rgba(255,255,255,.09); }

/* Hero */
.hero{
  position: relative;
  height: 100vh;
  min-height: 680px;
  display:flex;
  align-items: center;
  justify-content:center;
  text-align:center;
  isolation: isolate;
}
.hero__media{
  position:absolute;
  inset:0;
  background: url("../assets/hero.jpg") center/cover no-repeat;
  transform: scale(1.02);
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, var(--heroOverlayTop), var(--heroOverlayBottom));
}
/* subtle grain (studio feel) */
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(rgba(0,0,0,.03) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: .14;
  mix-blend-mode: overlay;
  pointer-events:none;
}
[data-theme="dark"] .hero::before{
  opacity: .20;
  background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
}

.hero__compass{
  position:absolute;
  top: 13.5%;
  left: 50%;
  transform: translateX(-50%);
  width: min(260px, 54vw);
  opacity: var(--compassOpacity);
  filter: grayscale(100%);
  z-index: 2;
  pointer-events:none;
  animation: slowspin 180s linear infinite;
}
@keyframes slowspin{
  from{ transform: translateX(-50%) rotate(0deg); }
  to{ transform: translateX(-50%) rotate(360deg); }
}

/* mobile: slightly reduced */
@media (max-width: 520px){
  :root{ --compassOpacity: .14; }
  [data-theme="dark"]{ --compassOpacity: .12; }
  .hero__compass{ width: min(220px, 64vw); top: 14%; }
}

.hero__content{
  position: relative;
  z-index: 3;
  padding: 0 var(--pad);
  transform: translateY(10vh);
  max-width: 720px;
}
.hero__title{
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: .01em;
  font-size: clamp(44px, 6.8vw, 78px);
  margin: 0;
  text-shadow: 0 12px 32px rgba(0,0,0,.06);
}
[data-theme="dark"] .hero__title{
  text-shadow: 0 18px 44px rgba(0,0,0,.35);
}
.hero__subtitle{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(16px, 2.2vw, 22px);
  margin: 14px 0 0 0;
  color: var(--ink-2);
}
.hero__meta{
  margin-top: 18px;
  display:inline-block;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .hero__meta{
  background: rgba(255,255,255,.06);
}

/* scroll hint */
.hero__scroll{
  position:absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  display:flex;
  align-items:center;
  justify-content:center;
}
[data-theme="dark"] .hero__scroll{
  background: rgba(255,255,255,.06);
}
.hero__scrollDot{
  width: 7px; height: 7px;
  border-radius: 999px;
  background: rgba(36,49,58,.55);
  box-shadow: 0 0 0 8px rgba(36,49,58,.08);
  animation: pulse 2.6s ease-in-out infinite;
}
[data-theme="dark"] .hero__scrollDot{
  background: rgba(255,255,255,.62);
  box-shadow: 0 0 0 8px rgba(255,255,255,.10);
}
@keyframes pulse{
  0%,100%{ transform: scale(1); opacity:.8; }
  50%{ transform: scale(1.08); opacity:1; }
}

/* Sections */
.section{ padding: clamp(64px, 8vw, 110px) 0; }
.section--light{ background: var(--bg); }
.section--tint{ background: var(--tint); }

.kicker{
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(36,49,58,.55);
  margin-bottom: 12px;
}
[data-theme="dark"] .kicker{ color: rgba(255,255,255,.55); }

.h2{
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 52px);
  margin: 0 0 12px 0;
}
.lead{
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-2);
  margin: 0;
}

/* Grid + Cards */
.grid{
  margin-top: 34px;
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(16px, 3vw, 28px);
}
@media (max-width: 920px){
  .grid{ grid-template-columns: 1fr; }
  .hero__content{ transform: translateY(7vh); }
}

.card{
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card--soft{ background: rgba(255,255,255,.62); }
[data-theme="dark"] .card--soft{ background: rgba(255,255,255,.07); }

.card__kicker{
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(36,49,58,.55);
  margin-bottom: 10px;
}
[data-theme="dark"] .card__kicker{ color: rgba(255,255,255,.55); }

.card__quote{
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.4;
  margin: 0;
}
.card__text{
  margin: 0;
  line-height: 1.85;
  color: var(--ink-2);
}

.divider{
  height: 1px;
  background: rgba(36,49,58,.10);
  margin: 18px 0;
}
[data-theme="dark"] .divider{ background: rgba(255,255,255,.12); }

.meta{ margin: 0; }
.meta__row{
  display:flex;
  justify-content:space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(36,49,58,.10);
}
[data-theme="dark"] .meta__row{ border-bottom: 1px solid rgba(255,255,255,.12); }
.meta__row:last-child{ border-bottom: 0; }
.meta dt{
  font-size: 12px;
  letter-spacing:.14em;
  text-transform: uppercase;
  color: rgba(36,49,58,.55);
}
[data-theme="dark"] .meta dt{ color: rgba(255,255,255,.55); }
.meta dd{
  margin: 0;
  font-weight: 500;
  color: rgba(36,49,58,.88);
  text-align:right;
}
[data-theme="dark"] .meta dd{ color: rgba(255,255,255,.86); }

/* Map */
.map{
  width:100%;
  aspect-ratio: 16/10;
  border:0;
  border-radius: 16px;
  overflow:hidden;
  background: rgba(0,0,0,.06);
}

/* Timeline */
.timeline{
  list-style: none;
  padding: 0;
  margin: 0;
  display:grid;
  gap: 12px;
}
.timeline li{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(36,49,58,.10);
}
[data-theme="dark"] .timeline li{ border-bottom: 1px solid rgba(255,255,255,.12); }
.timeline li:last-child{ border-bottom: 0; }
.timeline__time{
  font-family: var(--serif);
  font-weight: 600;
  min-width: 76px;
}
.timeline__desc{
  color: var(--ink-2);
  line-height: 1.65;
}

/* Bullets */
.bullets{
  margin: 0;
  padding-left: 18px;
  line-height: 1.9;
  color: var(--ink-2);
}

/* Gallery placeholders */
.gallery{
  margin-top: 34px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 920px){ .gallery{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 520px){ .gallery{ grid-template-columns: 1fr;} }

.ph{
  position:relative;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(700px 220px at 30% 10%, rgba(255,255,255,.88), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(127,174,196,.16), rgba(246,241,234,.92));
  min-height: 220px;
}
[data-theme="dark"] .ph{
  background:
    radial-gradient(700px 220px at 30% 10%, rgba(255,255,255,.10), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(127,174,196,.06), rgba(255,255,255,.04));
}
.ph::after{
  content:"";
  position:absolute;
  inset: 16px;
  background: url("../assets/compass.png") center/contain no-repeat;
  opacity: .11;
  filter: grayscale(100%);
}
[data-theme="dark"] .ph::after{ opacity: .10; }
.ph span{
  position:absolute;
  left: 14px;
  bottom: 14px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: rgba(255,255,255,.58);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .ph span{ background: rgba(255,255,255,.06); }

/* Form */
.form{ margin-top: 14px; display:grid; gap: 12px; }
.form__row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px){ .form__row{ grid-template-columns: 1fr; } }
input, select, textarea{
  width: 100%;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(36,49,58,.14);
  background: rgba(255,255,255,.90);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  color: rgba(36,49,58,.92);
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
}
textarea{ min-height: 120px; resize: vertical; }

.form__actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.btn{
  border: 1px solid rgba(36,49,58,.18);
  background: rgba(36,49,58,.92);
  color: white;
  padding: 12px 16px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 600;
  letter-spacing:.06em;
}
[data-theme="dark"] .btn{
  background: rgba(255,255,255,.92);
  color: rgba(7,17,26,.92);
  border: 1px solid rgba(255,255,255,.16);
}
.btn:active{ transform: translateY(1px); }
.btn--ghost{
  background: transparent;
  color: rgba(36,49,58,.90);
  border: 1px solid rgba(36,49,58,.20);
}
[data-theme="dark"] .btn--ghost{
  color: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.16);
}

/* Footer */
.footer{
  padding: 46px 0 54px 0;
  background: var(--bg);
  border-top: 1px solid rgba(36,49,58,.08);
}
[data-theme="dark"] .footer{ border-top: 1px solid rgba(255,255,255,.10); }
.footer__inner{ text-align:center; }
.footer__title{
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
}
.footer__sub{
  margin-top: 6px;
  font-size: 12px;
  letter-spacing:.14em;
  text-transform: uppercase;
  color: rgba(36,49,58,.55);
}
[data-theme="dark"] .footer__sub{ color: rgba(255,255,255,.55); }

/* Anchor offset */
#storia, #giorno, #location, #programma, #info, #gallery, #rsvp{
  scroll-margin-top: 72px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .hero__scrollDot{ animation:none; }
  .hero__compass{ animation:none; }
}

/* Improved Typography (legibility) */

/* Larger and more readable headings */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: .01em;
}

h1 {
  font-size: clamp(50px, 8vw, 80px);  /* Bigger headings for better visibility */
  line-height: 1.2;
}

h2 {
  font-size: clamp(32px, 5.5vw, 58px);
  line-height: 1.4;
}

h3 {
  font-size: clamp(24px, 4.5vw, 40px);
  line-height: 1.4;
}

/* Body text improvements for better readability */
p, .lead {
  font-size: 18px;
  line-height: 1.8;  /* Increased line-height for better text flow */
  max-width: 75ch;
  margin: 0 auto;
}

/* Improved spacing and readability for navigation */
.nav a {
  font-size: 16px;
  line-height: 1.6;
  padding: 10px 15px;
  font-weight: 500;
}

/* Button text improvement for clarity */
button, .btn, .hero__scroll {
  font-size: 16px;
  font-weight: 600;
}

/* Subtle adjustments for smaller text for accessibility */
.small-text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(36, 49, 58, 0.6);
}

/* Adjust overall padding and margins for better spacing */
body {
  padding: 0;
  margin: 0;
}

.container {
  padding: 0 20px;
}

/* Ensure that mobile typography is easy to read */
@media (max-width: 520px) {
  h1 {
    font-size: 65px;
  }
  h2 {
    font-size: 28px;
  }
  p, .lead {
    font-size: 16px;
    line-height: 1.8;
  }
}
