/* Joppe APS — brand: navy + gold */
:root {
  --navy: #0b1f3a;
  --navy-deep: #061428;
  --navy-mid: #143053;
  --gold: #c4a35a;
  --gold-soft: #d4b87a;
  --gold-dim: rgba(196, 163, 90, 0.18);
  --cream: #f7f3eb;
  --cream-dim: #ebe4d6;
  --ink: #1a2433;
  --muted: #5c6b7a;
  --white: #ffffff;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 68rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--navy-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--gold);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin: 0 0 0.85rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; }

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

.lead {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 38rem;
  margin-bottom: 1.75rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(11, 31, 58, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196, 163, 90, 0.25);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--cream);
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  border-radius: 0.25rem;
  background: var(--white);
}

.brand span {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-soft);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.35rem;
}

.site-nav a {
  color: rgba(247, 243, 235, 0.88);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 0.35rem 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-soft);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-nav .nav-cta {
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(196, 163, 90, 0.55);
  border-radius: 0.2rem;
  color: var(--gold-soft);
}

.site-nav .nav-cta::after {
  display: none;
}

.site-nav .nav-cta:hover {
  background: var(--gold-dim);
  color: var(--cream);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.4rem;
  border: none;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--gold-soft);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--cream);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(196, 163, 90, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 15% 80%, rgba(20, 48, 83, 0.9), transparent 50%),
    linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 45%, var(--navy-mid) 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='none' stroke='%23c4a35a' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 48px 48px;
}

.hero-content {
  width: min(100% - 2.5rem, 40rem);
  padding: 3.5rem 0 4.5rem;
}

.hero-logo {
  width: clamp(8rem, 20vw, 11rem);
  height: auto;
  margin: 0 auto 1.15rem;
  border-radius: 0.35rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  animation: heroLogo 1.1s var(--ease) both;
}

.page-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}

.hero-brand {
  font-family: "Montserrat", var(--font-body), system-ui, sans-serif;
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.45rem;
  line-height: 1.15;
  padding-left: 0.18em; /* bilancia lo spacing a destra dell’ultima lettera */
  animation: heroFade 1s 0.15s var(--ease) both;
}

.hero h1 {
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  letter-spacing: 0.02em;
  animation: heroFade 1s 0.28s var(--ease) both;
}

.hero-lead {
  color: rgba(247, 243, 235, 0.78);
  font-weight: 300;
  font-size: 1.1rem;
  max-width: 28rem;
  margin: 0 auto 1.75rem;
  animation: heroFade 1s 0.35s var(--ease) both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  animation: heroFade 1s 0.48s var(--ease) both;
}

@keyframes heroLogo {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.2rem;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s, border-color 0.25s, transform 0.25s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}

.btn-primary:hover {
  background: var(--gold-soft);
  color: var(--navy-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(247, 243, 235, 0.4);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section-about {
  background:
    linear-gradient(180deg, var(--cream) 0%, var(--cream-dim) 100%);
}

.section-place {
  background: var(--navy);
  color: rgba(247, 243, 235, 0.9);
}

.section-place h2,
.section-place h3 {
  color: var(--cream);
}

.section-place .lead {
  color: rgba(247, 243, 235, 0.7);
}

.section-do {
  background: var(--cream);
}

.section-gallery {
  background:
    linear-gradient(135deg, var(--cream-dim), var(--cream) 40%, #e8e0d0);
}

.section-project {
  background: var(--navy-deep);
  color: rgba(247, 243, 235, 0.9);
}

.section-project h2 {
  color: var(--gold);
}

.section-project .lead,
.section-project p {
  color: rgba(247, 243, 235, 0.78);
}

.section-project strong {
  color: var(--gold-soft);
}

.section-contact {
  background: var(--cream);
  text-align: center;
}

.section-contact .lead {
  margin-inline: auto;
}

.about-grid {
  display: grid;
  gap: 1.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.about-block p {
  color: var(--muted);
  margin-bottom: 0;
}

.place-rows {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .place-rows {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.place-row {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(196, 163, 90, 0.35);
}

.place-row p {
  margin: 0;
  color: rgba(247, 243, 235, 0.72);
}

.pillars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem 1.75rem;
}

@media (min-width: 640px) {
  .pillars {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .pillars {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pillars li {
  padding-top: 1rem;
  border-top: 2px solid var(--gold);
}

.pillar-icon {
  display: block;
  font-size: 1.4rem;
  color: var(--gold);
  margin-bottom: 0.65rem;
  line-height: 1;
}

.pillars p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
}

/* Gallery placeholders */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.gallery-ph {
  margin: 0;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, var(--navy-mid), var(--navy));
  border: 1px solid rgba(196, 163, 90, 0.3);
}

.gallery-ph span {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(196, 163, 90, 0.75);
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: rgba(247, 243, 235, 0.75);
  padding-top: 3rem;
  border-top: 1px solid rgba(196, 163, 90, 0.25);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 0.9fr 1.3fr 1fr;
    gap: 2.5rem;
  }
}

.footer-brand img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  border-radius: 0.25rem;
  background: var(--white);
  margin-bottom: 0.75rem;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
  margin: 0 0 0.2rem;
}

.footer-tag {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  color: rgba(247, 243, 235, 0.55);
}

.footer-legal h3,
.footer-links h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.85rem;
}

.footer-legal p,
.footer-links p {
  font-size: 0.92rem;
  margin-bottom: 0.65rem;
}

.footer-legal a,
.footer-links a {
  color: var(--gold-soft);
  text-decoration: none;
}

.footer-legal a:hover,
.footer-links a:hover {
  text-decoration: underline;
}

.footer-legal .muted {
  font-size: 0.82rem;
  color: rgba(247, 243, 235, 0.45);
  margin-top: 0.75rem;
}

.footer-links ul {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.credit {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(247, 243, 235, 0.55);
}

.credit strong {
  color: rgba(247, 243, 235, 0.8);
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid rgba(247, 243, 235, 0.08);
  padding: 1rem 1.25rem;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(247, 243, 235, 0.4);
}

/* Legal page */
.page-legal .legal-main {
  padding: 3rem 0 4rem;
  background: var(--cream);
}

.legal-wrap {
  max-width: 42rem;
}

.legal-wrap h1 {
  margin-bottom: 0.35rem;
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.legal-wrap h2 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--cream-dim);
}

.legal-wrap h3 {
  font-size: 1.05rem;
  margin-top: 1.25rem;
  color: var(--navy-mid);
}

.legal-wrap ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.legal-wrap li {
  margin-bottom: 0.45rem;
  color: var(--ink);
}

.legal-back {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cream-dim);
}

.legal-back a {
  font-weight: 500;
  text-decoration: none;
  color: var(--navy);
}

.legal-back a:hover {
  color: var(--gold);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero .reveal {
  opacity: 1;
  transform: none;
}

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    background: var(--navy-deep);
    border-bottom: 1px solid rgba(196, 163, 90, 0.3);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s;
  }

  .nav-open .site-nav {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid rgba(247, 243, 235, 0.08);
  }

  .site-nav .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .hero-logo,
  .hero-brand,
  .hero h1,
  .hero-lead,
  .hero-actions {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
