/* ============================================
   TEOREMA FINE JEWELLERY — STYLE PRINCIPALE
   ============================================ */

:root {
  --blu-notte: #0C2340;
  --bianco-perla: #F6F4EF;
  --oro-satinato: #C9A64F;
  --titanio-chiaro: #A3A7AA;
  --titanio-scuro: #5A6166;
  --verde-petrolio: #2B5E65;

  --font-headline: 'Garamond', 'EB Garamond', Georgia, serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;

  --max-width: 1240px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 7rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--blu-notte);
  background: var(--bianco-perla);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-headline);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); }

p {
  font-size: 1.05rem;
  color: var(--blu-notte);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oro-satinato);
  font-weight: 600;
  display: block;
  margin-bottom: var(--space-xs);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section--tight {
  padding: var(--space-lg) 0;
}

.section--dark {
  background: var(--blu-notte);
  color: var(--bianco-perla);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark p {
  color: var(--bianco-perla);
}

.section--alt {
  background: #EFEBE2;
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--oro-satinato);
  margin: var(--space-sm) 0 var(--space-md);
}

.divider--center {
  margin: var(--space-sm) auto var(--space-md);
}

/* ===== HEADER ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 239, 0.96);
  border-bottom: 1px solid rgba(12, 35, 64, 0.08);
  backdrop-filter: blur(6px);
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.site-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
}

.site-logo img {
  height: 46px;
  width: auto;
}

.site-logo span {
  font-family: var(--font-headline);
  font-size: 1.15rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--blu-notte);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.main-nav a {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blu-notte);
  font-weight: 600;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
  border-bottom-color: var(--oro-satinato);
  color: var(--oro-satinato);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blu-notte);
  font-weight: 600;
  background: none;
  border: none;
  padding: 0.4rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown__caret {
  font-size: 0.6rem;
  color: var(--oro-satinato);
  transition: transform 0.2s ease;
}

.nav-dropdown__panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.6rem;
  min-width: 200px;
  background: var(--bianco-perla);
  border: 1px solid rgba(12,35,64,0.1);
  box-shadow: 0 12px 28px rgba(12,35,64,0.12);
  padding: 0.6rem 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

/* Area invisibile che "salda" il trigger al pannello, così muovere il
   mouse verso il basso non interrompe mai l'hover sul contenitore. */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 0.8rem;
}

.nav-dropdown:hover .nav-dropdown__panel,
.nav-dropdown:focus-within .nav-dropdown__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-dropdown:hover .nav-dropdown__caret {
  transform: rotate(180deg);
}

.nav-dropdown__panel a {
  padding: 0.55rem 1.2rem;
  border-bottom: none;
  white-space: nowrap;
  font-weight: 500;
}

.nav-dropdown__panel a:hover,
.nav-dropdown__panel a.active {
  background: rgba(201,166,79,0.1);
  color: var(--oro-satinato);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--blu-notte);
  cursor: pointer;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(12,35,64,0.15);
}

.lang-switcher a {
  font-weight: 600;
  color: var(--titanio-scuro);
  border-bottom: none;
}

.lang-switcher a.active {
  color: var(--oro-satinato);
}

.lang-switcher__sep {
  color: var(--titanio-chiaro);
}

@media (max-width: 880px) {
  .lang-switcher {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
    margin-top: 1rem;
  }

  .lang-switcher a {
    color: var(--bianco-perla);
  }
}

@media (max-width: 880px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--blu-notte);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.4rem;
    padding: calc(var(--space-md) + 2rem) var(--space-md) var(--space-md);
    transition: right 0.35s ease;
    overflow-y: auto;
  }

  .main-nav.is-open {
    right: 0;
  }

  .main-nav a {
    color: var(--bianco-perla);
    font-size: 0.95rem;
  }

  .main-nav a:hover,
  .main-nav a.active {
    color: var(--oro-satinato);
  }

  .nav-toggle {
    display: block;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown__trigger {
    color: var(--bianco-perla);
    font-size: 0.95rem;
    width: 100%;
    justify-content: flex-start;
  }

  .nav-dropdown__panel {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.6rem 0 0 1rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-dropdown.is-open .nav-dropdown__panel {
    max-height: 400px;
  }

  .nav-dropdown.is-open .nav-dropdown__caret {
    transform: rotate(180deg);
  }

  .nav-dropdown__panel a {
    color: rgba(246,244,239,0.75);
    font-size: 0.88rem;
    padding: 0.45rem 0;
  }

  .nav-dropdown__panel a:hover,
  .nav-dropdown__panel a.active {
    background: transparent;
    color: var(--oro-satinato);
  }
}

/* ===== HERO ===== */

.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  background: var(--blu-notte);
  color: var(--bianco-perla);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,35,64,0.55) 0%, rgba(12,35,64,0.85) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 var(--space-md);
  margin: 0 auto;
  text-align: center;
}

.hero__content h1 {
  color: var(--bianco-perla);
  margin-bottom: var(--space-sm);
}

.hero__content p {
  color: var(--bianco-perla);
  opacity: 0.9;
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto var(--space-md);
}

/* ===== BUTTONS ===== */

.btn {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.95rem 2.2rem;
  border: 1px solid var(--oro-satinato);
  border-radius: 1px;
  transition: background 0.25s ease, color 0.25s ease;
}

.btn--primary {
  background: var(--blu-notte);
  color: var(--bianco-perla);
  border-color: var(--blu-notte);
}

.btn--primary:hover {
  background: var(--verde-petrolio);
  border-color: var(--verde-petrolio);
}

.btn--outline {
  background: transparent;
  color: var(--oro-satinato);
}

.btn--outline:hover {
  background: var(--oro-satinato);
  color: var(--blu-notte);
}

.btn--light {
  background: transparent;
  color: var(--bianco-perla);
  border-color: var(--bianco-perla);
}

.btn--light:hover {
  background: var(--bianco-perla);
  color: var(--blu-notte);
}

/* ===== GRID LAYOUTS ===== */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ===== IMAGE PLACEHOLDER ===== */

.img-frame {
  position: relative;
  width: 100%;
  background: #E2DDD0;
  border: 1px solid rgba(12,35,64,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame--square { aspect-ratio: 1 / 1; }
.img-frame--portrait { aspect-ratio: 3 / 4; }
.img-frame--landscape { aspect-ratio: 16 / 10; }
.img-frame--wide { aspect-ratio: 21 / 9; }

.img-placeholder-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--titanio-scuro);
  text-align: center;
  padding: 0 1.5rem;
  opacity: 0.7;
}

/* ===== CARDS ===== */

.card {
  background: #FFFFFF;
  border: 1px solid rgba(12,35,64,0.08);
  padding: var(--space-md);
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--titanio-scuro);
}

/* ===== COLLECTION GALLERY ===== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 880px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery-item {
  position: relative;
}

.gallery-item__caption {
  margin-top: 0.6rem;
}

.gallery-item__caption .eyebrow {
  margin-bottom: 0.2rem;
}

.gallery-item__caption h4 {
  font-family: var(--font-headline);
  font-size: 1.1rem;
}

/* ===== TIMELINE / PROCESS ===== */

.process-step {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.process-step__number {
  font-family: var(--font-headline);
  font-size: 2rem;
  color: var(--oro-satinato);
  line-height: 1;
  min-width: 60px;
}

/* ===== FOOTER ===== */

.site-footer {
  background: var(--blu-notte);
  color: var(--bianco-perla);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

@media (max-width: 880px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oro-satinato);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.footer-grid a,
.footer-grid p {
  display: block;
  font-size: 0.88rem;
  color: rgba(246,244,239,0.78);
  margin-bottom: 0.5rem;
}

.footer-grid a:hover {
  color: var(--oro-satinato);
}

.footer-logo {
  height: 44px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(246,244,239,0.12);
  padding-top: var(--space-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.78rem;
  color: rgba(246,244,239,0.55);
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  color: rgba(246,244,239,0.78);
  font-size: 0.85rem;
}

.footer-socials a:hover {
  color: var(--oro-satinato);
}

/* ===== FORMS ===== */

.form-field {
  margin-bottom: var(--space-sm);
}

.form-field label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  color: var(--titanio-scuro);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(12,35,64,0.18);
  background: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--blu-notte);
}

.form-field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--oro-satinato);
}
