/* Divo Gaeta — Opening Soon
   Layout: one sunset frame. The wordmark floats in the dark sky above a low, sinking sun;
   contacts rest on the shadowed dunes in the foreground. Single dark look, by choice. */

:root {
  --night: #3D3530;       /* Desertic Night */
  --night-deep: #221C19;
  --sand: #E8D5B0;        /* Ancient Sand */
  --sand-bright: #F3E6CC;
  --dirt: #C4956A;        /* Nomad Dirt */
  --sunset: #D4956A;      /* Sunset */
  --stone: #B5A99A;       /* Lava Stone */
  --brick: #A04F47;       /* Loro Piana Brick */
  --shade: rgba(28, 22, 19, 0.66);
  --halo: rgba(28, 22, 19, 0.5);

  --f-display: "Cormorant Garamond", "Cormorant", "Garamond", "Times New Roman", serif;
  --f-label: "Marcellus", "Cormorant Garamond", "Trajan Pro", Georgia, serif;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background:
    linear-gradient(to bottom, #1F1916 0%, #5E2F29 50%, #A8664D 64%, #2E221D 66%, var(--night-deep) 100%);
  background-color: var(--night-deep);
  color: var(--sand);
  font-family: var(--f-display);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#dunes {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 0;
}

/* darkens the top and bottom edges, plus a soft halo behind the wordmark and the lines under it */
.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 62% 34% at 50% 40%, var(--halo) 0%, transparent 100%),
    linear-gradient(to bottom, var(--shade) 0%, transparent 28%, transparent 66%, var(--shade) 100%);
}

/* shooting stars: thin trails drawn by main.js, above the sky, below the text */
.sky-fx { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.meteor {
  position: absolute;
  height: 1.5px;
  border-radius: 1px;
  transform-origin: 100% 50%;
  background: linear-gradient(to right, rgba(243, 230, 204, 0) 0%, rgba(243, 230, 204, 0.35) 55%, rgba(250, 240, 220, 0.95) 100%);
  filter: drop-shadow(0 0 3px rgba(243, 230, 204, 0.55));
  opacity: 0;
  will-change: transform, opacity;
}

.stage {
  position: relative; z-index: 2;
  min-height: 100%;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding-block: clamp(18px, 3.5vh, 36px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.coords {
  margin: 0;
  font-family: var(--f-label);
  font-size: 0.7rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--stone);
  padding-left: 0.38em;
}
.coords span { color: var(--dirt); }
.coords a {
  color: inherit; text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}
.coords a:hover, .coords a:focus-visible { color: var(--sand-bright); border-bottom-color: rgba(196, 149, 106, 0.6); }

/* IT / EN switch: top-right on wide screens, under the coordinates on phones */
.lang-switch {
  position: absolute;
  top: clamp(14px, 3.5vh, 32px);
  right: max(24px, env(safe-area-inset-right, 0px));
  display: flex; align-items: baseline; gap: 0.5em;
  font-family: var(--f-label);
  font-size: 0.66rem;
  letter-spacing: 0.3em;
  color: var(--dirt);
}
.lang-switch button {
  background: none; border: 0; padding: 4px 0 4px 0.3em; margin: 0;
  font: inherit; letter-spacing: inherit; color: var(--stone);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color .3s ease, border-color .3s ease;
}
.lang-switch button:hover, .lang-switch button:focus-visible { color: var(--sand-bright); }
.lang-switch button[aria-pressed="true"] { color: var(--sand-bright); border-bottom-color: rgba(196, 149, 106, 0.7); }

.hero {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(16px, 2.6vh, 28px);
  padding-top: clamp(28px, 8vh, 110px);
}

.logo {
  margin: 0;
  font-weight: 300;
  line-height: 1;
  display: flex; flex-direction: column; align-items: center;
  color: var(--sand-bright);
  text-shadow: 0 2px 40px rgba(28, 22, 19, 0.45);
}
.logo .word {
  font-size: clamp(4.4rem, 17vw, 12.5rem);
  letter-spacing: 0.26em;
  margin-right: -0.26em;     /* balances the tracking after the last letter */
  line-height: 0.92;
  color: rgba(243, 230, 204, 0.55);   /* semi-transparent: the sky shows through */
  text-shadow: none;
  animation: arrive 4.8s cubic-bezier(.22,.61,.2,1) both;
}
@keyframes arrive {
  from { opacity: 0; letter-spacing: 0.46em; filter: blur(10px); }
  to   { opacity: 1; filter: blur(0); }
}

/* Opening sequence: DIVO first (slow), then everything else, one after the other.
   To change the pace: the delays below (seconds from page load). */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}
.soon, .tagline, .newsletter, .foot, .company, .coords, .lang-switch {
  animation: rise 1.6s cubic-bezier(.22,.61,.2,1) both;
}
.soon        { animation-delay: 2.8s; }
.tagline     { animation-delay: 3.8s; }
.newsletter  { animation-delay: 5.0s; }
.foot        { animation-delay: 5.9s; }
.company     { animation-delay: 6.5s; }
.coords, .lang-switch { animation-delay: 7.1s; }

.soon {
  margin: 0;
  display: inline-flex; align-items: center; gap: 1.1em;
  padding: 0.75em 1.6em 0.75em calc(1.6em + 0.55em);
  font-family: var(--f-label);
  font-size: clamp(0.82rem, 1.7vw, 1.02rem);
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: var(--sand-bright);
  text-shadow: 0 1px 12px rgba(28, 22, 19, 0.7);
}

.tagline {
  margin: 0;
  max-width: 32ch;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  color: var(--sand-bright);
  text-wrap: balance;
  text-shadow: 0 1px 2px rgba(28, 22, 19, 0.6), 0 2px 22px rgba(28, 22, 19, 0.75);
}

/* bottom: newsletter on one line, then a footer rule with brand | contact | privacy */
.contact {
  margin-top: auto;
  width: 100%;
  max-width: 1180px;
  padding-top: clamp(40px, 9vh, 100px);
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(26px, 4.5vh, 44px);
}

.newsletter {
  width: 100%;
  max-width: 760px;
  display: flex; align-items: baseline; justify-content: center;
  gap: clamp(18px, 3vw, 36px);
}
.nl-title {
  flex: none;
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.1vw, 1.55rem);
  line-height: 1.2;
  color: var(--sand-bright);
  text-shadow: 0 1px 14px rgba(28, 22, 19, 0.7);
}
.nl-field {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
  text-align: left;
}
.nl-row {
  display: flex; align-items: baseline;
  border-bottom: 1px solid rgba(196, 149, 106, 0.7);
  transition: border-color .3s ease;
}
.nl-row:focus-within { border-color: var(--sand); }
.nl-row input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: 0;
  padding: 8px 4px 10px;
  font-family: var(--f-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--sand-bright);
}
.nl-row input::placeholder { color: var(--stone); opacity: 0.9; }
.nl-row button {
  flex: none;
  background: transparent; border: 0; cursor: pointer;
  padding: 8px 0 10px 16px;
  font-family: var(--f-label);
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--dirt);
  transition: color .3s ease;
}
.nl-row button:hover, .nl-row button:focus-visible { color: var(--sand-bright); }
.nl-row button:focus-visible { outline: 1px solid var(--dirt); outline-offset: 2px; }
.nl-row button:disabled { opacity: .5; cursor: default; }

.nl-legal, .nl-note {
  margin: 0;
  min-height: 1.45em;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--stone);
}
.nl-legal a {
  color: var(--sand);
  text-underline-offset: 3px;
  text-decoration-color: var(--dirt);
  transition: color .3s ease;
}
.nl-legal a:hover, .nl-legal a:focus-visible { color: var(--sand-bright); text-decoration-color: var(--sand); }
.nl-note { display: none; font-style: italic; font-size: 0.98rem; color: var(--sand); }
.newsletter[data-state="error"] .nl-note,
.newsletter[data-state="done"] .nl-note,
.newsletter[data-state="busy"] .nl-note { display: block; }
.newsletter[data-state="error"] .nl-legal,
.newsletter[data-state="done"] .nl-legal,
.newsletter[data-state="busy"] .nl-legal { display: none; }
.newsletter[data-state="error"] .nl-note { color: var(--sunset); }
.newsletter[data-state="done"] .nl-row { border-color: var(--sand); }

/* footer rule: three items on one baseline */
.foot {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: baseline;
  gap: 10px 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(196, 149, 106, 0.3);
}
.foot-brand, .foot-link, .mail .label {
  font-family: var(--f-label);
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
}
.foot-brand { justify-self: start; }
.foot-brand .sep { color: var(--dirt); margin-inline: 0.4em; }
.foot-link {
  justify-self: end;
  text-decoration: none;
  transition: color .3s ease;
}
.foot-link:hover, .foot-link:focus-visible { color: var(--sand-bright); }

.company {
  margin: -14px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: center;
  color: var(--stone);
  opacity: 0.8;
}
.company .sep { color: var(--dirt); margin-inline: 0.35em; }

.mail {
  all: unset;
  box-sizing: border-box;
  justify-self: center;
  cursor: pointer;
  display: inline-flex; align-items: baseline; gap: 0.9em;
  border-radius: 2px;
}
.mail .label { transition: color .3s ease; }
.mail .addr {
  font-family: var(--f-display);
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  color: var(--sand);
  overflow-wrap: anywhere;
  padding-bottom: 2px;
  background: linear-gradient(var(--dirt), var(--dirt)) left bottom / 0% 1px no-repeat;
  transition: background-size .45s ease;
  user-select: text;
}
.mail:hover .addr, .mail:focus-visible .addr { background-size: 100% 1px; }
.mail:focus-visible { outline: 1px solid var(--dirt); outline-offset: 6px; }
.mail.copied .label { color: var(--sunset); }

@media (max-width: 760px) {
  .newsletter { flex-direction: column; align-items: center; gap: 14px; max-width: 480px; }
  .nl-field { width: 100%; text-align: center; }
  .foot { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 12px; }
  .foot-brand, .foot-link { justify-self: center; }
  .mail { flex-direction: column; align-items: center; gap: 4px; }
}

@media (max-width: 640px) {
  .lang-switch { position: static; margin-top: 12px; }
  .hero { padding-top: clamp(40px, 11vh, 110px); }
  .soon { letter-spacing: 0.42em; padding-inline: 1.2em calc(1.2em + 0.42em); }
}

@media (prefers-reduced-motion: reduce) {
  .logo .word, .soon, .tagline, .newsletter, .foot, .company, .coords, .lang-switch { animation: none; }
  .mail .addr { transition: none; }
}
