/* =========================
   DESIGN TOKENS
========================= */
:root {
  --bg: #efe5dc;
  --surface: #f3d8c7;
  --primary: #d0b8ac;
  --text: #5a5353;
  --title: #3a3633;
  --border: rgba(0, 0, 0, 0.12);

  --radius: 22px;
  --container: 1100px;
}

/* =========================
   RESET + BASE
========================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

img {
  display: block;
}

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

/* =========================
   ACCESSIBILITY
========================= */
.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: white;
  padding: 10px 14px;
  border-radius: 10px;
}

.skip-link:focus {
  left: 10px;
  z-index: 1000;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================
   TYPOGRAPHY
========================= */
h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  color: var(--title);
  line-height: 1.25;
  margin: 0 0 14px;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 14px;
}

.lead {
  font-size: 1.05rem;
}

.micro,
.muted {
  font-size: 0.95rem;
  color: rgba(90, 83, 83, 0.8);
}

/* =========================
   LAYOUT
========================= */
.container {
  padding: 0 20px;
}

.section {
  padding: 72px 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.soft {
  background: rgba(255, 255, 255, 0.35);
}

.divider {
  padding: 0;
}

.divider::before {
  content: "";
  display: block;
  width: 100%;
  max-width: 720px;
  height: 1px;
  margin: 0 auto;
  background: var(--text);
}

/* =========================
   HEADER + NAV (MOBILE)
========================= */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(239, 229, 220, 0.92);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand__name {
  font-weight: 600;
  color: var(--title);
}

.brand__role {
  font-size: 0.9rem;
}

.nav-toggle {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 18px;
}

.nav {
  display: none;
  position: absolute;
  top: 64px;
  right: 20px;
  background: #f7f3ee;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  width: 220px;
}

.nav a {
  display: block;
  padding: 10px;
  border-radius: 999px;
}

.nav__cta {
  background: var(--primary);
  margin-top: 8px;
  text-align: center;
}

.nav--open {
  display: block;
}

/* =========================
   HERO (MOBILE)
========================= */
.hero {
  text-align: center;
  padding-left: 0;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-media {
  order: -1;
}

.kicker {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.5);
  margin-bottom: 14px;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.hero-media img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
}

/* =========================
   BUTTONS
========================= */
.btn {
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 500;
  text-align: center;
  border: 1px solid transparent;
}

.btn--primary {
  background: var(--primary);
  color: var(--title);
}

.btn--ghost {
  border: 1px solid var(--border);
}

a,
.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a:hover,
.btn:hover {
  transform: translateY(-2px);
}

/* =========================
   QUOTE
========================= */
.quote {
  padding: 56px 0;
  background-color: var(--primary);
}

.quote blockquote {
  margin: 0;
  padding: 0;
  font-family: "Playfair Display", serif;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--title);
}

.quote footer {
  margin-top: 14px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.9rem;
  color: rgba(90, 83, 83, 0.75);
}

/* =========================
   CARDS / POSTS
========================= */
.services {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-top: 36px;
}

.service h3 {
  margin-bottom: 8px;
}

.service p {
  max-width: 55ch;
}

.posts {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.post-card {
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  padding: 22px;
}

.post-meta {
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.bridge {
  text-align: center;
  padding: 56px 0;
}

.bridge p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
}

.image-break {
  padding: 30px 0;
}

.image-break img {
  width: 100%;
  max-width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

/* =========================
   TWO COL (MOBILE = STACK)
========================= */
.work {
  padding: 72px 0;
}

.work-block {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 72px;
}

.work-text {
  padding: 20px;
}

.work-media img {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: block;
  object-fit: cover;
}

/* =========================
   LIST
========================= */
.list {
  padding-left: 18px;
}

.list li {
  margin-bottom: 10px;
}

/* =========================
   CONTACT
========================= */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.details div {
  margin-bottom: 12px;
}

.form {
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  padding: 22px;
}

label {
  display: block;
  margin-bottom: 14px;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}

/* =========================
   FOOTER
========================= */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(239, 229, 220, 0.9);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 0;
  font-size: 0.9rem;
}

@media (max-width: 899px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .site-header .header-inner,
  .site-footer .footer-inner {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* =========================
   DESKTOP ENHANCEMENTS
========================= */
@media (min-width: 900px) {
  .header-inner {
    align-items: center;
  }

  .brand {
    line-height: 1.2;
  }

  .nav {
    align-items: center;
  }

  .nav a {
    display: flex;
    align-items: center;
    height: 40px;
  }

  .nav__cta {
    height: 36px;
    padding: 6px 18px;
    display: flex;
    align-items: center;
    position: relative;
    bottom: 4px;
  }

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

  .nav-toggle {
    display: none;
  }

  .nav {
    position: static;
    display: flex;
    background: none;
    border: none;
    width: auto;
    padding: 0;
    gap: 18px;
  }

  .hero {
    text-align: left;
    padding-left: calc((100vw - 1100px) / 2);
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 64px;
  }

  .hero-media {
    order: 0;
    transition: transform 1.2s ease;
  }

  .hero:hover .hero-media img {
    transform: scale(1.03);
  }

  .quote blockquote {
    text-align: center;
  }

  .services {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 64px;
  }

  .service p {
    max-width: 52ch;
  }

  .actions {
    flex-direction: row;
  }

  .cards,
  .posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  #come-lavoro .container {
    max-width: 1100px;
    margin: 0 auto;
  }

  .work {
    padding: 120px 0;
  }

  .work-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "text media";
    align-items: stretch;
    min-height: 420px;
  }

  .work-block + .work-block {
    margin-top: 56px;
  }

  /* BLOCCO INVERTITO */
  .work-block.reverse {
    grid-template-areas: "media text";
  }

  /* TESTO */
  .work-text {
    grid-area: text;
    max-width: 58ch;

    padding-left: calc((100vw - var(--container)) / 2);
    padding-right: 80px;

    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .work-block.reverse .work-text {
    padding-left: 80px;
    padding-right: calc((80vw - var(--container)) / 2);
    text-align: right;
  }

  /* EYEBROW */
  .eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(90, 83, 83, 0.6);
    margin-bottom: 18px;
  }

  /* IMMAGINI */
  .work-media {
    grid-area: media;
    height: 100%;
  }

  .work-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
  }

  .contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
