/* Self-hosted fonts — Anton (display) + JetBrains Mono (technical labels) + Work Sans (body).
   Replaces Google Fonts: privacy/GDPR + perf. Anton is a single-weight display face (no other
   cuts exist). JetBrains Mono + Work Sans ship as variable fonts covering 300-700 in one file.
   woff2 in /fonts/; preload the critical faces in <head>. */
@font-face { font-family: 'Anton'; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/anton-400.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/jetbrainsmono-var.woff2) format('woff2-variations'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/worksans-var.woff2) format('woff2-variations'); }

/* ==========================================================================
   Pizeta Workshop — Design System
   Brand-led palette: primary #1C1B18 (AA on cream), primary-dark #000000 (AAA).
   Replace primary swatches if shifting aesthetic; keep contrast ratios.
   ========================================================================== */

:root {
  /* Palette — brand */
  --primary: #1C1B18;
  --primary-dark: #000000;
  --primary-surface: #DCDCDC;     /* tinted panel background */

  /* Neutral system */
  --cream: #F5F0E8;
  --cream-dark: #EDE7DB;
  --linen: #FAF7F2;
  --earth: #2C2418;
  --earth-mid: #4A3D2E;
  /* Two-token stone — no single warm-gray clears AA on BOTH cream and earth. */
  --stone: #74684F;        /* 4.78:1 on --cream — use for body labels, small captions, meta on cream/cream-dark */
  --stone-light: #B5A998;  /* 6.58:1 on --earth — use for footer body text, hint copy on dark sections */
  --white: #FFFCF7;

  /* Accent — pick a BOLD accent per build (frontend principles). Defaults to the brand
     primary (monochrome) — NO imposed terracotta. Pass --accent / --accent-dark /
     --accent-on-dark to scaffold.py for a contrasting accent; target ≥4.5:1 on cream
     (small text) and ≥5:1 for accent-on-dark. */
  --accent: #0F5257;
  --accent-dark: #073B3F;
  --accent-on-dark: #5FBFC4;

  /* Typography — industrial/racing workshop direction (NEVER Inter/Roboto/Arial).
     Anton: heavy condensed display, race-livery feel, for h1/hero/big numbers.
     JetBrains Mono: technical labels, eyebrows, specs, prices — mechanical edge.
     Work Sans: clean grotesk body, readable at length. */
  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  /* Sizes */
  --container: 1120px;
  --container-narrow: 720px;
  --radius: 6px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(44, 36, 24, 0.08);
  --shadow-md: 0 4px 12px rgba(44, 36, 24, 0.1);
  --shadow-lg: 0 8px 24px rgba(44, 36, 24, 0.12);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--earth);
  background: var(--linen);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--earth);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.7rem); }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-alt { padding: 5rem 0; background: var(--cream); }
.section-dark { padding: 5rem 0; background: var(--earth); color: var(--cream); }
.section-dark h2, .section-dark h3 { color: var(--cream); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: var(--stone); font-size: 1.1rem; margin-top: 0.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 500; font-size: 0.95rem;
  text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

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

.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--white); }

.btn-ghost { background: transparent; color: var(--earth); border-color: var(--stone-light); }
.btn-ghost:hover { border-color: var(--earth); color: var(--earth); }

.btn-whatsapp { background: #075E54; color: #fff; border-color: #075E54; }  /* WhatsApp accessible dark teal — white text passes WCAG AA (7.5:1); brand-compliant variant of the iconic green */
.btn-whatsapp:hover {
  background: #20BD5A; border-color: #20BD5A; color: #fff;
  transform: translateY(-1px);
}

.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; }

/* Header & Nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 242, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-dark);
}

.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.01em;
  color: var(--earth); text-decoration: none;
  display: flex; align-items: center; gap: 0.4rem;
}

.site-logo:hover { color: var(--primary-dark); }

/* Icon system — sprite referenced via <use>, recoloured via currentColor.
   Swap #brand in images/icons.svg per client; add utility icons at the same
   24-grid / 1.75-stroke standard (design_audit.py checks this cohesion). */
.logo-mark { width: 26px; height: 26px; color: var(--primary); flex: 0 0 auto; }
.ico { width: 1.4rem; height: 1.4rem; color: var(--primary); flex: 0 0 auto; vertical-align: middle; }
.ico-sm { width: 1rem; height: 1rem; }
.ico-lg { width: 2.4rem; height: 2.4rem; color: var(--accent); }

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.service-card h3 { margin: 1rem 0 0.6rem; font-size: 1.1rem; }
.service-card p { color: var(--stone); font-size: 0.92rem; margin: 0; }

@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin-top: 2rem;
}

.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Contact page — info cards */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.contact-info-card {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.contact-info-card .ico { color: var(--accent); flex: 0 0 auto; margin-top: 0.2rem; }
.contact-info-card strong { display: block; margin-bottom: 0.3rem; font-size: 0.95rem; }
.contact-info-card p { color: var(--stone); font-size: 0.9rem; margin: 0; }
.contact-info-card a { color: var(--stone); }
.contact-info-card a:hover { color: var(--accent); }

@media (max-width: 700px) {
  .contact-info-grid { grid-template-columns: 1fr; }
}

/* About page — story + image side by side */
.about-story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.about-story-img { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.about-story-img img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 800px) {
  .about-story { grid-template-columns: 1fr; gap: 2rem; }
  .about-story-img { order: -1; max-height: 340px; }
}

.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }

.nav-links a {
  font-size: 0.9rem; font-weight: 500;
  color: var(--earth-mid); text-decoration: none;
  position: relative; transition: color 0.2s;
}

.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.nav-links a:hover { color: var(--primary-dark); }
.nav-links a:hover::after { width: 100%; }

.nav-links .nav-cta {
  padding: 0.5rem 1.2rem;
  background: var(--accent); color: var(--white);
  border-radius: var(--radius); font-weight: 600;
}
.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover { background: var(--accent-dark); color: var(--white); }

.lang-switch {
  font-size: 0.8rem; font-weight: 600;
  color: var(--stone);
  border: 1px solid var(--stone-light);
  padding: 0.25rem 0.6rem; border-radius: 3px;
  text-decoration: none;
}
.lang-switch:hover { color: var(--earth); border-color: var(--earth); }

/* Hero */
.hero {
  position: relative; min-height: 85vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  background: var(--earth);
}

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.55;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(44, 36, 24, 0.3) 0%, rgba(44, 36, 24, 0.6) 100%);
}

.hero-content {
  position: relative; z-index: 2;
  max-width: 700px; padding: 2rem;
}

.hero-content h1 {
  color: var(--cream);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 400; letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

.hero-content p {
  color: var(--cream-dark);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-bottom: 2rem; line-height: 1.6;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Editorial accents — eyebrow, olive rule. Eyebrow uses the mono face for a technical/spec-sheet feel. */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  position: relative; padding: 0 1.4rem;
}
.eyebrow::before, .eyebrow::after {
  content: ''; position: absolute; top: 50%;
  width: 0.9rem; height: 1px; background: var(--primary);
}
.eyebrow::before { left: 0; }
.eyebrow::after { right: 0; }

.olive-rule {
  display: block; width: 72px; height: 1px;
  background: var(--primary); margin: 1.5rem auto 0;
  position: relative;
}
.olive-rule::after {
  content: ''; position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 6px; height: 6px;
  background: var(--primary); border-radius: 50%;
}

/* Footer */
.site-footer {
  background: var(--earth);
  color: var(--stone-light);
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto; padding: 0 1.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.01em;
  color: var(--cream); margin-bottom: 0.5rem;
}

.footer-contacts { margin-top: 0.8rem; font-size: 0.9rem; }
.footer-contacts a { color: var(--cream); }
.footer-contacts a:hover { color: var(--accent-on-dark); }

.footer-bottom {
  border-top: 1px solid var(--earth-mid);
  padding-top: 1.5rem; margin-top: 2rem;
  font-size: 0.8rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}

.footer-bottom a { color: var(--stone-light); }
.footer-bottom a:hover { color: var(--cream); }

/* Honeypot — invisible to humans, auto-filled by bots */
.honeypot-field {
  position: absolute;
  left: -10000px; top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Forms */
.form-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.form-group { display: flex; flex-direction: column; margin-bottom: 1rem; }

.form-group label {
  font-size: 0.85rem; font-weight: 500;
  color: var(--earth-mid);
  margin-bottom: 0.3rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--earth);
  background: var(--linen);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 27, 24, 0.12);
}

.form-error {
  background: #FEF2F2; color: #B91C1C;
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem; font-size: 0.9rem;
}

/* Scroll fade-in */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible { opacity: 1; transform: translateY(0); }

noscript ~ .fade-in,
html:not(.js-loaded) .fade-in { opacity: 1; transform: none; }

/* Isla Studio web design standards */
:root { color-scheme: light; }

a, button, input[type="submit"], .btn { touch-action: manipulation; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-in { opacity: 1; transform: none; }
}

/* Hamburger hidden on desktop by default; the mobile media query below switches it back on.
   a11y: 44x44 tap target regardless of breakpoint. */
.nav-toggle { display: none; min-width: 44px; min-height: 44px; }

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--linen);
    flex-direction: column;
    padding: 1.5rem; gap: 1rem;
    border-bottom: 1px solid var(--cream-dark);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }

  .hero { min-height: 70vh; }
  .hero-content h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); }

  .section { padding: 3rem 0; }

  .footer-bottom { flex-direction: column; text-align: center; }

  /* Mobile audit lesson (Castelbio 2026-05-31):
     If you add any 7-column grid with aspect-ratio:1/1 + min-height, override min-height
     here. At 375 viewport with 24px container padding + component padding + gaps, each
     cell of a 7-col grid has ≈40px available. min-height >50 = overflow.
     Standard override pattern:
     .cell { min-height: 36px; max-height: 56px; }
     .grid { gap: 0.2rem; }
  */
}
