/* ============================================================
   Sofàs Esteve — HTML5 rebuild
   Paleta: daurat #B3901C · negre #111 · gris #54595F
   Tipografia: Khand (headings/body) · serif per logo
   ============================================================ */

:root {
  --gold: #b3901c;
  --gold-dark: #94770f;
  --ink: #111111;
  --gray: #54595f;
  --gray-light: #7a7a7a;
  --line: #e2e2e2;
  --bg: #ffffff;
  --bg-alt: #f6f4ef;
  --maxw: 1140px;
  --radius: 4px;
  --shadow: 0 12px 40px rgba(0, 0, 0, .12);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Khand", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--gray);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.05; font-weight: 700; }
p { margin: 0; }
figure { margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; cursor: pointer; border: 2px solid transparent;
  font-family: "Khand", sans-serif; font-weight: 600;
  text-transform: uppercase; letter-spacing: 3px; font-size: 15px;
  padding: 13px 32px; border-radius: var(--radius);
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .15s var(--ease);
}
.btn-primary { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn:active { transform: translateY(1px); }

/* ---------- Logo / Brand ---------- */
.brand, .footer-brand {
  display: flex; flex-direction: column; line-height: 1;
  text-decoration: none; gap: 0;
}
.brand-sofas {
  font-family: "Khand", sans-serif; font-weight: 600;
  font-size: 14px; letter-spacing: 7px; color: var(--gold);
  text-transform: uppercase;
}
.brand-esteve {
  font-family: "Times New Roman", Georgia, serif; font-weight: 900;
  font-size: 32px; letter-spacing: 3px; color: var(--ink);
  text-transform: uppercase; line-height: .9;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(150%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }

.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  font-family: "Khand", sans-serif; font-weight: 600; font-size: 16px;
  text-transform: uppercase; letter-spacing: 2.5px; color: var(--ink);
  position: relative; padding: 6px 0;
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--gold); transition: width .25s var(--ease);
}
.nav-list a:hover::after, .nav-list a:focus::after { width: 100%; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--ink); margin: 5px 0;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (split layout) ---------- */
.hero { background: var(--bg-alt); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  min-height: clamp(480px, 76vh, 680px); padding-top: 64px; padding-bottom: 64px;
}
.eyebrow {
  font-family: "Khand", sans-serif; color: var(--gold);
  text-transform: uppercase; letter-spacing: 8px; font-weight: 600; font-size: 16px;
  margin-bottom: 16px;
}
.hero-title {
  font-family: "Times New Roman", Georgia, serif; color: var(--ink); font-weight: 900;
  font-size: clamp(48px, 5.5vw, 80px); line-height: .92; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 24px;
}
.hero-sub { max-width: 460px; font-size: 19px; color: var(--gray); margin-bottom: 36px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-media img {
  width: 100%; height: 100%; max-height: 560px; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-chaise { background: var(--bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-title {
  font-family: "Khand", sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(32px, 4.5vw, 46px); letter-spacing: 3px; margin-bottom: 16px;
  position: relative; padding-bottom: 20px;
}
.section-title::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 56px; height: 3px; background: var(--gold);
}
.section-text { font-size: 19px; letter-spacing: .3px; color: var(--gray); line-height: 1.65; }

/* ---------- Grids / Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  overflow: hidden; border-radius: var(--radius);
  box-shadow: var(--shadow); background: #fff;
  position: relative;
}
.card img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center;
  transition: transform .6s var(--ease);
}
.card:hover img { transform: scale(1.04); }

/* Aspect ratio on the card (not the img) so object-fit works */
.section-butaques .card { aspect-ratio: 3 / 4; }

/* Sofàs section: asymmetric layout — 1 large on top + 2 below.
   Sofàs are wide pieces, so cards are landscape, not portrait. */
.section-chaise .grid {
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "big   big"
    "left  right";
}
.section-chaise .card:nth-child(1) { grid-area: big;   aspect-ratio: 21 / 9; }
.section-chaise .card:nth-child(2) { grid-area: left;  aspect-ratio: 3 / 2; }
.section-chaise .card:nth-child(3) { grid-area: right; aspect-ratio: 3 / 2; }

/* ---------- Contact Form ---------- */
.section-contacte { background: var(--bg); }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px;
  max-width: 780px; margin: 0 auto;
}
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-family: "Khand", sans-serif; text-transform: uppercase; letter-spacing: 2px;
  font-size: 13px; font-weight: 700; color: var(--gray); margin-bottom: 8px;
}
.field input, .field textarea {
  font-family: "Khand", sans-serif; font-size: 17px; color: var(--ink);
  padding: 13px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(179,144,28,.15);
}
.field textarea { resize: vertical; min-height: 140px; }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-wrap { display: flex; justify-content: center; margin-top: 4px; }
.form-footer { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.btn-submit { min-width: 220px; }
.form-status { margin: 0; font-size: 16px; font-weight: 600; }
.form-status.is-ok    { color: #1f8a4c; }
.form-status.is-error { color: #c0392b; }
.contact-form.is-sending .btn-submit { opacity: .65; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: #131313; color: #9a9a9a; }
.footer-bottom .container {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; padding-top: 36px; padding-bottom: 36px;
}
.footer-brand .brand-sofas { color: var(--gold); font-size: 11px; letter-spacing: 6px; }
.footer-brand .brand-esteve { font-size: 22px; color: #fff; }
.footer-copy { font-size: 14px; letter-spacing: .5px; }
.to-top {
  font-family: "Khand", sans-serif; text-transform: uppercase;
  letter-spacing: 2px; font-size: 13px; color: var(--gold);
}
.to-top:hover { color: #fff; }

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  max-width: 780px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow); border-radius: var(--radius); padding: 18px 24px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { flex: 1; min-width: 220px; font-size: 16px; margin: 0; }
.cookie-banner .btn { padding: 10px 24px; white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-list {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; box-shadow: var(--shadow);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
    z-index: 110;
  }
  .nav-list.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-list li { width: 100%; }
  .nav-list a { display: block; width: 100%; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav-list li:last-child a { border-bottom: 0; }

  .hero-grid { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding-top: 48px; padding-bottom: 56px; }
  .hero-media { order: -1; }
  .hero-media img { max-height: 360px; }

  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  /* On tablet, stack the asymmetric sofa grid into a single column */
  .section-chaise .grid {
    grid-template-columns: 1fr;
    grid-template-areas: "big" "left" "right";
  }
  .section-chaise .card:nth-child(1) { aspect-ratio: 16 / 9; }
  .section-chaise .card:nth-child(2),
  .section-chaise .card:nth-child(3) { aspect-ratio: 16 / 9; }

  .footer-bottom .container { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 560px) {
  .section { padding: 68px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .section-chaise .card:nth-child(1),
  .section-chaise .card:nth-child(2),
  .section-chaise .card:nth-child(3) { aspect-ratio: 4 / 3; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
