/* ============================================================
   ZAAF architetti — zaafarchitetti.com
   Editorial minimalism · warm paper · ink · Venetian earth
   ============================================================ */

:root {
  --paper: #f6f3ec;
  --paper-deep: #efeadf;
  --ink: #1a1815;
  --ink-soft: #4a463f;
  --muted: #706a5f;
  --terra: #9a4526;
  --line: rgba(26, 24, 21, 0.16);
  --line-soft: rgba(26, 24, 21, 0.08);
  --serif: "Bodoni Moda", "Didot", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 38em;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, 0.93rem + 0.3vw, 1.0938rem);
  line-height: 1.7;
  font-feature-settings: "liga", "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--terra); color: var(--paper); }

a { color: inherit; }

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

/* ---------- drawing-sheet frame ---------- */
.sheet {
  position: relative;
  min-height: 100vh;
  border-inline: 1px solid var(--line-soft);
  max-width: 1440px;
  margin-inline: auto;
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand img { width: 34px; height: 34px; display: block; }

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.brand-name span { font-weight: 300; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 2rem);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.3rem;
  background-image: linear-gradient(var(--terra), var(--terra));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s;
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); background-size: 100% 1px; }

.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  border: 1px solid var(--line);
  border-radius: 2rem;
  padding: 0.28rem 0.75rem;
}
.lang a, .lang span { text-decoration: none; color: var(--muted); }
.lang [aria-current] { color: var(--terra); font-weight: 500; }
.lang a:hover { color: var(--ink); }

/* hide text links on small screens, keep lang switch */
@media (max-width: 720px) {
  .site-nav .nav-link { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(4.5rem, 12vh, 9rem) var(--gutter) clamp(4rem, 10vh, 7rem);
  overflow: hidden;
}

/* vertical hairlines — technical drawing feel */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line-soft);
}
.hero::before { left: calc(var(--gutter) - 0.75rem); }
.hero::after { right: 22%; }

.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 0 0 1.6rem;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(2.5rem, 1.2rem + 5.8vw, 5.8rem);
  line-height: 1.06;
  letter-spacing: 0.002em;
  max-width: 11em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--terra);
}

.hero .lede {
  margin: 2.2rem 0 0;
  max-width: var(--measure);
  font-size: clamp(1.05rem, 0.97rem + 0.4vw, 1.2rem);
  line-height: 1.75;
  color: var(--ink-soft);
}

.hero-meta {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.55em; }
.hero-meta i {
  font-style: normal;
  width: 1.4em; height: 1px;
  background: var(--terra);
  display: inline-block;
}

/* staggered entrance */
@media (prefers-reduced-motion: no-preference) {
  .rise {
    opacity: 0;
    transform: translateY(1.2rem);
    animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .rise:nth-child(2) { animation-delay: 0.12s; }
  .rise:nth-child(3) { animation-delay: 0.24s; }
  .rise:nth-child(4) { animation-delay: 0.36s; }
  @keyframes rise { to { opacity: 1; transform: none; } }

  .js .reveal {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- sections ---------- */
section { border-top: 1px solid var(--line); }

.sec {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.8rem;
  padding: clamp(3.2rem, 9vh, 6.5rem) var(--gutter);
}

@media (min-width: 880px) {
  .sec { grid-template-columns: 16rem minmax(0, 1fr); gap: 3rem; }
}

.sec-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 0.9em;
}
.sec-label .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--terra);
  letter-spacing: 0;
}

.sec h2 {
  margin: 0 0 1.3rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: 0.002em;
  max-width: 18em;
  text-wrap: balance;
}

.sec p { max-width: var(--measure); margin: 0 0 1.1rem; }
.sec p:last-child { margin-bottom: 0; }

.sec .accent { color: var(--terra); font-style: italic; }

/* ---------- fields / ambiti ---------- */
.fields {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  counter-reset: field;
  padding: 0; margin: 0.4rem 0 0;
  list-style: none;
  max-width: 56rem;
}
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } }

.fields li {
  counter-increment: field;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 1.5rem 1.5rem;
  position: relative;
  transition: background 0.35s ease;
}
.fields li:hover { background: var(--paper-deep); }

.fields li::before {
  content: counter(field, decimal-leading-zero);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--terra);
  display: block;
  margin-bottom: 0.55rem;
}

.fields h3 {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: 0.005em;
}

.fields p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- founders ---------- */
.founders {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.2rem, 5vw, 4rem);
  max-width: 62rem;
}
@media (min-width: 880px) { .founders { grid-template-columns: 1fr 1fr; } }

.founder {
  border-top: 2px solid var(--ink);
  padding-top: 1.3rem;
}

.founder h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.005em;
}

.founder .role {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 0.5rem 0 1.1rem;
}

.founder p {
  font-size: 1rem;
  line-height: 1.68;
  color: var(--ink-soft);
  margin: 0 0 0.9rem;
}
.founder p:last-child { margin-bottom: 0; }

/* ---------- contacts ---------- */
.contact-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  max-width: 34rem;
}

.contact-list li {
  border-bottom: 1px solid var(--line);
  padding: 1.05rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
}
.contact-list li:first-child { border-top: 1px solid var(--line); }

.contact-list .who {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list a {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem);
  text-decoration: none;
  background-image: linear-gradient(var(--terra), var(--terra));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s;
  word-break: break-word;
}
.contact-list a:hover, .contact-list a:focus-visible { color: var(--terra); background-size: 100% 1px; }

.place {
  margin-top: 2.2rem;
  font-style: italic;
  color: var(--muted);
}

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  padding: 2rem var(--gutter) 2.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.5rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.site-foot .foot-mark {
  display: flex; align-items: center; gap: 0.6rem;
}
.site-foot img { width: 22px; height: 22px; opacity: 0.85; }

.site-foot a { color: inherit; text-decoration: none; }
.site-foot a:hover { color: var(--terra); }

/* ---------- accessibility ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-family: var(--sans);
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
