/* =====================================================================
   Dwell Secure — inner pages (story, responders, shutoffs, contact, legal)
   ===================================================================== */

.page-head.grid-bg::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 40%, var(--bg)); }
.page-head > .wrap { position: relative; z-index: 1; }
.page-head .h-xl, .page-head .h-lg { margin-top: 20px; max-width: 16ch; }
.page-head .h-lg { max-width: 22ch; }

/* ---------- Story ---------- */
.story-head .h-xl { max-width: 14ch; }
.origin__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
.origin__photo { position: sticky; top: 110px; margin: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xl); aspect-ratio: 4 / 4.6; }
.origin__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.origin__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(12,34,56,.88)); }
.origin__photo figcaption { position: absolute; z-index: 1; left: 24px; right: 24px; bottom: 22px; color: #fff; font: 400 12.5px/1.45 var(--f-mono); }
.origin__photo figcaption b { display: block; font: 500 26px/1.1 var(--f-display); margin-bottom: 6px; }
.dropcap::first-letter { float: left; font: 500 5.2em/.82 var(--f-display); margin: .06em .1em 0 0; color: var(--fire); }
.prose blockquote cite { display: block; margin-top: 12px; font: 400 13px/1.4 var(--f-mono); font-style: normal; color: var(--ink-3); }
@media (max-width: 860px) { .origin__grid { grid-template-columns: 1fr; } .origin__photo { position: relative; top: 0; aspect-ratio: 16/11; } }

/* Vertical timeline with a line that fills as you scroll */
.vt { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 980px; }
.vt__line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-50%); background: var(--line-2); }
.vt__line i { display: block; width: 100%; height: 0; background: linear-gradient(180deg, var(--water), var(--fire)); }
.vt__item { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 22px 0; }
.vt__item::before { content: ""; position: absolute; left: 50%; top: 44px; width: 14px; height: 14px; border-radius: 50%; transform: translateX(-50%); background: var(--bg); border: 3px solid var(--brand); z-index: 1; transition: background .4s, transform .4s var(--spring); }
.vt__item.is-in::before { background: var(--brand); }
.vt__item--hi::before { border-color: var(--fire); background: var(--fire) !important; box-shadow: 0 0 0 8px color-mix(in srgb, var(--fire) 20%, transparent); }
.vt__when { grid-column: 1; text-align: right; padding-top: 30px; font: 400 clamp(30px, 3.4vw, 46px)/1 var(--f-display); letter-spacing: -.03em; color: var(--brand); }
.vt__card { grid-column: 2; padding: 26px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.vt__item:nth-of-type(odd) .vt__when { grid-column: 2; grid-row: 1; text-align: left; }
.vt__item:nth-of-type(odd) .vt__card { grid-column: 1; grid-row: 1; }
.vt__item--hi .vt__card { border-color: color-mix(in srgb, var(--fire) 45%, transparent); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--fire) 60%, transparent); }
.vt__item--hi .vt__when { color: var(--fire); }
.vt__card h3 { font-size: 26px; margin-bottom: 10px; }
.vt__card p { margin: 0; color: var(--ink-2); font-size: 16.5px; }
.vt__card a { color: var(--brand); text-underline-offset: 3px; }
@media (max-width: 760px) {
  .vt__line { left: 7px; transform: none; }
  .vt__item { grid-template-columns: 1fr; gap: 10px; padding: 16px 0 16px 34px; }
  .vt__item::before { left: 1px; top: 22px; transform: none; }
  .vt__when, .vt__item:nth-of-type(odd) .vt__when { grid-column: 1; grid-row: 1; text-align: left; padding-top: 14px; }
  .vt__card, .vt__item:nth-of-type(odd) .vt__card { grid-column: 1; grid-row: 2; }
}

/* FireTrex partnership */
.partner { overflow: hidden; background: radial-gradient(ellipse 60% 80% at 10% 50%, #2a1206 0%, var(--night) 65%); }
.partner__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.partner .h-lg { margin: 18px 0 22px; }
.partner__p { color: var(--on-night-2); font-size: 17px; max-width: 60ch; }
.partner__logos { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.partner__tile { width: 220px; aspect-ratio: 1; border-radius: 40px; display: grid; place-items: center; align-content: center; gap: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); animation: float 7s ease-in-out infinite; }
.partner__tile:last-child { animation-delay: -3.5s; }
.partner__tile svg, .partner__tile img { width: 96px; height: 110px; object-fit: contain; }
.partner__tile span { font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-night-2); }
.partner__plus { display: flex; align-items: center; gap: 12px; color: #ff8a4c; }
.partner__plus i { width: 40px; height: 1px; background: currentColor; opacity: .5; }
.partner__plus b { font: 300 34px/1 var(--f-display); }
.partner__vals { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 30px; border-radius: var(--r); overflow: hidden; background: rgba(255,255,255,.08); }
.partner__vals div { background: var(--night); padding: 18px 20px; }
.partner__vals b { display: block; color: var(--on-night); font-size: 15.5px; margin-bottom: 4px; }
.partner__vals span { color: var(--on-night-2); font-size: 14px; line-height: 1.5; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-1.5deg); } }
@media (max-width: 900px) { .partner__grid { grid-template-columns: 1fr; } .partner__logos { flex-direction: row; } .partner__tile { width: 130px; border-radius: 28px; } .partner__tile svg, .partner__tile img { width: 60px; height: 68px; } .partner__plus i { width: 14px; } }
@media (max-width: 520px) { .partner__vals { grid-template-columns: 1fr; } }

.values__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value { padding: 32px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.value::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--c); }
.value span { font: 500 13px/1 var(--f-mono); color: var(--c); }
.value h3 { font-size: 26px; margin: 16px 0 10px; }
.value p { margin: 0; color: var(--ink-2); font-size: 16.5px; }
@media (max-width: 860px) { .values__grid { grid-template-columns: 1fr; } }

/* ---------- Responders ---------- */
.resp-head { background: var(--night); color: var(--on-night); overflow: hidden; padding-bottom: clamp(70px, 9vw, 120px); }
.resp-head .lede { color: var(--on-night-2); }
.resp-head .eyebrow { --dot: #ff8a4c; }
.resp-head h1 em { color: #ff8a4c; }
.resp-head .btn--ghost { --bi: var(--on-night); box-shadow: inset 0 0 0 1.5px rgba(234,241,246,.3); }
.resp-head__glow { position: absolute; right: -10%; top: -30%; width: 900px; height: 900px; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,81,27,.32), transparent 70%); animation: breathe 9s ease-in-out infinite; }
.resp-head__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.resp-devices { position: relative; height: clamp(460px, 46vw, 620px); }
.resp-devices .device { position: absolute; width: clamp(220px, 21vw, 290px); }
.resp-devices .device:first-child { left: 4%; top: 8%; transform: rotate(-7deg); opacity: .92; }
.resp-devices .device:last-child { right: 4%; top: 0; transform: rotate(5deg); animation: hoverY 7s ease-in-out infinite; }
@keyframes hoverY { 50% { translate: 0 -12px; } }
@media (max-width: 900px) { .resp-head__grid { grid-template-columns: 1fr; } .resp-devices { height: 480px; max-width: 460px; margin: 0 auto; width: 100%; } .resp-devices .device { width: 210px; } }

/* Screens gallery */
.shots__track { display: flex; justify-content: safe center; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none;
  padding: 10px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 60px; }
.shots__track::-webkit-scrollbar { display: none; }
.shot { flex: none; width: max(150px, calc((min(100vw, var(--wrap)) - 2 * var(--gutter) - 5 * 24px) / 6)); margin: 0; scroll-snap-align: center; }
.shot .device { transition: transform .6s var(--spring); }
.shot:hover .device { transform: translateY(-10px) rotate(-1deg); }
.shot figcaption { margin-top: 22px; text-align: center; font-size: 14.5px; color: var(--ink-2); }
.shot figcaption b { display: block; font: 500 20px/1.2 var(--f-display); color: var(--ink); margin-bottom: 4px; }

.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: f; }
.flow li { position: relative; padding: 28px 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.flow li:not(:last-child)::after { content: ""; position: absolute; right: -16px; top: 46px; width: 12px; height: 12px; border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2); transform: rotate(45deg); }
.flow span { font: 400 44px/1 var(--f-display); color: var(--fire); }
.flow h3 { font-size: 22px; margin: 14px 0 8px; }
.flow p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 960px) { .flow { grid-template-columns: 1fr 1fr; } .flow li::after { display: none; } }
@media (max-width: 560px) { .flow { grid-template-columns: 1fr; } }

.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat__item { padding: 30px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: transform .5s var(--spring), box-shadow .4s; }
.feat__item:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }
.feat__item i { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.feat__item i svg { width: 24px; height: 24px; }
.feat__item h3 { font-size: 24px; margin: 18px 0 8px; }
.feat__item p { margin: 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 900px) { .feat { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feat { grid-template-columns: 1fr; } }

.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.role { padding: 28px; border-radius: var(--r-lg); border: 1px dashed var(--line-2); }
.role b { font: 500 24px/1.1 var(--f-display); }
.role p { margin: 12px 0 0; color: var(--ink-2); font-size: 16px; }
@media (max-width: 860px) { .roles { grid-template-columns: 1fr; } }

.cta-band { overflow: hidden; }
.cta-band__in { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.cta-band .h-lg { margin: 16px 0 14px; }

/* ---------- Shutoff videos ---------- */
.warn { display: flex; gap: 14px; align-items: flex-start; max-width: 760px; margin-top: 30px; padding: 18px 22px; border-radius: var(--r); background: var(--gas-soft); border: 1px solid color-mix(in srgb, var(--gas) 35%, transparent); }
.warn svg { flex: none; width: 24px; height: 24px; color: var(--gas); margin-top: 2px; }
.warn p { margin: 0; font-size: 16px; color: var(--ink); }
.vids .wrap { display: grid; gap: clamp(40px, 6vw, 80px); padding-bottom: 20px; }
.vid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(28px, 4vw, 56px); align-items: center; scroll-margin-top: 100px; }
.vid:nth-child(even) { grid-template-columns: .75fr 1.25fr; }
.vid:nth-child(even) .vid__frame { order: 2; }
.vid__frame { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #000; box-shadow: var(--shadow-xl); aspect-ratio: 16 / 9; }
.vid__frame::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); pointer-events: none; z-index: 1; }
.vid__frame video { width: 100%; height: 100%; object-fit: cover; }
.vid__tag { display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.vid__tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.vid h2 { font-size: clamp(30px, 3.2vw, 44px); margin: 14px 0 14px; }
.vid p { color: var(--ink-2); font-size: 17px; }
.vid__more { display: inline-block; margin-top: 18px; color: var(--brand); font-weight: 600; text-decoration: none; }
.vid__more:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .vid, .vid:nth-child(even) { grid-template-columns: 1fr; } .vid:nth-child(even) .vid__frame { order: 0; } }
.note-band { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; padding: clamp(28px, 4vw, 48px); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.note-band p { margin: 10px 0 0; color: var(--ink-2); max-width: 56ch; }

/* ticks reused from home */
.ticks { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 30px; font-size: 16px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: color-mix(in srgb, var(--c, var(--brand)) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.4l2.6 2.6L14 7.4' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contact__card { display: flex; flex-direction: column; padding: 32px 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; transition: transform .5s var(--spring), box-shadow .4s, border-color .3s; scroll-margin-top: 110px; }
.contact__card:hover, .contact__card:target { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: var(--c); }
.contact__card i { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.contact__card i svg { width: 26px; height: 26px; }
.contact__card h2 { font-size: 28px; margin: 20px 0 10px; }
.contact__card p { color: var(--ink-2); font-size: 16px; }
.contact__card span { margin-top: auto; padding-top: 8px; font: 500 14px/1 var(--f-mono); color: var(--c); }
.contact__band { position: relative; margin: clamp(48px, 6vw, 80px) 0 clamp(60px, 8vw, 110px); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1140 / 450; box-shadow: var(--shadow-xl); }
.contact__band img { width: 100%; height: 100%; object-fit: cover; }
.contact__band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 30%, rgba(12,34,56,.92) 75%); }
.contact__band figcaption { position: absolute; z-index: 1; right: 5%; top: 50%; transform: translateY(-50%); width: min(44%, 460px); color: #fff; }
.contact__band b { display: block; font: 400 clamp(20px, 2.4vw, 32px)/1.2 var(--f-display); letter-spacing: -.01em; }
.contact__band span { display: block; margin-top: 14px; font: 400 12px/1.4 var(--f-mono); color: #b3c2ce; }
@media (max-width: 860px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__band { aspect-ratio: auto; }
  .contact__band img { aspect-ratio: 1140/450; height: auto; }
  .contact__band::after { display: none; }
  .contact__band figcaption { position: static; transform: none; width: auto; padding: 24px; background: var(--night); }
}

/* ---------- Legal ---------- */
.legal .prose h2 { font-size: clamp(24px, 2.4vw, 30px); }
.legal .prose { font-size: 17px; }
.legal__toc { columns: 2; column-gap: 32px; padding: 20px 24px 20px 44px !important; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 620px) { .legal__toc { columns: 1; } }

/* ---------- 404 ---------- */
.nf { padding: clamp(80px, 12vw, 160px) 0; text-align: center; }
.nf__art { width: min(380px, 80vw); margin: 0 auto 30px; color: var(--blueprint); }
.nf .lede { margin: 18px auto 30px; }
.nf__links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

@keyframes breathe { 50% { transform: scale(1.15) translate(-30px, 20px); opacity: .7; } }
@media (max-width: 1000px) { .shot { width: 200px; } }
