/* Fàsach Eco Builds — site styles */
:root {
  --ink: #1d2420;
  --ink-soft: #4a544e;
  --paper: #f6f3ec;
  --paper-2: #ece7dc;
  --forest: #23382d;
  --forest-2: #2f4a3c;
  --larch: #b8793a;
  --larch-soft: #e9d6bf;
  --line: #d9d2c3;
  --white: #fff;
  --radius: 6px;
  --max: 1160px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
a { color: var(--forest-2); }
a:hover { color: var(--larch); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .6em; color: var(--forest); }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--larch);
  margin-bottom: .9em; display: block;
}
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 46em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 243, 236, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { text-decoration: none; color: var(--forest); display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.brand span { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--larch); }
.nav a.btn { color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--forest); margin: 5px 0; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav a.btn { margin-top: 14px; width: auto; border: 0; padding: 12px 22px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--forest); color: var(--white);
  padding: 13px 26px; border-radius: var(--radius); text-decoration: none;
  font-weight: 600; font-size: .95rem; border: 0; cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--larch); color: var(--white); }
.btn.ghost { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,.6); }
.btn.ghost:hover { background: var(--white); color: var(--forest); }
.btn.light { background: var(--white); color: var(--forest); }
.btn.light:hover { background: var(--larch); color: var(--white); }

/* ---------- Image frames (show a tinted panel if a photo is missing) ---------- */
.frame { position: relative; background: var(--forest-2); overflow: hidden; border-radius: var(--radius); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame.noimg { background: linear-gradient(135deg, var(--forest-2), var(--forest)); }
.frame.noimg::after {
  content: attr(data-label); position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; text-align: center; padding: 20px;
  color: rgba(255,255,255,.55); font-family: var(--serif); font-size: 1.1rem;
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; color: var(--white); }
.hero .frame { position: absolute; inset: 0; border-radius: 0; }
.hero .frame::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,30,25,.15) 0%, rgba(20,30,25,.75) 100%);
}
.hero .frame.noimg::after { display: none; }
.hero-content { position: relative; z-index: 2; padding: 120px 0 80px; }
.hero h1 { color: var(--white); max-width: 15em; }
.hero p { font-size: 1.2rem; max-width: 36em; color: rgba(255,255,255,.9); }
.hero .eyebrow { color: var(--larch-soft); }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.page-hero { background: var(--forest); color: var(--white); padding: 90px 0 70px; }
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: rgba(255,255,255,.82); }
.page-hero .eyebrow { color: var(--larch-soft); }

/* ---------- Sections ---------- */
section { padding: 90px 0; }
section.tint { background: var(--paper-2); }
section.dark { background: var(--forest); color: rgba(255,255,255,.88); }
section.dark h2, section.dark h3 { color: var(--white); }
.section-head { max-width: 760px; margin-bottom: 48px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 32px; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  section { padding: 64px 0; }
}
@media (max-width: 540px) { .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.card h3 { margin-bottom: .4em; }
.card .num { font-family: var(--serif); font-size: 2rem; color: var(--larch); line-height: 1; margin-bottom: 12px; }
section.dark .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); }
section.dark .card p { color: rgba(255,255,255,.8); }

.stat { border-top: 2px solid var(--larch); padding-top: 16px; }
.stat strong { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 500; color: var(--forest); line-height: 1.1; }
.stat span { font-size: .92rem; color: var(--ink-soft); }
section.dark .stat strong { color: var(--white); }
section.dark .stat span { color: rgba(255,255,255,.7); }

.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px solid var(--line); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--larch); border-bottom: 2px solid var(--larch); transform: rotate(-45deg); }
section.dark .ticks li { border-color: rgba(255,255,255,.14); }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.4em; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; font-size: .95rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--forest); color: var(--white); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.good { color: var(--forest-2); font-weight: 600; }

/* ---------- Build-ups ---------- */
.buildup { counter-reset: layer; list-style: none; padding: 0; margin: 0; }
.buildup li { counter-increment: layer; display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.buildup li::before {
  content: counter(layer); flex: 0 0 28px; height: 28px; border-radius: 50%;
  background: var(--larch-soft); color: var(--forest); font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 70px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.step .n { font-family: var(--serif); font-size: 2.2rem; color: var(--larch); line-height: 1; }
.step h3 { margin-bottom: .3em; }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 900px) { .projects { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .projects { grid-template-columns: 1fr; } }
.project-card { text-decoration: none; color: var(--ink); display: block; }
.project-card .frame { aspect-ratio: 4 / 3; margin-bottom: 16px; }
.project-card .frame img { transition: transform .5s; }
.project-card:hover .frame img { transform: scale(1.04); }
.project-card h3 { margin-bottom: .2em; }
.project-card:hover h3 { color: var(--larch); }
.project-card .meta { font-size: .9rem; color: var(--ink-soft); }
.project-card .tag {
  position: absolute; top: 14px; left: 14px; z-index: 2; background: var(--white);
  color: var(--forest); font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 3px;
}
.project-card.soon .frame { opacity: .75; }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.specs div { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.specs dt { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.specs dd { margin: 0; font-family: var(--serif); font-size: 1.15rem; color: var(--forest); }

.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-auto-rows: 260px; gap: 16px; }
.gallery .frame:first-child { grid-row: span 2; }
@media (max-width: 700px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gallery .frame:first-child { grid-row: auto; }
}

.callout { background: var(--larch-soft); border-left: 4px solid var(--larch); padding: 22px 26px; border-radius: var(--radius); margin: 28px 0; }
.callout p:last-child { margin: 0; }

.project-nav { display: flex; justify-content: space-between; gap: 20px; padding-top: 30px; border-top: 1px solid var(--line); margin-top: 60px; flex-wrap: wrap; }
.project-nav a { text-decoration: none; font-weight: 600; }

/* ---------- Pricing formula ---------- */
.formula { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; margin: 30px 0; }
.formula .part { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 28px; text-align: center; min-width: 170px; }
.formula .part strong { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--forest); }
.formula .part span { font-size: .85rem; color: var(--ink-soft); }
.formula .op { font-family: var(--serif); font-size: 2rem; color: var(--larch); }
section.dark .formula .part { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); }
section.dark .formula .part strong { color: var(--white); }
section.dark .formula .part span { color: rgba(255,255,255,.7); }

/* ---------- Contact ---------- */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { form .row { grid-template-columns: 1fr; } }
label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--forest); }
input, textarea, select {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink);
  margin-bottom: 18px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--larch); outline-offset: 0; border-color: var(--larch); }
textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--ink-soft); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list strong { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; }

/* ---------- CTA band ---------- */
.cta { background: var(--larch); color: var(--white); padding: 70px 0; }
.cta .wrap { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta h2 { color: var(--white); margin: 0 0 .2em; }
.cta p { margin: 0; color: rgba(255,255,255,.9); }

/* ---------- Footer ---------- */
.site-footer { background: #17221c; color: rgba(255,255,255,.7); padding: 60px 0 30px; font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.site-footer a { color: rgba(255,255,255,.8); text-decoration: none; }
.site-footer a:hover { color: var(--larch-soft); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.site-footer .base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; font-size: .82rem; }
.site-footer .brand strong { color: var(--white); }
.site-footer .brand span { color: rgba(255,255,255,.55); }
