/* Veloria 3D Studio. Same family as the Relief site: paper background, near-black ink, system sans for text,
   Archivo only inside the logo files. Black and white only; orange belongs to Relief. */
:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --ink: #141414;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --dark: #0d0d0e;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --max: 70rem;
  --press: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 4.5rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.47 var(--sans); letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 700; }
p { margin: 0; }

/* header */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: var(--nav-h); padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  background: rgba(245, 245, 247, .82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; }
.brand img { height: 1.75rem; width: auto; }
.nav nav { display: flex; align-items: center; gap: 1.6rem; font-size: .875rem; }
.nav nav a:not(.btn) { text-decoration: none; color: #424245; }
.nav nav a:not(.btn):hover, .nav nav a:not(.btn)[aria-current="page"] { color: var(--ink); }
@media (max-width: 760px) { .nav nav a:not(.btn) { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.25rem; border-radius: 980px;
  background: var(--ink); color: #fff; font: 500 1rem/1 var(--sans); letter-spacing: -0.01em; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .2s var(--press), background .2s; }
.btn:hover { background: #2a2a2c; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0,0,0,.22); }
.btn.ghost:hover { background: rgba(0,0,0,.04); }
.btn.light { background: #fff; color: var(--ink); }
.btn-small { min-height: 2rem; padding: 0 .9rem; font-size: .8125rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(4rem, 9vw, 7rem) 0; }
.eyebrow { font-size: 1rem; font-weight: 600; color: var(--muted); margin-bottom: .6rem; }
.h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.03; letter-spacing: -0.04em; }
.h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.06; letter-spacing: -0.035em; }
.lead { font-size: clamp(1.1875rem, 2vw, 1.375rem); line-height: 1.42; color: #424245; margin-top: 1.1rem; max-width: 40rem; }
.muted { color: var(--muted); }
.fine { font-size: .9375rem; color: var(--muted); }

/* hero */
.hero { padding-top: clamp(3rem, 8vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero .cta-row { margin-top: 2rem; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.card { background: var(--card); border-radius: 1.5rem; padding: 2rem; display: flex; flex-direction: column; gap: .75rem; text-decoration: none; }
a.card { transition: transform .3s var(--press); }
a.card:hover { transform: translateY(-3px); }
.card h3 { font-size: 1.5rem; letter-spacing: -0.025em; }
.card p { color: #424245; }
.card .more { margin-top: auto; padding-top: .75rem; font-weight: 500; }
.card .more::after { content: " ›"; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* models (dark showcase cards) */
.media-card { background: var(--dark); border-radius: 1.5rem; overflow: hidden; position: relative; }
.media-card img { width: 100%; height: 100%; object-fit: contain; }
.media-card .tag { position: absolute; left: 1rem; bottom: 1rem; font-size: .8125rem; color: #e8e8ed; background: rgba(255,255,255,.12);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 980px; padding: .35rem .8rem; }
.hero .media-card { aspect-ratio: 4 / 5; }
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin-top: 2.5rem; }
.gallery .media-card { aspect-ratio: 3 / 4; }
.gallery.large { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 1000px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .gallery, .gallery.large { grid-template-columns: repeat(2, 1fr); } }

/* steps */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: s; }
.steps li { background: var(--card); border-radius: 1.5rem; padding: 1.75rem; counter-increment: s; }
.steps li::before { content: counter(s); display: block; font-size: .875rem; font-weight: 600; color: var(--muted); margin-bottom: 1.5rem; }
.steps h3 { font-size: 1.25rem; letter-spacing: -0.02em; margin-bottom: .4rem; }
.steps p { color: #424245; font-size: 1rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* two-up feature rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2.5rem; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.list { margin: .5rem 0 0; padding-left: 1.1rem; color: #424245; }
.list li { margin: .3rem 0; }

/* price table */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; background: var(--card); border-radius: 1.5rem; padding: .5rem 1.5rem; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 1rem .25rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }
thead th { color: var(--muted); font-weight: 500; font-size: .9375rem; }
tbody th { font-weight: 600; }

/* dark band */
.band { background: var(--dark); color: #f5f5f7; border-radius: 2rem; padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.band .lead { color: #c7c7cc; margin-left: auto; margin-right: auto; }
.band .cta-row { justify-content: center; margin-top: 2rem; }

/* FAQ */
.faq details { background: var(--card); border-radius: 1.25rem; padding: 1.25rem 1.5rem; margin-top: .75rem; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.0625rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: .75rem; color: #424245; }

/* forms */
.page { max-width: 46rem; margin: 0 auto; padding: clamp(3rem, 8vw, 5rem) var(--gutter) clamp(4rem, 10vw, 7rem); }
.page-head { margin-bottom: 2.5rem; }
.page-head p { margin-top: .9rem; color: var(--muted); font-size: 1.1875rem; line-height: 1.45; }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; border: 0; padding: 0; margin: 0; }
.field label, .field legend { font-weight: 600; font-size: .9375rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .875rem; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid rgba(0,0,0,.16); border-radius: .75rem; padding: .75rem .9rem; }
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.pills label { display: inline-flex; align-items: center; gap: .45rem; background: #fff; border: 1px solid rgba(0,0,0,.16); border-radius: 980px; padding: .5rem .9rem; font-weight: 500; cursor: pointer; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .9375rem; color: #424245; }
.form-foot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-status { font-size: .9375rem; }
.form-status.error { color: #b3261e; }
.hp { position: absolute; left: -9999px; }

/* prose pages */
.doc h2 { font-size: 1.375rem; margin: 2.25rem 0 .6rem; letter-spacing: -0.02em; }
.doc p, .doc li { color: #424245; margin-top: .6rem; }
.doc ul { padding-left: 1.2rem; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 2.5rem var(--gutter) 3rem; font-size: .8125rem; color: var(--muted); }
.footer .wrap { padding: 0; display: grid; gap: .8rem; }
.footer img { height: 1rem; width: auto; margin-bottom: .4rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.footer a { color: #424245; text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.gallery:not(.large) .tag { display: none; }   /* five-across tiles are too small for captions; the Models page keeps them */

/* cut-out models (transparent PNG/WebP, no background) */
.hero-model { margin: 0; display: grid; justify-items: center; gap: .75rem; }
.hero-model img { max-height: min(72vh, 40rem); width: auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,.12)); }
.model { margin: 0; background: var(--card); border-radius: 1.5rem; padding: 1.25rem 1.25rem 1rem; display: grid; grid-template-rows: 1fr auto; gap: .75rem; aspect-ratio: 4 / 5; }
.model img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.model figcaption { font-size: .875rem; font-weight: 500; color: #424245; text-align: center; }
.gallery { grid-template-columns: repeat(4, 1fr); }
.gallery.large { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .gallery, .gallery.large { grid-template-columns: repeat(2, 1fr); } }

/* "Printed by scroll" hero: tall section, pinned stage; the print is revealed from the bottom under a build line */
.build { position: relative; height: 340vh; }
.build-sticky { position: sticky; top: var(--nav-h); display: grid; align-items: start; padding: clamp(1.5rem, 5vh, 3.5rem) 0 2rem; }   /* content starts near the header: no empty forehead */
.build-stage { position: relative; height: min(calc(100vh - var(--nav-h) - 6rem), 40rem); display: grid; }
.build-model { --p: 0; position: absolute; inset: 0 0 2.25rem; margin: auto; max-width: 100%; max-height: calc(100% - 2.25rem);
  opacity: 0; transition: opacity .45s var(--press); }
.build-model.on { opacity: 1; }
.build-model img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.build-model .lines { opacity: .9; }
.build-model .solid { clip-path: inset(calc((1 - var(--p)) * 100%) 0 0 0); }
.nozzle { position: absolute; left: -6%; right: -6%; top: calc((1 - var(--p)) * 100%); height: 2px; margin-top: -1px;
  background: var(--ink); box-shadow: 0 0 0 4px rgba(20,20,20,.06); opacity: calc(1 - var(--done, 0)); }
.build-model[style] .nozzle { opacity: clamp(0, (1 - var(--p)) * 40, 1); }   /* the line fades out once the print is complete */
.build-meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: .75rem; font-variant-numeric: tabular-nums; }
.build-meta span + span::before { content: "·"; margin-right: .75rem; }
.build-hint { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); transition: opacity .3s; }
.build.done .build-hint { opacity: 0; }
@media (max-width: 860px) {
  .build-sticky .hero-grid { gap: 1.25rem; }
  .build-sticky .lead { font-size: 1.0625rem; margin-top: .7rem; }
  .build-sticky .cta-row { margin-top: 1.1rem; }
  .build-stage { height: 44vh; height: 44svh; }
}
@media (prefers-reduced-motion: reduce) {
  .build { height: auto; }
  .build-sticky { position: static; min-height: 0; }
  .build-hint, .nozzle { display: none; }
}

/* Opening logo (home page): big and centred on arrival, flies into the header as you scroll */
.intro { display: none; }
.js .intro { display: block; position: relative; height: 70vh; height: 70svh; }
.js .fly { position: fixed; left: 0; top: 0; z-index: 20; height: auto; transform-origin: 0 0; will-change: transform; pointer-events: none; }
.has-intro .nav .brand img { opacity: 0; }
.has-intro.docked .nav .brand img { opacity: 1; }
.has-intro.docked .fly { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .js .intro { display: none; }
  .has-intro .nav .brand img { opacity: 1; }
}

/* Opening logo, animated: the small plane prints up, the large plane grows out of it (×1.618, a little overshoot, then a
   slow breath so the mark feels alive), then the emblem slides left as VELORIA emerges from behind it.
   --h = emblem height; widths follow the lockup: emblem .8018h, gap .344h, wordmark 3.4h × .36h. */
/* The lockup is laid out once at its final size (emblem .8018h + gap .344h + wordmark 3.4h = 4.5448h) and only
   transforms and clip-path animate, so nothing reflows and nothing re-centres mid-animation (that caused the jitter).
   Start: the row is shifted right by 1.8715h, which puts the emblem alone in the centre. */
.js .fly { display: block; }
.fly-inner { display: flex; align-items: center; height: 100%; width: calc(var(--h) * 4.5448);
  transform: translateX(calc(var(--h) * 1.8715)); animation: lockup-slide .95s cubic-bezier(.65, 0, .35, 1) 2.15s both; }
.fly-emblem { position: relative; z-index: 1; height: 100%; width: calc(var(--h) * .8018); flex: none; overflow: visible; }
.fly-emblem path { transform-box: fill-box; }
.p-small { animation: print-up .7s cubic-bezier(.2, .8, .2, 1) .25s both; }
.p-large { transform-origin: 0% 100%; animation: grow 1.05s cubic-bezier(.34, 1.4, .55, 1) .95s both, breathe 4.8s ease-in-out 3.8s infinite; }
.fly-word { display: block; flex: none; margin-left: calc(var(--h) * .344); height: calc(var(--h) * .36); width: calc(var(--h) * 3.4);
  clip-path: inset(0 100% 0 0); animation: word-reveal .95s cubic-bezier(.65, 0, .35, 1) 2.15s both; }
.fly-word svg { display: block; height: 100%; width: 100%; animation: word-in .95s cubic-bezier(.22, 1, .36, 1) 2.15s both; }
@keyframes print-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes grow { 0% { transform: scale(.618); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.018); } }
@keyframes lockup-slide { from { transform: translateX(calc(var(--h) * 1.8715)); } to { transform: translateX(0); } }
@keyframes word-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes word-in { from { transform: translateX(-30%); opacity: 0; } to { transform: none; opacity: 1; } }
.has-intro.docked .p-large { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .p-small, .p-large, .fly-inner, .fly-word, .fly-word svg { animation: none; }
  .fly-inner { transform: none; } .fly-word { clip-path: none; }
}
/* scroll cue: a quiet chevron that bobs gently and fades out as soon as you start scrolling */
.intro-cue { position: absolute; left: 50%; bottom: 1.75rem; width: 1.5rem; height: 1.5rem; margin-left: -.75rem; color: var(--muted);
  opacity: calc(.55 * var(--cue, 1)); animation: cue-in .8s ease 3.3s both; }
.intro-cue svg { display: block; width: 100%; height: 100%; animation: bob 2.4s ease-in-out 3.3s infinite; }
@keyframes cue-in { from { opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .intro-cue svg { animation: none; } }
}

/* hero copy rhythm inside the pinned build section */
.build .lead { margin-top: 1.25rem; }
.build .cta-row { margin-top: 2.25rem; }

/* About: the mark and its meaning */
.story { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.story-mark { margin: 0; background: var(--card); border-radius: 2rem; aspect-ratio: 1; display: grid; place-items: center; }
.story-mark img { width: 42%; height: auto; }
.story-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; color: #424245; font-size: 1.0625rem; }
.story-list b { color: var(--ink); }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } .story-mark { max-width: 20rem; } }
