/* ============================================================
   NOTO GARDEN DESIGN — Shared Stylesheet
   Luxury Mediterranean landscape design studio, Noto, Sicily
   Palette — green + white, black for fine details only:
     #1F3D2B  primary green   (dominant background)
     #2E5A3F  mid green       (hover, accents, placeholders)
     #F7F4EF  white           (text on dark, light sections, borders)
     #FFFFFF  pure white      (plain light sections)
     #1A1A18  near-black       (fine details, body text on light)
   ============================================================ */

/* ------------------------------------------------------------
   1. RESET & BASE
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette: green + white, with black for fine details only */
  --green:        #1F3D2B;   /* primary green */
  --green-mid:    #2E5A3F;   /* mid green — accents, hover */
  --stone:        #F7F4EF;   /* (was warm stone) now white: text/borders on dark */
  --beige:        #FFFFFF;   /* (was beige) now plain white sections */
  --cream:        #F7F4EF;   /* white */
  --ink:          #1A1A18;   /* near-black — fine details */

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  --max:   1180px;
  --gutter: clamp(1.5rem, 5vw, 5rem);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-weight: 300;
  background-color: var(--green);
  color: var(--stone);
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* ------------------------------------------------------------
   2. TYPOGRAPHY
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 4rem);
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
}

h3 {
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
}

p {
  font-weight: 300;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1.6rem;
  display: block;
}

/* Eyebrows on light sections — dark green & bold for contrast
   (e.g. "La Nostra Filosofia", "Lo Studio") */
.section--cream .eyebrow,
.section--beige .eyebrow {
  color: var(--green);
  font-weight: 700;
}

.lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.9;
  max-width: 46ch;
}

/* ------------------------------------------------------------
   3. LAYOUT HELPERS
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: clamp(3.25rem, 7vw, 5.5rem);
  padding-bottom: clamp(3.25rem, 7vw, 5.5rem);
}

/* Section colour variants */
.section--dark {
  background-color: var(--green);
  color: var(--stone);
}

.section--mid {
  background-color: var(--green-mid);
  color: var(--cream);
}

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

.section--beige {
  background-color: var(--beige);
  color: var(--ink);
}

.divider {
  width: 56px;
  height: 1px;
  background-color: var(--stone);
  margin: 2rem 0;
  border: 0;
}

.section--cream .divider,
.section--beige .divider {
  background-color: var(--ink);
  opacity: 0.5;
}

/* ------------------------------------------------------------
   4. LANGUAGE TOGGLE VISIBILITY
   Show/hide elements by [lang] based on <html data-lang>
   ------------------------------------------------------------ */
html[data-lang="en"] [lang="it"] { display: none !important; }
html[data-lang="it"] [lang="en"] { display: none !important; }

/* ------------------------------------------------------------
   5. NAVIGATION
   Fixed, transparent over dark hero sections
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background-color 0.4s ease;
}

/* Solid background once scrolled (toggled via JS) */
.site-header.is-scrolled {
  background-color: var(--green);
  border-bottom: 1px solid rgba(247, 244, 239, 0.2);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.6rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — image mark */
.logo {
  display: block;
  line-height: 0;
}

.logo-img {
  height: 42px;
  width: auto;
  display: block;
}

/* Menu wrapper (links + language toggle) */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.4rem;
}

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--cream);
  border-color: var(--stone);
}

/* Language toggle — plain text, no button styling */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
}

.lang-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--stone);
  transition: color 0.3s ease;
}

.lang-btn:hover {
  color: var(--cream);
}

.lang-btn.is-active {
  color: var(--cream);
}

.lang-sep {
  color: var(--stone);
  opacity: 0.5;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 22px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  z-index: 110;
}

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

/* ------------------------------------------------------------
   6. BUTTONS / TEXT LINKS
   ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 1.1rem 2.6rem;
  border: 1px solid var(--stone);
  color: var(--stone);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

.btn:hover {
  background-color: var(--stone);
  color: var(--green);
}

.section--cream .btn,
.section--beige .btn {
  border-color: var(--ink);
  color: var(--ink);
}

.section--cream .btn:hover,
.section--beige .btn:hover {
  background-color: var(--ink);
  color: var(--cream);
}

/* CTA — "Begin a Conversation" / "Inizia una Conversazione".
   Translucent, faint dark-green fill, white text, very thin border.
   Higher specificity (.btn.btn--white) so it wins on light sections too. */
.btn.btn--white {
  background-color: rgba(31, 61, 43, 0.45);
  border: 1px solid rgba(247, 244, 239, 0.55);
  color: var(--cream);
}

.btn.btn--white:hover {
  background-color: rgba(31, 61, 43, 0.8);
  border-color: var(--cream);
  color: var(--cream);
}

/* Inline arrow link */
.text-link {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: border-color 0.3s ease;
}

.text-link:hover {
  border-color: currentColor;
}

/* ------------------------------------------------------------
   7. HERO (Home)
   ------------------------------------------------------------ */
.hero {
  min-height: calc(100vh - 5cm);   /* portada 5cm más baja */
  display: flex;
  align-items: center;
  background-color: var(--green);
  background-image: url('assets/hero.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Flat green veil over the photograph — keeps the headline legible
   (solid colour, not a gradient) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(31, 61, 43, 0.66);
}

.hero .container {
  padding-top: 8rem;
  padding-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: none;          /* el <br> controla el corte de línea */
  color: var(--cream);
}

.hero .lead {
  margin-top: 2.4rem;
  color: var(--stone);
}

.hero-cta {
  margin-top: 3.2rem;
}

/* Page hero (inner pages) — shorter */
.page-hero {
  padding-top: clamp(9rem, 18vw, 13rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
  background-color: var(--green);
}

.page-hero h1 {
  max-width: 20ch;
  color: var(--cream);
}

.page-hero .lead {
  margin-top: 2rem;
}

/* Page hero with a photographic background + flat green veil.
   Image set inline per page (background-image). */
.page-hero--photo {
  position: relative;
  background-size: cover;
  background-position: center;
}

.page-hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(31, 61, 43, 0.62);
}

.page-hero--photo > .container {
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------
   8. GENERIC TWO-COLUMN / INTRO BLOCKS
   ------------------------------------------------------------ */
.split {
  display: grid;
  grid-template-columns: 0.8fr 1fr;   /* imagen más contenida, menos espacio vacío */
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.split--text-only {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: start;
}

/* ------------------------------------------------------------
   9. SERVICES — preview cards (Home) & detail blocks
   ------------------------------------------------------------ */
.services-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.6rem);
  margin-top: 2.4rem;
}

.service-card {
  border-top: 1px solid rgba(247, 244, 239, 0.35);
  padding-top: 2rem;
}

.service-card .num {
  font-family: var(--serif);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--stone);
  display: block;
  margin-bottom: 1.2rem;
}

.service-card h3 {
  color: var(--cream);
  margin-bottom: 1rem;
}

.service-card p {
  margin-bottom: 1.6rem;
}

/* Detail blocks on services page — alternating image + text */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-bottom: 1px solid rgba(26, 26, 24, 0.18);
}

/* Trim the doubled-up whitespace at the top and bottom of the list:
   the section already pads; the first/last block shouldn't pad again */
.service-detail:first-child {
  padding-top: 0;
}

.service-detail:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Media figure — 4:5 photograph */
.service-detail__media {
  margin: 0;
  overflow: hidden;
}

.service-detail__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

/* The design board shows whole (contain); cream blends into the section */
.service-detail__media--contain {
  background-color: var(--cream);
}

.service-detail__media--contain img {
  object-fit: contain;
}

/* Image on the right → push the media column after the text */
.service-detail--img-right .service-detail__media {
  order: 2;
}

.service-detail .num {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--green-mid);
  line-height: 1;
  display: block;
  margin-bottom: 1rem;
}

.service-detail h2 {
  margin-bottom: 1.5rem;
}

.expect {
  margin-top: 2.2rem;
}

.expect h4 {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  opacity: 0.7;
}

.expect ul {
  list-style: none;
}

.expect li {
  padding: 0.7rem 0;
  padding-left: 1.6rem;
  position: relative;
  border-top: 1px solid rgba(26, 26, 24, 0.12);
}

.expect li::before {
  content: "—";
  position: absolute;
  left: 0;
  opacity: 0.5;
}

/* ------------------------------------------------------------
   10. CREDIBILITY STATS
   ------------------------------------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 3.5rem;
}

.stat .figure {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--cream);
  line-height: 1;
  margin-bottom: 0.8rem;
}

.section--cream .stat .figure,
.section--beige .stat .figure {
  color: var(--ink);
}

.stat .label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ------------------------------------------------------------
   11. PROJECTS GRID
   ------------------------------------------------------------ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.6rem);
  margin-top: 3.5rem;
}

.project-card {
  cursor: default;
}

/* Placeholder rectangle — alternating palette, no images */
.project-thumb {
  aspect-ratio: 4 / 5;
  background-color: var(--green-mid);
  margin-bottom: 1.4rem;
  transition: opacity 0.4s ease;
}

.project-card:nth-child(even) .project-thumb {
  background-color: var(--green);
}

.project-card:hover .project-thumb {
  opacity: 0.82;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid rgba(247, 244, 239, 0.3);
  padding-top: 1rem;
  margin-bottom: 0.6rem;
}

.project-location {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--cream);
}

.project-year {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  opacity: 0.7;
}

.project-desc {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ------------------------------------------------------------
   12. CONTACT FORM
   Underline-style fields only — no boxes
   ------------------------------------------------------------ */
.contact-wrap {
  max-width: 640px;
}

.form-row {
  margin-bottom: 2.6rem;
}

.form-row label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
  opacity: 0.7;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--stone);
  padding: 0.6rem 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  color: var(--cream);
  letter-spacing: 0.02em;
  border-radius: 0;
  transition: border-color 0.3s ease;
}

.form-row textarea {
  resize: vertical;
  min-height: 90px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--cream);
}

.form-row select option {
  background-color: var(--green);
  color: var(--cream);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--stone);
  opacity: 0.5;
}

.form-actions {
  margin-top: 1rem;
}

/* Contact details under form */
.contact-aside {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(247, 244, 239, 0.3);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  line-height: 2.2;
}

.contact-aside a:hover {
  color: var(--cream);
}

/* ------------------------------------------------------------
   13. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background-color: var(--green);
  border-top: 1px solid rgba(247, 244, 239, 0.2);
  padding: clamp(3.5rem, 7vw, 5rem) 0 2.5rem;
  color: var(--stone);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--serif);
  font-variant: small-caps;
  letter-spacing: 0.22em;
  font-size: 1.1rem;
  color: var(--cream);
}

.footer-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.footer-nav {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--cream);
}

/* Footer contact — email, phone, Instagram */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.footer-contact a {
  color: var(--stone);
  transition: color 0.3s ease;
}

.footer-contact a:hover {
  color: var(--cream);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(247, 244, 239, 0.15);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

/* ------------------------------------------------------------
   14. RESPONSIVE — breakpoint 768px
   ------------------------------------------------------------ */
@media (max-width: 768px) {

  /* Hamburger menu */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 340px);
    background-color: var(--green);
    border-left: 1px solid rgba(247, 244, 239, 0.2);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2.5rem;
    padding: 3rem var(--gutter);
    transform: translateX(100%);
    transition: transform 0.4s ease;
  }

  .nav-menu.is-open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    gap: 1.8rem;
  }

  .nav-links a {
    font-size: 0.95rem;
  }

  .logo-img {
    height: 36px;
  }

  /* Hamburger -> X when open */
  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Stack grids */
  .split,
  .split--text-only {
    grid-template-columns: 1fr;
  }

  .services-preview {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  /* En móvil dejamos que el titular envuelva solo, sin el salto forzado */
  .hero h1 {
    max-width: 14ch;
  }
  .hero h1 br {
    display: none;
  }

  .service-detail {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Keep the photograph on top when stacked, regardless of side */
  .service-detail--img-right .service-detail__media {
    order: 0;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* Small tweak for very narrow screens */
@media (max-width: 420px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   15. PHOTOGRAPHY
   Real studio imagery — feature blocks, service & project photos
   ------------------------------------------------------------ */

/* Generic feature image inside a .split column */
.feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* When a .split holds one image + one text column, give the image
   a defined shape so the row keeps its proportion */
.feature-figure {
  margin: 0;
  overflow: hidden;
}

.feature-figure--wide .feature-img { aspect-ratio: 4 / 3; }
.feature-figure--tall .feature-img { aspect-ratio: 3 / 4; }
.feature-figure--vertical .feature-img { aspect-ratio: 9 / 16; }
.feature-figure--portrait .feature-img { aspect-ratio: 4 / 5; }

/* Closing CTA with photographic background + flat green veil.
   The image itself is set inline per section (background-image). */
.cta-bg {
  position: relative;
  background-size: cover;
  background-position: center;
}

.cta-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(31, 61, 43, 0.6);
}

.cta-bg > .container {
  position: relative;
  z-index: 1;
}

/* Service detail — photograph above the descriptive text */
.service-detail__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin-bottom: 2.4rem;
}

/* Project cards — swap the placeholder block for a real photo */
.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder cards still pending photography read as intentional */
.project-thumb--pending {
  position: relative;
}

.project-thumb--pending::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--green);
  opacity: 0.7;
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
  }
}
