/* ============================================
   Design tokens
   ============================================ */
:root {
  --bg: #F1F2EA;
  --card-bg: #FBFBF7;
  --ink: #171911;
  --ink-muted: #5B5F4E;
  --accent: #2B6E63;
  --accent-warm: #E3A96B;
  --line: #E1E3D4;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --max-width: 760px;
  --radius: 22px;

  --shadow-sm: 0 1px 2px rgba(23, 25, 17, 0.06);
  --shadow-md: 0 12px 32px -8px rgba(23, 25, 17, 0.14);
}

/* ============================================
   Reset & base
   ============================================ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.accent-grad {
  background: linear-gradient(100deg, var(--accent) 20%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================
   Top navigation (sticky, on every page)
   ============================================ */
.topnav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 242, 234, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topnav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 26px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a { color: var(--ink-muted); }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent); }

.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  flex-shrink: 0;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 13px;
  border-radius: 999px;
  display: inline-block;
  color: var(--ink-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.lang-btn:hover { color: var(--accent); }
.lang-btn[aria-current="page"] { background: var(--accent); color: var(--bg); }
.lang-btn[aria-current="page"]:hover { color: var(--bg); }

/* ============================================
   Layout
   ============================================ */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 64px;
}

.card {
  margin-top: 28px;
  padding: 40px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 48px);
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.page-lede {
  font-size: 18px;
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0 0 8px;
}

/* ============================================
   Hero (Hello page)
   ============================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 40px 48px;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
}

.blob-1 {
  width: 420px;
  height: 420px;
  top: -180px;
  right: -140px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 72%);
  opacity: 0.28;
  animation: float-a 24s ease-in-out infinite;
}

.blob-2 {
  width: 320px;
  height: 320px;
  bottom: -160px;
  left: -100px;
  background: radial-gradient(circle, var(--accent-warm) 0%, transparent 72%);
  opacity: 0.24;
  animation: float-b 28s ease-in-out infinite;
}

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -24px) scale(1.06); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.3fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

.pitch {
  font-size: 20px;
  color: var(--ink-muted);
  max-width: 46ch;
  margin: 0 0 36px;
}
.pitch strong { font-weight: 600; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-photo { display: flex; justify-content: center; }

.portrait {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

/* ============================================
   Statement block (big editorial line)
   ============================================ */
.statement-block { margin: 12px 0 8px; padding: 0 40px; }

.statement {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(23px, 3vw, 31px);
  line-height: 1.42;
  color: var(--ink);
  max-width: 62ch;
  margin: 0;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-block;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary { background: var(--accent); color: var(--bg); box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-ghost { background: var(--card-bg); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.btn:active { transform: translateY(0); }

/* ============================================
   Section tags
   ============================================ */
.tag {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 18px;
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  margin: 0 0 12px;
}

/* ============================================
   Project cards (used on Hello teaser + Progetti/Projects list)
   ============================================ */
.project {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}

.project-img {
  width: 260px;
  border-radius: 16px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.project-copy { flex: 1; min-width: 240px; }
.project-copy p { color: var(--ink-muted); margin: 0; }

.project-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; padding: 0; list-style: none; }
.project-tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

.view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
}
.view-all:hover { text-decoration: underline; }

/* ============================================
   Contact page
   ============================================ */
.contact-row {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 15px;
  margin-top: 8px;
}
.contact-row a {
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.15s ease;
}
.contact-row a:hover { border-color: var(--accent); }

.form-placeholder {
  border: 1.5px dashed var(--line);
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
  color: var(--ink-muted);
}
.form-placeholder p { margin: 0 0 8px; }
.form-placeholder-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #A7AB94;
}

.form-embed { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.form-embed iframe { display: block; width: 100%; border: none; }

/* ============================================
   Footer
   ============================================ */
footer {
  margin-top: 40px;
  padding: 32px 40px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
}
footer p { margin: 0 0 4px; }
.footer-note { color: #A7AB94; }

.social-row { display: flex; gap: 16px; margin-top: 16px; }
.social-row a { color: var(--ink-muted); display: inline-flex; }
.social-row a:hover { color: var(--accent); }
.social-row svg { width: 20px; height: 20px; }

/* ============================================
   Scroll reveal
   ============================================ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .portrait { max-width: 180px; }
  .statement-block { padding: 0 8px; }
}

@media (max-width: 620px) {
  .topnav { flex-wrap: wrap; justify-content: center; text-align: center; padding: 14px 20px; }
  .nav-links { order: 3; width: 100%; justify-content: center; gap: 20px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
}

@media (max-width: 560px) {
  .page { padding: 40px 16px 48px; }
  .hero { padding: 28px 24px 36px; }
  .card { padding: 28px; }
  .project { flex-direction: column; align-items: flex-start; }
  .project-img { width: 100%; }
  footer { padding: 24px 8px 0; }
  .blob-1, .blob-2 { display: none; }
}
