:root {
  --bg: #f4f1ec;
  --bg-alt: #ece6dd;
  --card: #fbf9f6;
  --ink: #2e2620;
  --muted: #6f6359;
  --line: #d9cbb8;
  --accent: #9c5a33;
  --accent-dark: #7d4424;
  --accent-soft: #f0e2d4;
  --ia: #3f6b5c;
  --ia-soft: #dfeae5;
  --dot: #cdbfae;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .06);
  --serif: "Josefin Slab", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.eyebrow {
  font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: .6em;
}
.sub, .lead { color: var(--muted); }
.lead { font-size: 1.12rem; max-width: 640px; margin: 0 auto 2em; }

/* Buttons */
.btn {
  display: inline-block; padding: .8em 1.5em; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
  border: 1.5px solid var(--accent); cursor: pointer; font: inherit; font-weight: 600;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }
.btn-small { padding: .45em 1.1em; font-size: .9rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 241, 236, .88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem; letter-spacing: .12em;
  color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: .5em;
}
.brand-mark {
  font-family: var(--sans); font-size: .7rem; letter-spacing: 0; color: var(--muted);
  border: 1.5px solid var(--line); border-radius: 6px; padding: .15em .45em;
}
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:not(.btn):hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links a { padding: 14px 16px; width: 100%; text-align: center; }
  .nav-links .btn { width: auto; margin: 8px 0 16px; }
  .nav.open .nav-links { max-height: 400px; }
  .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 { padding: 56px 0 72px; text-align: center; }
.hero-logo { width: min(420px, 90%); margin: 0 auto 28px; mix-blend-mode: multiply; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats {
  list-style: none; padding: 0; margin: 56px auto 0; max-width: 680px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.stats li { padding: 16px 8px; border-top: 2px solid var(--accent); }
.stats strong { display: block; font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--accent); }
.stats span { font-size: .85rem; color: var(--muted); }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: rgba(236, 230, 221, .75); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.card, .project {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover, .project:hover { transform: translateY(-3px); border-color: var(--accent); }
.card p, .project p { color: var(--muted); font-size: .95rem; }
.icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft);
  display: grid; place-items: center; margin-bottom: 18px;
}
.icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px; }
.filter {
  font: inherit; font-size: .9rem; padding: .45em 1.1em; border-radius: 999px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); transition: .2s;
}
.filter:hover { border-color: var(--accent); }
.filter.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.project { display: flex; flex-direction: column; }
.project.is-hidden { display: none; }
.project-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; padding: .25em .7em; border-radius: 6px;
  background: var(--accent); color: #fff;
}
.tag-soft { background: var(--accent-soft); color: var(--accent-dark); }
.tag-ia { background: var(--ia-soft); color: var(--ia); }
.feat { list-style: none; padding: 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.feat li {
  font-size: .78rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: .2em .6em;
}

/* Steps */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}
.steps li { padding: 24px; border-left: 2px solid var(--accent); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }
.num { font-family: var(--serif); font-size: 2.2rem; color: var(--line); font-weight: 700; display: block; line-height: 1; margin-bottom: 10px; }

/* Chips */
.chips { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 860px; }
.chips li {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: .5em 1.1em; font-weight: 500; font-size: .92rem;
}

/* Contact */
.contact { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .contact { grid-template-columns: 1fr 1fr; gap: 64px; } }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list span { font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.contact-list a { text-decoration: none; font-weight: 600; word-break: break-word; }
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 16px; }
.form input, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: .75em .9em; font: inherit; font-weight: 400;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; resize: vertical;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form-note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .88rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer .brand { font-size: 1.1rem; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
