/* Creo Fundi — simplified, modern layout (2026).
   One stylesheet for every page. Mobile first; brand teal + warm orange on paper. */

:root {
  --bg: #fbf7f2;
  --paper: #fffdf9;
  --ink: #0c2320;
  --muted: #5a6964;
  --line: #ebe1d6;
  --fill: #f3eae0;
  --teal: #0a6b5a;
  --teal-dark: #08503f;
  --teal-soft: #dcefe9;
  --hot: #c9762f;
  --hot-soft: #f7e7d3;
  --radius: 22px;
  --radius-sm: 14px;
  --pill: 999px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --display: "Satoshi", "Plus Jakarta Sans", system-ui, sans-serif;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(12, 35, 32, 0.04), 0 8px 28px rgba(12, 35, 32, 0.06);
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: clip;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--hot-soft); }

h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.035em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 76px); }
h2 { font-size: clamp(30px, 4.4vw, 48px); }
h3 { font-size: 20px; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }
.accent { color: var(--teal); }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--hot); margin-bottom: 12px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 40ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--paper); padding: 10px 14px; border-radius: 10px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { max-width: 46ch; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px;
  border: 1px solid transparent; border-radius: var(--pill);
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: var(--paper); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow, .card-link:hover .arrow { transform: translateX(3px); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 247, 242, 0.82);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.03em; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav { display: none; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; padding: 3px; border-radius: var(--pill); background: var(--fill); font-size: 12px; font-weight: 700; }
.lang a, .lang span { min-width: 34px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--pill); text-decoration: none; }
.lang [aria-current="true"] { background: var(--paper); box-shadow: var(--shadow); }
.header-end .btn { display: none; }
.menu-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; display: inline-grid; place-items: center; cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform 0.2s ease, background 0.2s ease; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { display: none; }
/* The header's backdrop-filter would make it the containing block for the
   fixed menu (squashing it into the header and letting the page show through),
   so it is switched off while the menu is open. */
.menu-open .site-header { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--line); }
.menu-open .mobile-menu {
  display: flex; flex-direction: column; gap: 4px;
  position: fixed; top: 68px; left: 0; right: 0; bottom: 0; z-index: 39;
  padding: 16px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
}
.menu-open .quick-cta { display: none; }
.mobile-menu a:not(.btn) { padding: 14px 0; font-size: 22px; font-family: var(--display); text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 20px; }

/* Hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(48px, 7vw, 96px); }
.hero-grid { display: grid; gap: 36px; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 28px; }
.facts { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--pill); background: var(--paper); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.hero-media { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: 360px; }
.hero-media figure { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--fill); }
.hero-media figure:first-child { grid-row: span 2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media figcaption {
  position: absolute; left: 10px; bottom: 10px;
  padding: 6px 12px; border-radius: var(--pill);
  background: rgba(255, 253, 249, 0.92); font-size: 12px; font-weight: 600;
}

/* Service paths (bento) */
.paths { display: grid; gap: 14px; }
.path {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 380px; padding: 28px; border-radius: var(--radius); overflow: hidden;
  color: #fff; text-decoration: none; isolation: isolate;
}
.path img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.path::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 35, 32, 0) 25%, rgba(12, 35, 32, 0.82) 100%); }
.path:hover img { transform: scale(1.04); }
.path .tag { align-self: flex-start; margin-bottom: auto; padding: 6px 12px; border-radius: var(--pill); background: rgba(255, 253, 249, 0.92); color: var(--ink); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.path h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 8px; }
.path p { color: rgba(255, 255, 255, 0.86); max-width: 38ch; }
.path ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.path li { padding: 4px 10px; border-radius: var(--pill); background: rgba(255, 255, 255, 0.16); font-size: 13px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-weight: 600; }
.path-model {
  display: grid; gap: 20px; align-items: center;
  padding: 28px; border-radius: var(--radius); background: var(--teal-soft);
}
.path-model h3 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 8px; }
.path-model p { color: #24524a; max-width: 56ch; }

/* Work */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.work { margin: 0; }
.work[hidden] { display: none; }
.work button { all: unset; display: block; width: 100%; cursor: pointer; border-radius: var(--radius-sm); }
.work-img { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: hidden; background: var(--fill); }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.work button:hover .work-img img { transform: scale(1.04); }
.work-count { position: absolute; right: 10px; top: 10px; padding: 4px 10px; border-radius: var(--pill); background: rgba(12, 35, 32, 0.66); color: #fff; font-size: 12px; font-weight: 600; }
.work h3 { font-size: 16px; margin-top: 10px; }
.work p { font-size: 14px; color: var(--muted); }

/* Lightbox */
.lightbox { border: 0; padding: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: rgba(8, 20, 18, 0.94); color: #fff; }
.lightbox::backdrop { background: rgba(8, 20, 18, 0.6); }
.lb-inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; padding: 16px; gap: 12px; }
.lb-top { display: flex; align-items: center; gap: 12px; }
.lb-top h2 { font-size: 18px; letter-spacing: -0.01em; }
.lb-top .lb-count { color: rgba(255, 255, 255, 0.7); font-size: 14px; }
.lb-close { margin-left: auto; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.lb-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 22px; cursor: pointer; display: inline-grid; place-items: center; }
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-nav { display: flex; justify-content: center; gap: 12px; }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.steps li { padding: 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 18px; font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--hot); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 15px; }
.workshop { margin-top: 20px; padding: 18px 22px; border-radius: var(--radius); background: var(--fill); font-size: 15px; color: var(--muted); }
.workshop strong { color: var(--ink); }

/* Materials */
.materials { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.materials th, .materials td { padding: 16px 20px; text-align: left; vertical-align: top; font-size: 15px; }
.materials thead th { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--fill); }
.materials tbody tr + tr th, .materials tbody tr + tr td { border-top: 1px solid var(--line); }
.materials tbody th { font-family: var(--display); font-size: 18px; font-weight: 700; white-space: nowrap; }
.materials td:last-child { color: var(--muted); }

/* Contact + form */
.contact-grid { display: grid; gap: 28px; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--teal); }
.contact-list span { display: block; font-size: 13px; color: var(--muted); }
.form { display: grid; gap: 14px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--pill); background: var(--fill); }
.who button { min-height: 44px; border: 0; border-radius: var(--pill); background: transparent; font-weight: 600; cursor: pointer; }
.who button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.grid-2 { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg);
  font-size: 16px; transition: border-color 0.15s ease, background 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); background: #fff; }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.form-note { font-size: 13px; color: var(--muted); }
.form-note:empty { display: none; }
.form-status { font-weight: 600; color: var(--teal); }
.form-status.is-error { color: #9a3412; }
.form button[disabled] { opacity: 0.6; cursor: wait; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--radius-sm); background: var(--paper); border: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--teal); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--muted); }

/* Sub-page blocks */
.page-hero { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 64px); }
.page-hero .lead { max-width: 52ch; margin: 20px 0 28px; }
.cards { display: grid; gap: 12px; }
.card { padding: 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15px; }
.photo-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.photo-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
.cta-band { display: grid; gap: 20px; padding: clamp(28px, 5vw, 56px); border-radius: var(--radius); background: var(--ink); color: var(--paper); }
.cta-band p { color: rgba(255, 253, 249, 0.75); max-width: 50ch; }
.cta-band .btn-ghost { background: transparent; color: var(--paper); border-color: rgba(255, 253, 249, 0.3); }

/* Footer */
.site-footer { padding: 48px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 15px; }
.footer-grid { display: grid; gap: 28px; }
.footer-grid h3 { font-family: var(--font); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.footer-grid a { display: block; padding: 3px 0; text-decoration: none; }
.footer-grid a:hover { color: var(--teal); }
.legal { margin-top: 32px; font-size: 13px; color: var(--muted); }

/* Mobile quick action */
.quick-cta {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; box-shadow: 0 10px 30px rgba(12, 35, 32, 0.25); border-radius: var(--pill);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.quick-cta .btn { flex: 1; }
.quick-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }

/* Reveal on scroll (only when JS marks the page ready and motion is allowed) */
.js .rv { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.js .rv.is-in { opacity: 1; transform: none; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .photo-strip { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 900px) {
  body { font-size: 17px; }
  .nav { display: flex; gap: 28px; margin-left: 24px; }
  .menu-btn, .mobile-menu, .quick-cta { display: none !important; }
  .header-end .btn { display: inline-flex; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; }
  .hero-media { min-height: 0; height: clamp(440px, 62vh, 580px); }
  .paths { grid-template-columns: 1fr 1fr; }
  .path { min-height: 460px; }
  .path-model { grid-column: 1 / -1; grid-template-columns: 1fr auto; padding: 32px 36px; }
  .works { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }
  .faq-wrap { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cta-band { grid-template-columns: 1fr auto; align-items: center; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
@media (max-width: 639px) {
  .materials thead { display: none; }
  .materials, .materials tbody, .materials tr, .materials th, .materials td { display: block; }
  .materials tbody tr { padding: 16px 18px; }
  .materials tbody tr + tr { border-top: 1px solid var(--line); }
  .materials th, .materials td { padding: 2px 0; border: 0 !important; }
  .materials td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink); }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .rv { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
