/* Toldos-Tapisseria Manzaneda — preview SIRO
 * Identitat: taller tèxtil d'Olot · lona crema + petroli "ombra" + palla "sol"
 * Tipografia: Bitter (slab, de taller) + Hanken Grotesk (cos). Signatura: la
 * ratlla de tendal + el faldó ondulat + l'ombra que cau. Tot a mà (CSS/SVG). */

/* ── Fonts SELF-HOSTED (woff2 variable, latin + latin-ext — accents CA) ──
 * Cap crida a Google: privadesa del visitant + sense render-block. */
@font-face { font-family: 'Bitter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('assets/fonts/bitter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Bitter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('assets/fonts/bitter-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('assets/fonts/hanken-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('assets/fonts/hanken-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --lona:      #F3ECDC;   /* canvas cream — fons base */
  --lona-2:    #EADFC8;   /* crema una mica més fonda — seccions alternes */
  --lona-3:    #FBF7EE;   /* crema clara — cards */
  --ombra:     #16404E;   /* blau petroli — l'ombra, el color fort */
  --ombra-2:   #0E2C36;   /* petroli fosc */
  --sol:       #E0A33B;   /* palla/ambre — el sol, accent comptat */
  --sol-deep:  #8A5606;   /* ambre fosc per a text sobre crema — AA computat: 5.23 lona / 4.65 lona-2 / 5.75 lona-3 */
  --ink:       #241E16;   /* gairebé negre càlid — text sobre crema */
  --ink-soft:  #5A5142;   /* text secundari sobre crema */
  --line:      #D8CBB0;   /* hairline sobre crema */
  --on-ombra:  #F3ECDC;   /* text crema sobre petroli */
  --on-ombra-soft: rgba(243,236,220,.72);

  --ff-display: 'Bitter', Georgia, 'Times New Roman', serif;
  --ff-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --wrap: 1140px;
  --r: 10px;
  --r-sm: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --stripe: repeating-linear-gradient(90deg, var(--ombra) 0 44px, var(--lona-3) 44px 88px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--lona);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--ff-display); margin: 0; line-height: 1.05; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.2rem); }

/* accessibilitat */
:focus-visible { outline: 3px solid var(--sol-deep); outline-offset: 3px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }
/* a les superfícies petroli l'ambre fosc moriria (1.82:1) → anell ambre clar (5.04/6.61) */
.section--taller :focus-visible,
.section--contacte :focus-visible,
.pitch :focus-visible,
.site-footer :focus-visible { outline-color: var(--sol); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ombra); color: var(--on-ombra); padding: .7rem 1rem; z-index: 200; }
.skip:focus { left: .5rem; top: .5rem; border-radius: var(--r-sm); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* eyebrows + títols compartits */
.eyebrow {
  font-family: var(--ff-body); font-weight: 700; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--sol-deep);
  margin: 0 0 .8rem;
}
.eyebrow--light { color: var(--sol); }
.section__title {
  font-weight: 800; font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3.2rem);
  letter-spacing: -.015em; color: var(--ink); max-width: 18ch;
}
.section__title--light { color: var(--on-ombra); max-width: 20ch; }
.section__head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section__note { margin-top: .9rem; color: var(--ink-soft); font-size: .98rem; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.muted { color: var(--ink-soft); }

/* ───────── botons ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--ff-body); font-weight: 700; font-size: .98rem;
  padding: .8rem 1.4rem; border-radius: var(--r); text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: transform .18s var(--ease), background .18s, box-shadow .18s;
}
.btn--lg { padding: 1rem 1.7rem; font-size: 1.05rem; }
.btn--solid { background: var(--ombra); color: var(--on-ombra); }
.btn--solid:hover { background: var(--ombra-2); transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(22,64,78,.6); }
/* a les seccions petroli el solid s'inverteix (si no, botó invisible) */
.section--taller .btn--solid, .section--contacte .btn--solid { background: var(--lona); color: var(--ombra-2); }
.section--taller .btn--solid:hover, .section--contacte .btn--solid:hover { background: var(--lona-3); box-shadow: 0 12px 24px -14px rgba(0,0,0,.45); }
.btn--ghost { border-color: var(--ombra); color: var(--ombra); background: transparent; }
.btn--ghost:hover { background: rgba(22,64,78,.07); }
.btn--quiet { color: var(--ink); border-color: var(--line); background: var(--lona-3); }
.btn--quiet:hover { border-color: var(--ombra); transform: translateY(-2px); }

/* ───────── banner de proposta ───────── */
.pitch {
  display: flex; align-items: center; justify-content: center; gap: .7rem; flex-wrap: wrap;
  background: var(--ombra-2); color: var(--on-ombra); font-size: .85rem;
  padding: .5rem 1rem; text-align: center;
}
.pitch__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sol); box-shadow: 0 0 0 0 rgba(224,163,59,.6); animation: pulse 2.6s infinite; }
.pitch__link { color: var(--sol); font-weight: 700; text-decoration: none; padding-block: .55rem; margin-block: -.55rem; }
.pitch__link:hover { text-decoration: underline; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(224,163,59,.5); } 50% { box-shadow: 0 0 0 6px rgba(224,163,59,0); } }

/* ───────── la marca: mini-tendal a ratlles ───────── */
.brand__mark {
  display: flex; width: 38px; height: 24px; border-radius: 4px 4px 0 0; overflow: hidden;
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 7px) no-repeat,
                radial-gradient(7px at 50% 0, #000 96%, #0000) bottom/19px 7px repeat-x;
          mask: linear-gradient(#000 0 0) top/100% calc(100% - 7px) no-repeat,
                radial-gradient(7px at 50% 0, #000 96%, #0000) bottom/19px 7px repeat-x;
}
.brand__mark span { flex: 1; }
.brand__mark span:nth-child(odd) { background: var(--ombra); }
.brand__mark span:nth-child(even) { background: var(--sol); }
.brand__mark--sm { width: 30px; height: 19px; }

/* ───────── capçalera ───────── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(243,236,220,.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 1.2rem; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__name { font-family: var(--ff-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; color: var(--ink); }
.nav { display: flex; gap: 1.4rem; margin-left: auto; font-weight: 600; font-size: .98rem; }
.nav a { text-decoration: none; color: var(--ink); position: relative; padding: .65rem 0; }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--sol-deep); transition: width .22s var(--ease); }
.nav a:hover::after { width: 100%; }
.site-header__tel { font-size: .92rem; padding: .55rem 1rem; white-space: nowrap; }

/* ───────── HERO ───────── */
.hero { position: relative; background: var(--lona); padding-top: 96px; padding-bottom: clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero__awning {
  position: absolute; top: 0; left: 0; right: 0; height: 60px;
  background: var(--stripe);
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 22px) no-repeat,
                radial-gradient(22px at 50% 0, #000 96%, #0000) bottom/44px 22px repeat-x;
          mask: linear-gradient(#000 0 0) top/100% calc(100% - 22px) no-repeat,
                radial-gradient(22px at 50% 0, #000 96%, #0000) bottom/44px 22px repeat-x;
  box-shadow: 0 2px 0 rgba(0,0,0,.04);
}
.hero__shade {
  position: absolute; top: 60px; left: 0; right: 0; height: 240px; pointer-events: none;
  background: linear-gradient(180deg, rgba(14,44,54,.16), rgba(14,44,54,0) 78%);
}
.hero__content { position: relative; max-width: 46rem; }
.hero__title {
  font-weight: 800; font-size: clamp(2.4rem, 1.5rem + 4.4vw, 4.6rem);
  letter-spacing: -.02em; line-height: 1.02; color: var(--ink); margin: .2rem 0 0;
}
.ink-stripe { position: relative; white-space: nowrap; isolation: isolate; }
.ink-stripe::after {
  content: ""; position: absolute; left: -.04em; right: -.04em; bottom: .08em; height: .26em;
  background: var(--sol); opacity: .55; z-index: -1; border-radius: 2px;
  transform: rotate(-.6deg);
}
.hero__lead { margin-top: 1.3rem; font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); color: var(--ink-soft); max-width: 40ch; line-height: 1.55; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

/* ───────── OFICIS ───────── */
.section--oficis { background: var(--lona-2); }
.oficis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.ofici { background: var(--lona-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 0 1.6rem; overflow: hidden; display: flex; flex-direction: column; }
.ofici--feature { outline: 2px solid var(--ombra); outline-offset: -1px; }
.ofici__art { height: 120px; }
.ofici__art--tendals { background: var(--stripe); -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 14px) no-repeat, radial-gradient(14px at 50% 0, #000 96%, #0000) bottom/28px 14px repeat-x; mask: linear-gradient(#000 0 0) top/100% calc(100% - 14px) no-repeat, radial-gradient(14px at 50% 0, #000 96%, #0000) bottom/28px 14px repeat-x; }
.ofici__art--cortines { background: repeating-linear-gradient(90deg, var(--ombra) 0 3px, rgba(22,64,78,.45) 3px 7px, var(--ombra) 7px 10px, var(--lona-3) 10px 13px); }
.ofici__art--tapisseria { background: var(--ombra); background-image: radial-gradient(circle at 12px 12px, rgba(224,163,59,.0) 4px, var(--ombra) 5px), radial-gradient(var(--sol) 2px, transparent 2.5px); background-size: 24px 24px, 24px 24px; background-position: 0 0, 12px 12px; }
.ofici__name { font-size: 1.5rem; font-weight: 800; color: var(--ink); margin: 1.2rem 1.5rem .5rem; }
.ofici__desc { color: var(--ink-soft); margin: 0 1.5rem; }
.ofici__hi { margin: .8rem 1.5rem 0; font-weight: 700; color: var(--ombra); display: inline-flex; align-self: flex-start; background: rgba(224,163,59,.18); border: 1px solid rgba(224,163,59,.45); padding: .3rem .7rem; border-radius: 99px; font-size: .92rem; }
.ofici__list { margin: 1rem 1.5rem 0; padding: 0; list-style: none; }
.ofici__list li { position: relative; padding-left: 1.2rem; margin-bottom: .4rem; font-size: .95rem; color: var(--ink); }
.ofici__list li::before { content: ""; position: absolute; left: 0; top: .62em; width: .5rem; height: .5rem; background: var(--sol); border-radius: 1px; transform: rotate(45deg); }

/* ───────── EL TALLER (fons petroli, amb el faldó a dalt) ───────── */
.section--taller { background: var(--ombra); color: var(--on-ombra); }
/* la signatura viatja: el faldó de tendal corona cada secció fosca */
.valance-top { position: relative; }
.valance-top::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 22px;
  background: var(--stripe);
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 9px) no-repeat,
                radial-gradient(9px at 50% 0, #000 96%, #0000) bottom/22px 9px repeat-x;
          mask: linear-gradient(#000 0 0) top/100% calc(100% - 9px) no-repeat,
                radial-gradient(9px at 50% 0, #000 96%, #0000) bottom/22px 9px repeat-x;
}
.taller { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.taller__lead { margin: 1.2rem 0 1.8rem; color: var(--on-ombra-soft); font-size: 1.1rem; max-width: 42ch; }
.taller__steps { list-style: none; counter-reset: pas; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(243,236,220,.16); border: 1px solid rgba(243,236,220,.16); border-radius: var(--r-sm); overflow: hidden; }
.taller__steps li { counter-increment: pas; background: var(--ombra); padding: 1.3rem 1.3rem 1.2rem; }
.taller__steps li::before { content: counter(pas, decimal-leading-zero); display: block; font-family: var(--ff-body); font-weight: 700; font-size: .78rem; letter-spacing: .12em; color: var(--sol); margin-bottom: .35rem; }
.taller__steps strong { display: block; font-family: var(--ff-display); font-weight: 800; font-size: 1.25rem; color: var(--on-ombra); line-height: 1.1; }
.taller__steps span { display: block; margin-top: .35rem; font-size: .9rem; line-height: 1.45; color: var(--on-ombra-soft); }

/* ───────── GALERIA ───────── */
.galeria { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 150px; gap: 1rem; }
.shot { margin: 0; position: relative; border-radius: var(--r-sm); overflow: hidden; background: var(--lona-2); border: 1px solid var(--line); display: grid; place-items: center; }
/* slots art-dirigits amb les textures dels oficis (esperen la foto real) */
.shot--tendal { background: repeating-linear-gradient(90deg, rgba(22,64,78,.14) 0 26px, rgba(243,236,220,.6) 26px 52px), var(--lona-2); }
.shot--cortina { background: repeating-linear-gradient(90deg, rgba(22,64,78,.16) 0 3px, rgba(22,64,78,.06) 3px 8px, transparent 8px 14px), var(--lona-2); }
.shot--tapis { background-image: radial-gradient(rgba(22,64,78,.22) 1.6px, transparent 2px); background-size: 22px 22px; background-position: 0 0; }
.shot--tall { grid-row: span 2; }
.shot--wide { grid-column: span 2; }
.shot figcaption { font-size: .85rem; font-weight: 600; color: var(--ink); background: var(--lona-3); padding: .35rem .8rem; border-radius: 99px; border: 1px solid var(--line); }

/* ───────── CONTACTE ───────── */
.section--contacte { background: var(--ombra-2); color: var(--on-ombra); }
.contacte { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 5vw, 3.5rem); }
.contacte__lead { margin: 1rem 0 1.8rem; color: var(--on-ombra-soft); max-width: 44ch; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; display: flex; flex-direction: column; }
.field label { font-size: .85rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--on-ombra-soft); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
  font-family: var(--ff-body); font-size: 1rem; color: var(--on-ombra);
  background: rgba(243,236,220,.06); border: 1px solid rgba(243,236,220,.4); /* 3.23:1 — AA no-text */
  border-radius: var(--r-sm); padding: .8rem .9rem; width: 100%; transition: border-color .18s, background .18s;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(243,236,220,.6); } /* 4.88:1 */
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sol); background: rgba(243,236,220,.1); box-shadow: 0 0 0 3px rgba(224,163,59,.35); }
.field select option { color: #111; }
.form__note { margin-top: 1rem; font-size: .95rem; min-height: 1.2em; }
.form__note.is-ok { color: var(--sol); }
.form__note.is-error { color: #ff9b8a; }
.contacte__info { display: flex; flex-direction: column; gap: 1rem; }
.card-info { background: rgba(243,236,220,.06); border: 1px solid rgba(243,236,220,.16); border-radius: var(--r-sm); padding: 1.2rem 1.3rem; }
.card-info h3 { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sol); margin-bottom: .5rem; }
.card-info p { color: var(--on-ombra); }
.card-info a { color: var(--on-ombra); text-decoration: none; border-bottom: 1px solid rgba(243,236,220,.3); display: inline-block; padding-block: .35rem; }
.card-info a:hover { color: var(--sol); border-color: var(--sol); }

/* ───────── peu ───────── */
.site-footer { background: var(--ombra-2); color: var(--on-ombra-soft); border-top: 1px solid rgba(243,236,220,.12); padding: 2rem 0; }
.site-footer__inner { display: flex; flex-direction: column; gap: .6rem; align-items: center; text-align: center; }
.site-footer__brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--on-ombra); font-size: 1.05rem; }
.site-footer__meta { font-size: .85rem; }
.site-footer__siro { font-size: .8rem; }
.site-footer__siro a { color: var(--sol); text-decoration: none; }

/* ───────── reveals ───────── */
.js .fade-up { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .fade-up.is-in { opacity: 1; transform: none; }
.fade-up--d1 { transition-delay: .08s; }
.fade-up--d2 { transition-delay: .16s; }
.fade-up--d3 { transition-delay: .24s; }

/* ───────── responsive ───────── */
@media (max-width: 900px) {
  /* el nav cau AQUÍ (no a 680): entre 680-900 el header no hi cabia tot
   * (tel + CTA + nav partits en dues línies a iPad). Una sola escala. */
  .nav { display: none; }
  .oficis { grid-template-columns: 1fr; }
  .taller, .contacte { grid-template-columns: 1fr; }
  .galeria { grid-template-columns: repeat(2, 1fr); }
  .shot--wide { grid-column: span 2; }
}
@media (max-width: 680px) {
  /* el telèfon NO desapareix (negoci phone-first): queda com a icona 44px */
  .tel-num { display: none; }
  .site-header__tel { min-width: 44px; min-height: 44px; padding: .7rem; }
  .form__row { grid-template-columns: 1fr; }
  .taller__steps { grid-template-columns: 1fr; }
  .hero__title br { display: none; }
}
@media (max-width: 480px) {
  /* header compacte a 340-480: el mark (tendal) ÉS la marca; el nom cau.
   * El títol del hero i el peu segueixen dient "Manzaneda" a un scroll. */
  .site-header__inner { gap: .6rem; }
  .brand__name { display: none; }
  .site-header__inner .btn--solid { padding: .65rem .85rem; font-size: .88rem; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-up { opacity: 1; transform: none; transition: none; }
  .pitch__dot { animation: none; }
  * { transition-duration: .01ms !important; }
}
