/* MARTENSIA · home.css — the home page: the measured headline, two doors, and the company below them */

/* ── The measured headline: a dimension rail over the line, its label the line's width as a toleranced size ── */
.home-hero { max-width: 1280px; margin: 0 auto; padding: 116px 44px 28px; text-align: center; }
.measure { display: inline-block; max-width: 100%; }
.measure__rail { position: relative; height: 22px; margin: 0 auto 14px; max-width: 100%; color: var(--fg3); }
.measure__rail::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; }
.measure__tick { position: absolute; top: 3px; bottom: 3px; width: 1px; background: currentColor; }
.measure__tick--a { left: 0; } .measure__tick--b { right: 0; }
.measure__rail .arrowhead { position: absolute; top: 50%; width: 0; height: 0; border: 4px solid transparent; margin-top: -4px; }
.measure__rail .arrowhead--a { left: 1px; border-right: 7px solid currentColor; border-left: 0; }
.measure__rail .arrowhead--b { right: 1px; border-left: 7px solid currentColor; border-right: 0; }
.measure__label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--bg); padding: 0 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--fg2); white-space: nowrap; }
.home-h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4.2vw, 58px); letter-spacing: -0.035em; line-height: 1.06; text-wrap: balance; }
.home-lede { margin: 16px auto 0; font-size: 19px; line-height: 1.5; color: var(--fg2); max-width: 640px; }

/* ── Two doors, equal ── */
.doors { max-width: 1280px; margin: 0 auto; padding: 16px 44px 72px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.door { --prod: var(--recon); border: 1px solid var(--border-med); border-radius: 14px; background: var(--bg-1); padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; min-width: 0; }
.door::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--prod); }
.door--datum { --prod: var(--datum); }
.door__over { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg2); }
.door__over img { width: 18px; height: 18px; border-radius: 4px; }
.door__over i { width: 7px; height: 7px; border-radius: 50%; background: var(--prod); }
.door h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.03em; line-height: 1.12; text-wrap: balance; }
.door p { font-size: 15px; line-height: 1.55; color: var(--fg2); max-width: 520px; }
.door__stage { margin: 6px -24px 4px; background: var(--bg-0); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); position: relative; }
.door__stage .split3d { aspect-ratio: 16 / 8.2; background: var(--bg-0); }
.door__stage video { display: block; width: 100%; aspect-ratio: 16 / 8.2; object-fit: cover; background: var(--viewport); }
.door__caption { position: absolute; left: 12px; bottom: 10px; z-index: 3; font-family: var(--mono); font-size: 12px; color: var(--fg); background: color-mix(in oklch, var(--bg-1) 88%, transparent); padding: 3px 8px; border-radius: 6px; }
.door__actions { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin-top: 6px; }
.door__note { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; color: var(--fg2); }

/* ── Prices, in short ── */
.prices-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.price-card { border-top: 2px solid var(--prod, var(--fg)); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.price-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.price-card p { font-size: 15px; line-height: 1.6; color: var(--fg2); }
.price-card p b { color: var(--fg); }
.price-card .sf-link { margin-top: 4px; }
.price-card--datum { --prod: var(--datum); } .price-card--recon { --prod: var(--recon); }

/* ── What we do ── */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.work {
  display: flex; flex-direction: column; gap: 12px;
  padding: 36px 36px 40px 0; border-bottom: 1px solid var(--border);
  color: inherit; text-decoration: none; position: relative;
}
.work + .work { padding-left: 36px; border-left: 1px solid var(--border); }
.work:last-child { padding-right: 0; }
.work::before { content: ''; position: absolute; top: -1px; left: 0; width: 0; height: 1px; background: var(--accent); transition: width .4s var(--ease-out); }
.work + .work::before { left: 36px; }
.work:hover::before { width: 48px; }
.work .ws-num { margin-bottom: 8px; }
.work-title { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.025em; }
.work-desc { color: var(--fg2); font-size: 15px; line-height: 1.7; }
.work .sf-link { margin-top: auto; padding-top: 8px; }
.work:hover .sf-link .arrow { transform: translateX(3px); }
.work-more { margin-top: 28px; font-size: 14px; color: var(--fg2); }

/* ── Why drawings ── */
.why { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.why-inner { max-width: 1100px; margin: 0 auto; padding: 100px 44px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.why-prose p { font-size: 17px; line-height: 1.7; color: var(--fg); margin-bottom: 20px; }
.why-prose p:last-child { margin-bottom: 0; }
.why-prose b { font-weight: 600; }
.why-pull { margin-top: 28px; padding: 20px 24px; border-left: 3px solid var(--recon); background: var(--bg); border-radius: 0 10px 10px 0; font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.4; }
.why-pull span { display: block; margin-top: 6px; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3); }

/* ── How we work ── */
.workflow { padding: 120px 44px; max-width: 1100px; margin: 0 auto; }

@media (max-width: 900px) {
  .home-hero { padding: 96px 16px 20px; }
  .home-lede { font-size: 17px; }
  .doors { grid-template-columns: 1fr; padding: 8px 16px 48px; gap: 16px; }
  .door { padding: 18px 16px 18px; }
  .door__stage { margin: 4px -16px 2px; }
  .door__stage .split3d, .door__stage video { aspect-ratio: 16 / 10; }
  .prices-grid { grid-template-columns: 1fr; gap: 28px; }
  .work-grid { grid-template-columns: 1fr; }
  .work, .work + .work, .work:last-child { padding: 28px 0; border-left: none; }
  .work + .work::before { left: 0; }
  .why-inner { grid-template-columns: 1fr; gap: 32px; padding: 64px 16px; }
  .workflow { padding: 64px 16px; }
}

/* ── the home page's top: one statement in two weights, then one large panel where Recon, Datum and Seal take turns.
   Each slide has its own tinted background with a slowly drifting glow, a faint drawing grid over it, the product's line
   in large type and its real screen bleeding off the panel's edge; the marks are the tabs. hstage.js turns it. ── */
.hh2 { max-width: 1440px; margin: 0 auto; padding: 112px 48px 24px; }
.hh2__head { max-width: 1240px; }
.hh2__eyebrow { margin: 0 0 22px; font: 500 12px/1 var(--mono, ui-monospace, monospace); letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-fg3, #8d9097); }
/* the first screen: one promise in eight words, one line of how, one action, and what makes it safe to click */
.hh2__title { margin: 0; max-width: 15ch; font: 600 clamp(38px, 5.4vw, 76px)/1.0 var(--font, inherit); letter-spacing: -0.045em; color: var(--fg-0, #0b0c0e); text-wrap: balance; }
.hh2__sub { margin: 20px 0 0; max-width: 36em; font: 400 clamp(17px, 1.45vw, 20px)/1.5 var(--font, inherit); color: var(--c-fg2, #50545b); text-wrap: pretty; }
.hh2__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hh2__trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 0 0; padding: 0; list-style: none; font: 500 12px/1.3 var(--mono, ui-monospace, monospace); letter-spacing: 0.01em; color: var(--c-fg3, #8d9097); }
.hh2__trust li { display: inline-flex; align-items: center; gap: 8px; }
.hh2__trust li::before { content: ""; width: 9px; height: 5px; margin-top: -3px; border-left: 1.6px solid var(--ok, #2f9e5b); border-bottom: 1.6px solid var(--ok, #2f9e5b); transform: rotate(-45deg); flex: none; }

.hpanel { position: relative; margin-top: 52px; border-radius: 8px; overflow: hidden; background: #0b0c0e; color: #fff; isolation: isolate;
  box-shadow: 0 0 0 1px var(--c-line, transparent); }   /* an edge on a dark page, where the panel would blend in */
.hpanel__grid { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(rgb(255 255 255 / 0.055) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 28% 42%, #000 15%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 85% at 28% 42%, #000 15%, transparent 78%); }
.hpanel__slides { display: grid; }

.hslide { grid-area: 1 / 1; position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; min-height: 620px;
  opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0s linear 0.9s; }
.hslide.is-on { opacity: 1; visibility: visible; transition: opacity 0.9s ease, visibility 0s; }
.hslide__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--hs-base); }
.hslide__bg::before { content: ''; position: absolute; inset: -25%; background: var(--hs-glow); animation: hs-drift 18s ease-in-out infinite alternate; }
.hslide--recon { --hs-base: linear-gradient(160deg, #0a0d14 0%, #0f1a2c 55%, #14284a 100%);
  --hs-glow: radial-gradient(40% 44% at 72% 78%, rgb(41 112 230 / 0.78), transparent 70%), radial-gradient(28% 32% at 16% 12%, rgb(127 176 255 / 0.16), transparent 70%); }
.hslide--datum { --hs-base: linear-gradient(160deg, #080d10 0%, #0d1c24 55%, #12303f 100%);
  --hs-glow: radial-gradient(40% 44% at 74% 76%, rgb(58 150 214 / 0.72), transparent 70%), radial-gradient(28% 32% at 16% 14%, rgb(127 200 255 / 0.14), transparent 70%); }
.hslide--seal { --hs-base: linear-gradient(160deg, #0e0d0c 0%, #1b1916 55%, #2a2622 100%);
  --hs-glow: radial-gradient(40% 44% at 74% 78%, rgb(176 150 118 / 0.62), transparent 70%), radial-gradient(28% 32% at 16% 14%, rgb(77 141 255 / 0.16), transparent 70%); }
@keyframes hs-drift { from { transform: translate3d(-4%, 3%, 0) scale(1); } to { transform: translate3d(5%, -4%, 0) scale(1.1); } }

.hslide__text { position: relative; z-index: 2; padding: 72px 24px 156px 64px; }
.hslide__over { font: 500 12px/1 var(--mono, ui-monospace, monospace); letter-spacing: 0.08em; text-transform: uppercase; color: rgb(255 255 255 / 0.6); }
.hslide__title { margin: 18px 0 0; font: 600 clamp(36px, 4.3vw, 66px)/1.02 var(--font, inherit); letter-spacing: -0.035em; color: #fff; text-wrap: balance; }
.hslide__line { margin: 22px 0 0; max-width: 46ch; font-size: 16px; line-height: 1.55; color: rgb(255 255 255 / 0.72); }
.hslide__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 22px; padding-bottom: 2px; color: #fff; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid rgb(255 255 255 / 0.4); }
.hslide__link:hover { border-color: #fff; }
.hslide__link:focus-visible { outline: 2px solid #7fb0ff; outline-offset: 4px; }

/* the screen: in from below as its slide comes, bleeding off the panel's right and bottom edges */
.hslide__shot { position: relative; z-index: 2; align-self: end; margin: 0; aspect-ratio: 1600 / 1000; border-radius: 12px; overflow: hidden; background: #f4f4f2;
  transform: translate(7%, 11%); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12), 0 40px 90px -20px rgb(0 0 0 / 0.7);
  opacity: 0; translate: 0 34px; transition: opacity 0.9s ease 0.15s, translate 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s; }
.hslide.is-on .hslide__shot { opacity: 1; translate: 0 0; }
.hslide--seal .hslide__shot { aspect-ratio: 1400 / 788; }
.hslide__shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
/* Recon: the drawing, then the checked part; Datum: the model, then its drawing */
.hshot__alt { opacity: 0; }
.hslide.is-on .hshot__alt { animation: hshot-story 9s ease-in-out infinite; }
@keyframes hshot-story { 0%, 38% { opacity: 0; } 48%, 90% { opacity: 1; } 100% { opacity: 0; } }

.hpanel__tabs { position: absolute; z-index: 3; left: 64px; bottom: 48px; display: flex; flex-wrap: wrap; gap: 8px; }
.htab { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 7px 18px 7px 7px; border-radius: 999px; overflow: hidden; cursor: pointer;
  border: 1px solid rgb(255 255 255 / 0.18); background: rgb(255 255 255 / 0.07); color: #fff; font: 500 14px/1 var(--font, inherit);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.htab:hover { background: rgb(255 255 255 / 0.13); }
.htab img { width: 28px; height: 28px; border-radius: 7px; display: block; flex: none; }
.htab[aria-selected="true"] { background: #fff; border-color: #fff; color: #0b0c0e; }
.htab:focus-visible { outline: 2px solid #7fb0ff; outline-offset: 2px; }
/* while the panel turns by itself, the chosen tab shows how long until the next product */
.htab::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: #1769e0; }
.is-turning .htab[aria-selected="true"]::after { animation: htab-time 9s linear forwards; }
.is-turning.is-paused .htab[aria-selected="true"]::after { animation-play-state: paused; }
@keyframes htab-time { to { width: 100%; } }

@media (max-width: 900px) {
  .hh2 { padding: 92px 16px 16px; }
  .hh2__sub { margin-top: 14px; }
  .hh2__actions { margin-top: 24px; }
  .hh2__trust { gap: 6px 14px; font-size: 11.5px; }
  .hpanel { margin-top: 36px; }
  .hslide { grid-template-columns: 1fr; align-items: start; min-height: 0; }
  .hslide__text { padding: 34px 24px 0; }
  .hslide__title { font-size: clamp(30px, 8.4vw, 42px); }
  .hslide__line { font-size: 15px; }
  .hslide__shot { margin: 28px 0 0 24px; transform: none; border-radius: 10px 0 0 0; }
  .hpanel__tabs { position: relative; left: auto; bottom: auto; padding: 16px 24px 24px; background: rgb(255 255 255 / 0.04); border-top: 1px solid rgb(255 255 255 / 0.1); }
  .htab { padding-right: 14px; font-size: 13.5px; }
}
/* a phone: the two actions share the width instead of stacking at two different widths */
@media (max-width: 520px) {
  .hh2__actions > .btn-hero { flex: 1 1 100%; justify-content: center; }
  .hh2__eyebrow { font-size: min(10.5px, 2.6vw); letter-spacing: 0.03em; white-space: nowrap; }   /* the three lines of work on one line, smaller on a narrow phone so the Spanish fits */
}
@media (prefers-reduced-motion: reduce) {
  .hslide__bg::before { animation: none; }
  .hslide.is-on .hshot__alt { animation: none; }
  .hslide, .hslide.is-on, .hslide__shot { transition: none; }
}
