/* MAST Upholstery — marine upholstery, the textile division of MAST Marine.
   Corporate palette and typefaces taken from mastflags.com: MAST navy, MAST
   red, the two MAST greys, Playfair Display for display and Inter for text.
   No white panels: everything sits straight on the grey ground.
   Worst text/surface contrast here is 4.94:1. */

:root{
  /* MAST corporate colours, taken from mastflags.com */
  --sail:#F2F2F2;       /* MAST light grey — page ground */
  --chalk:#FFFFFF;       /* white, used only where a field must read as a field */
  --navy:#0C1B33;       /* MAST navy */
  --navy-2:#16304F;
  --ink:#0C1B33;        /* 15.37:1 on the grey ground */
  --body:#2A3647;       /* 10.92:1 */
  --quiet:#4C5765;      /*  6.56:1 */
  --thread:#C8102E;     /* MAST red — 5.26:1 on grey */
  --thread-lt:#F14E69;  /* the same red lightened for navy — 4.94:1 there */
  --rule:#DADADA;       /* MAST grey */
  --rule-soft:#E6E6E6;
  --shell:1240px;
  /* MAST typefaces: Playfair Display for display, Inter for text */
  --disp:"Playfair Display",Georgia,"Times New Roman",serif;
  --text:Inter,system-ui,-apple-system,"Helvetica Neue",sans-serif;
}

*,*::before,*::after{box-sizing:border-box}

html{background:var(--sail);-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--sail);color:var(--ink);
  font-family:var(--text);font-size:16.5px;font-weight:400;line-height:1.62;
  overflow-x:hidden;
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

img{max-width:100%;display:block}
a{color:inherit}
::selection{background:var(--navy);color:var(--chalk)}
:focus-visible{outline:2px solid var(--thread);outline-offset:3px}

.skip{position:absolute;left:-9999px;top:0;z-index:99;background:var(--navy);color:var(--chalk);padding:12px 18px;text-decoration:none}
.skip:focus{left:8px;top:8px}

.wrap{max-width:var(--shell);margin-inline:auto;padding:0 32px}

/* ── wordmark: two weights, no logo file ────────────────────── */
.mark{display:flex;align-items:baseline;gap:8px;text-decoration:none;flex:none}
.mark-m{font-family:var(--disp);font-weight:600;font-size:23px;letter-spacing:-.02em;color:var(--ink)}
.mark-u{font-family:var(--text);font-weight:400;font-size:15px;color:var(--quiet)}

/* ── header ───────────────────────────────────────────────── */
.top{position:sticky;top:0;z-index:50;background:rgba(242,242,242,.92);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--rule)}
.top-in{display:flex;align-items:center;gap:26px;max-width:var(--shell);margin-inline:auto;padding:14px 32px}
.nav{display:flex;gap:22px;margin-left:auto;flex-wrap:nowrap}
.nav a{font-size:14.5px;color:var(--body);text-decoration:none;padding-bottom:2px;border-bottom:1.5px solid transparent;white-space:nowrap}
.nav a:hover{color:var(--ink);border-bottom-color:var(--rule)}
[data-view="taller"]      .nav a[href="#/taller"],
[data-view="trabajos"]    .nav a[href="#/trabajos"],
[data-view="materiales"]  .nav a[href="#/materiales"],
[data-view="prestaciones"] .nav a[href="#/prestaciones"],
[data-view="encargo"]     .nav a[href="#/encargo"],
[data-view="presupuesto"] .nav a[href="#/presupuesto"]{color:var(--ink);border-bottom-color:var(--thread)}

.lang{display:flex;flex:none;gap:2px}
.lang-b{font-family:var(--text);font-size:13px;padding:4px 9px;border:1px solid var(--rule);
  background:transparent;color:var(--quiet);cursor:pointer;border-radius:2px}
.lang-b:hover{color:var(--ink)}
.lang-b[aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:var(--chalk)}

/* ── views ────────────────────────────────────────────────── */
.view{display:none}
[data-view="taller"]      #v-taller,
[data-view="trabajos"]    #v-trabajos,
[data-view="materiales"]  #v-materiales,
[data-view="prestaciones"] #v-prestaciones,
[data-view="encargo"]     #v-encargo,
[data-view="presupuesto"] #v-presupuesto{display:block}
.no-js .view{display:block!important}
.no-js .lang,.no-js .pattern-switch{display:none}

/* ── type ─────────────────────────────────────────────────── */
h1,h2,h3{margin:0;font-family:var(--disp);color:var(--ink);text-wrap:balance}
h1{font-size:clamp(30px,3.4vw,46px);font-weight:600;line-height:1.14;letter-spacing:-.02em}
h2{font-size:clamp(26px,3vw,38px);font-weight:600;line-height:1.16;letter-spacing:-.015em;margin-bottom:14px}
h3{font-size:20px;font-weight:600;line-height:1.3;letter-spacing:-.01em}
.say{color:var(--body);margin:16px 0 0;max-width:62ch}
.say.wide{max-width:70ch;margin-bottom:40px}
.note{margin-top:22px;font-size:14px;color:var(--quiet);max-width:62ch;font-style:italic}

/* ── the job sheet: drawing left, specification right ────────── */
.sheet{max-width:var(--shell);margin-inline:auto;padding:52px 32px 40px;
  display:grid;grid-template-columns:1.15fr .85fr;gap:54px;align-items:start}
.sheet-draw{position:relative}
.pattern{background:transparent;padding:0}
.pattern svg{width:100%;height:auto;display:block}

/* the pattern: hairlines and the notation of a real cutting sheet */
.pattern .cut{fill:none;stroke:var(--navy);stroke-width:1.6}
.pattern .seam{fill:none;stroke:var(--navy-2);stroke-width:1.2;stroke-dasharray:9 7}
.pattern .notch line{stroke:var(--navy);stroke-width:1.6}
.pattern .dim line{stroke:var(--quiet);stroke-width:.9}
.pattern .dim text,.pattern .grain text,.pattern .zip text,.pattern .plabel{
  font-family:var(--text);font-size:11px;fill:var(--quiet)}
.pattern .plabel{font-size:11.5px;fill:var(--navy-2)}
.pattern .grain line,.pattern .grain polyline{stroke:var(--quiet);stroke-width:1.1;fill:none}
.pattern .zip line{stroke:var(--navy-2);stroke-width:1.1}
.pattern .teeth line{stroke-width:1.4}

/* the finished piece: boxed, piped, topstitched, with a soft shadow */
.pattern .cloth{fill:url(#cloth)}
.pattern .cloth-top{fill:url(#clothTop)}
.pattern .cast{fill:rgba(12,27,51,.14)}
.pattern .pipe{fill:none;stroke:var(--thread-lt);stroke-width:3.4;stroke-linecap:round}
.pattern .topstitch{fill:none;stroke:var(--thread-lt);stroke-width:1.2;stroke-dasharray:5 4;opacity:.78}
.pattern .zip-sewn line{stroke:#8DA2BC;stroke-width:1.2}
.pattern .zip-sewn .teeth line{stroke-width:1.6}
.pattern .zip-sewn rect{fill:#8DA2BC}
.pattern .sheen{fill:rgba(255,255,255,.07)}

/* one orchestrated moment, and only when the visitor asks for it */
.g-flat,.g-sewn{transition:opacity .45s ease,transform .45s ease}
.g-sewn{opacity:0;transform:translateY(14px) scale(.985);transform-origin:50% 60%;pointer-events:none}
.pattern[data-state="cosido"] .g-flat{opacity:0;transform:scale(.985);pointer-events:none}
.pattern[data-state="cosido"] .g-sewn{opacity:1;transform:none;pointer-events:auto}

.pattern-switch{display:flex;gap:0;margin-top:12px}
.sw{font-family:var(--text);font-size:14px;padding:8px 16px;cursor:pointer;
  background:transparent;border:1px solid var(--rule);color:var(--body);margin-right:-1px}
.sw:hover{color:var(--ink);border-color:var(--navy)}
.sw[aria-pressed="true"]{background:var(--navy);border-color:var(--navy);color:var(--chalk)}

.sheet-spec{padding-top:6px}
.spec{margin:34px 0 0;border-top:1px solid var(--rule)}
.spec div{display:grid;grid-template-columns:110px 1fr;gap:18px;padding-block:11px;border-bottom:1px solid var(--rule-soft)}
.spec dt{margin:0;font-size:14px;color:var(--quiet)}
.spec dd{margin:0;font-size:15px;color:var(--ink)}

.acts{display:flex;gap:12px;flex-wrap:wrap;margin-top:30px}
.go{display:inline-block;font-family:var(--text);font-weight:500;font-size:15px;
  padding:12px 22px;text-decoration:none;cursor:pointer;
  background:var(--navy);color:var(--chalk);border:1px solid var(--navy);border-radius:2px;
  transition:background-color .2s ease}
.go:hover{background:var(--navy-2);border-color:var(--navy-2)}
.go[disabled]{opacity:.55;cursor:default}
.go-q{background:transparent;color:var(--ink);border-color:var(--rule)}
.go-q:hover{background:transparent;border-color:var(--navy)}

/* ── a stitched rule: the one repeated brand device ──────────── */
.stitch{height:2px;background:repeating-linear-gradient(90deg,var(--thread) 0 10px,transparent 10px 18px);
  max-width:calc(var(--shell) - 64px);margin:10px auto 0}

/* ── MAST band ─────────────────────────────────────────────── */
.band{background:var(--navy);color:var(--chalk);margin-top:40px}
.band-in{max-width:var(--shell);margin-inline:auto;padding:40px 32px;
  display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:start}
.band-say{margin:0;color:#D2DAE2;max-width:52ch}
.sibs{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.sibs li{display:flex;gap:14px;align-items:baseline;border-bottom:1px solid rgba(247,249,250,.14);padding-bottom:10px}
.sibs a{font-family:var(--disp);font-weight:600;font-size:18px;color:var(--chalk);text-decoration:none;border-bottom:1px solid transparent}
.sibs a:hover{border-bottom-color:var(--thread-lt)}
.sibs span{font-size:14px;color:#9FB0C2;margin-left:auto;text-align:right}

/* ── what we sew ──────────────────────────────────────────── */
.view .wrap{padding-block:56px 72px}
.made{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--rule);border:1px solid var(--rule)}
.item{background:var(--sail);padding:26px 24px 28px}
.item p{margin:9px 0 0;font-size:14.5px;line-height:1.56;color:var(--body)}

/* ── materials ────────────────────────────────────────────── */
.mats{display:grid;grid-template-columns:repeat(2,1fr);gap:26px 44px}
.mat{border-top:2px solid var(--navy);padding-top:14px}
.mat p{margin:8px 0 0;font-size:15px;line-height:1.58;color:var(--body);max-width:52ch}

.sw-h{margin-top:64px;font-size:22px}
.swatches{list-style:none;margin:28px 0 0;padding:0;display:grid;
  grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:16px}
.swatch{background:transparent;padding:0}
.chip{height:84px;border-radius:2px;position:relative;overflow:hidden}
/* a stitched edge inside each chip, so a swatch reads as sewn goods */
.chip::after{content:"";position:absolute;inset:7px;border-radius:1px;
  border:1px dashed rgba(255,255,255,.55)}
.chip.is-pale::after{border-color:rgba(12,27,51,.3)}
.chip.is-pale{box-shadow:inset 0 0 0 1px var(--rule)}
.swatch b{display:block;margin-top:10px;font-family:var(--text);font-weight:500;font-size:13.5px;color:var(--ink)}
.swatch span{display:block;font-size:12.5px;color:var(--quiet)}


/* ── performance: one circle per property, each opens its own panel ── */
.sprite{position:absolute;width:0;height:0;overflow:hidden}
.props{list-style:none;margin:8px 0 0;padding:0;display:grid;
  grid-template-columns:repeat(4,1fr);gap:36px 20px}
.prop{display:flex;flex-direction:column;align-items:center;gap:15px;width:100%;
  background:none;border:0;padding:0;cursor:pointer;font-family:var(--text)}
.prop-ring{width:104px;height:104px;border-radius:50%;border:1px solid var(--rule);
  display:grid;place-items:center;
  transition:border-color .22s ease,transform .22s ease,box-shadow .22s ease}
.prop-ring svg,.pnl-ring svg{fill:none;stroke:var(--navy);stroke-width:1.35;
  stroke-linecap:round;stroke-linejoin:round}
.prop-ring svg{width:42px;height:42px}
.prop:hover .prop-ring,.prop:focus-visible .prop-ring{
  border-color:var(--thread);transform:translateY(-3px);box-shadow:0 10px 22px rgba(12,27,51,.12)}
.prop-n{font-size:14px;line-height:1.35;color:var(--body);text-align:center;max-width:17ch}
.prop:hover .prop-n{color:var(--ink)}
.prop:focus-visible{outline:none}
.prop:focus-visible .prop-n{text-decoration:underline;text-underline-offset:3px}

dialog.pnl{width:min(560px,calc(100vw - 32px));padding:0;border:1px solid var(--navy);
  border-radius:2px;background:var(--sail);color:var(--ink);
  box-shadow:0 28px 60px rgba(12,27,51,.34)}
dialog.pnl::backdrop{background:rgba(12,27,51,.58)}
.pnl-in{padding:30px}
.pnl-top{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px}
.pnl-ring{width:60px;height:60px;border-radius:50%;border:1px solid var(--rule);display:grid;place-items:center;flex:none}
.pnl-ring svg{width:28px;height:28px}
.pnl h3{font-size:25px;margin-bottom:18px}
.pnl .x{flex:none;font-family:var(--text);font-size:13.5px;background:transparent;
  border:1px solid var(--rule);border-radius:2px;color:var(--body);padding:7px 14px;cursor:pointer;
  transition:border-color .18s ease,color .18s ease}
.pnl .x:hover{border-color:var(--navy);color:var(--ink)}
.pnl-k{margin:0 0 5px;font-size:12.5px;color:var(--quiet)}
.pnl p{margin:0 0 18px;font-size:15px;line-height:1.6;color:var(--body)}
.pnl p.when{margin-bottom:0;color:var(--quiet)}

/* the one thing on this page a buyer must not miss */
.cert{border-left:2px solid var(--thread);padding:14px 0 14px 18px;margin:40px 0 0;
  max-width:72ch;font-size:15px;line-height:1.6;color:var(--body)}
.cert b{color:var(--ink);font-weight:600}

/* ── what the job has to comply with, in the quote form ─────── */
.f-lbl{font-size:13.5px;color:var(--quiet)}
.reqs{display:grid;grid-template-columns:repeat(2,1fr);gap:9px 24px;margin-top:4px}
.req{display:flex;align-items:center;gap:10px;font-size:14.5px;color:var(--body);cursor:pointer}
.req input{width:16px;height:16px;flex:none;accent-color:var(--navy);cursor:pointer}
.req:hover{color:var(--ink)}

/* ── how a job runs: the stage stays, the steps travel past it ── */
.voyage{display:grid;grid-template-columns:290px 1fr;gap:64px;align-items:start}
.voyage-stage{position:sticky;top:104px}
.vs-in{border-top:2px solid var(--navy);padding-top:18px}

.vs-count{margin:0;display:flex;align-items:baseline;gap:7px;
  font-family:var(--disp);font-weight:600;letter-spacing:-.02em;color:var(--ink)}
.vs-num{display:none;font-size:52px;line-height:1}
.vs-count small{font-family:var(--text);font-weight:400;font-size:15px;color:var(--quiet)}
[data-active="1"] .vs-num[data-n="1"],[data-active="2"] .vs-num[data-n="2"],
[data-active="3"] .vs-num[data-n="3"],[data-active="4"] .vs-num[data-n="4"],
[data-active="5"] .vs-num[data-n="5"]{display:block}

.vs-track{display:flex;align-items:center;gap:12px;margin-top:24px;position:relative}
.vs-end{width:34px;height:34px;flex:none;display:grid;place-items:center;
  border-radius:50%;border:1px solid var(--rule);transition:border-color .3s ease,background-color .3s ease}
.vs-end svg{width:19px;height:19px;fill:none;stroke:var(--quiet);stroke-width:1.4;
  stroke-linecap:round;stroke-linejoin:round;transition:stroke .3s ease}
[data-at="boat"] .vs-end.is-boat,[data-at="shop"] .vs-end.is-shop{border-color:var(--navy);background:var(--navy)}
[data-at="boat"] .vs-end.is-boat svg,[data-at="shop"] .vs-end.is-shop svg{stroke:var(--chalk)}

.vs-rail{position:relative;flex:1;height:2px;
  background:repeating-linear-gradient(90deg,var(--rule) 0 7px,transparent 7px 13px)}
.vs-prog{position:absolute;inset:0 auto 0 0;width:20%;
  background:repeating-linear-gradient(90deg,var(--thread) 0 7px,transparent 7px 13px);
  transition:width .45s var(--ease,ease)}
[data-active="1"] .vs-prog{width:20%}[data-active="2"] .vs-prog{width:40%}
[data-active="3"] .vs-prog{width:60%}[data-active="4"] .vs-prog{width:80%}
[data-active="5"] .vs-prog{width:100%}

.vs-dot{position:absolute;top:50%;width:11px;height:11px;border-radius:50%;
  background:var(--thread);margin-top:-5.5px;transition:left .45s cubic-bezier(.65,0,.35,1)}
[data-at="boat"] .vs-dot{left:52px}
[data-at="shop"] .vs-dot{left:calc(100% - 63px)}

.vs-where{margin:18px 0 0;font-size:14px;min-height:1.5em}
.vs-where span{display:none}
[data-at="boat"] .vs-where span[data-end="boat"],
[data-at="shop"] .vs-where span[data-end="shop"]{display:inline;color:var(--ink)}

.voyage-steps{list-style:none;margin:0;padding:0}
.vstep{min-height:62vh;display:flex;flex-direction:column;justify-content:center;
  max-width:46ch;opacity:.26;transform:translateY(14px);
  transition:opacity .5s ease,transform .5s ease}
.vstep.is-on{opacity:1;transform:none}
.vstep-n{margin:0 0 10px;font-family:var(--text);font-size:12.5px;color:var(--thread);
  letter-spacing:.06em}
.vstep h3{font-size:27px;line-height:1.18}
.vstep p{margin:12px 0 0;font-size:16px;line-height:1.6;color:var(--body)}
.no-js .vstep{opacity:1;transform:none;min-height:0;padding-block:22px}
.no-js .voyage{grid-template-columns:1fr}
.no-js .voyage-stage{display:none}
@media (prefers-reduced-motion:reduce){
  .vstep{opacity:1;transform:none;min-height:0;padding-block:26px}
}

/* ── form ───────────────────────────────────────────────── */
.form{display:grid;grid-template-columns:repeat(2,1fr);gap:18px 24px;max-width:720px}
.f{display:flex;flex-direction:column;gap:6px}
.f.full{grid-column:1/-1}
.f label{font-size:13.5px;color:var(--quiet)}
.f input:not([type="checkbox"]),.f select,.f textarea{
  font-family:var(--text);font-size:15.5px;color:var(--ink);
  background:transparent;border:1px solid var(--rule);border-radius:2px;padding:11px 13px;width:100%;
  transition:border-color .18s ease,box-shadow .18s ease}
.f textarea{min-height:118px;resize:vertical}
.f input:not([type="checkbox"]):focus,.f select:focus,.f textarea:focus{background:var(--chalk);border-color:var(--navy);box-shadow:0 0 0 3px rgba(12,27,51,.1);outline:none}
.f input::placeholder,.f textarea::placeholder{color:#7C8694}
.f select{appearance:none;
  background-image:linear-gradient(45deg,transparent 50%,var(--navy) 50%),linear-gradient(135deg,var(--navy) 50%,transparent 50%);
  background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
.hp{position:absolute;left:-9999px}
.foot{flex-direction:row;align-items:center;gap:16px;flex-wrap:wrap;margin-top:6px}
.msg{margin:0;font-size:14px}
.msg.ok{color:var(--navy)}
.msg.err{color:var(--thread)}

#v-presupuesto .wrap{text-align:center}
#v-presupuesto .say{margin-inline:auto}
#v-presupuesto .form{margin-inline:auto}
#v-presupuesto .f label,#v-presupuesto .f-lbl{text-align:center}
#v-presupuesto .f input,#v-presupuesto .f select,#v-presupuesto .f textarea{text-align:left}
#v-presupuesto .reqs{max-width:460px;margin-inline:auto;text-align:left}
#v-presupuesto .foot{justify-content:center}
#v-presupuesto .reach{justify-content:center}

.reach{list-style:none;margin:40px 0 0;padding:0;display:flex;gap:26px;flex-wrap:wrap;font-size:14.5px;color:var(--quiet)}
.reach a{color:var(--body);text-decoration:none;border-bottom:1px solid var(--rule)}
.reach a:hover{color:var(--ink);border-bottom-color:var(--thread)}

/* ── footer ─────────────────────────────────────────────── */
.end{border-top:1px solid var(--rule);background:transparent}
.end-in{max-width:var(--shell);margin-inline:auto;padding:26px 32px;
  display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.end small{font-size:13px;color:var(--quiet)}

/* ── responsive ──────────────────────────────────────────── */
@media (max-width:1000px){
  .props{grid-template-columns:repeat(3,1fr);gap:30px 16px}
  .voyage{grid-template-columns:1fr;gap:18px}
  .voyage-stage{top:0;background:var(--sail);padding-block:14px;z-index:20}
  .vs-in{padding-top:12px}
  .vs-num{font-size:40px}
  .vstep{min-height:52vh;max-width:none}
  .sheet{grid-template-columns:1fr;gap:34px;padding-top:36px}
  .band-in{grid-template-columns:1fr;gap:28px}
  .made{grid-template-columns:repeat(2,1fr)}
  .top-in{flex-wrap:wrap;gap:14px}
  .nav{order:3;width:100%;margin-left:0;overflow-x:auto;gap:18px;scrollbar-width:none}
  .nav::-webkit-scrollbar{display:none}
  .lang{margin-left:auto}
}
@media (max-width:680px){
  body{font-size:16px}
  .wrap,.top-in,.sheet,.band-in,.end-in{padding-inline:20px}
  .made{grid-template-columns:1fr}
  .mats{grid-template-columns:1fr;gap:22px}
  .form{grid-template-columns:1fr}
  .spec div{grid-template-columns:96px 1fr;gap:12px}
  .props{grid-template-columns:repeat(2,1fr);gap:26px 14px}
  .prop-ring{width:88px;height:88px}
  .prop-ring svg{width:36px;height:36px}
  .pnl-in{padding:22px}
  .pnl h3{font-size:22px}
  .reqs{grid-template-columns:1fr}
  .vstep{min-height:46vh}
  .vstep h3{font-size:23px}
  .reach{flex-direction:column;gap:10px}
}
