/*
 * Shared stylesheet for every generated open source tool page (scripts/build-open-source.js).
 * The rules down to the footer block are the /vault/ page's own inline styles, copied so the
 * generated pages read as the same family. /vault/ keeps its inline copy and is not linked
 * to this file, so editing here never moves the hand built page.
 */
.page-head { padding:clamp(150px,17vw,215px) 4.25vw clamp(50px,6vw,80px); }
.page-head h1 { max-width:960px; }
.page-head > p { max-width:610px; color:#494947; font-size:clamp(15px,1.35vw,18px); line-height:1.62; }
.page-head { padding-top:calc(clamp(150px,17vw,215px) + var(--sat)); }

/* The product lockup in the page head. Square edges and flat fills, so the mark sits in
   the Altitude language rather than on top of it. */
.lockup { display:flex; align-items:center; gap:13px; margin-bottom:22px; }
.lockup img { display:block; width:38px; height:38px; }
.lockup span { font:500 11px/1 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--smoke); }

/* Every image here renders the tool's real output, so it is documentation as much as
   decoration. Width and height are set so nothing reflows while it loads. */
figure.shot { margin:0; }
figure.shot img { display:block; width:100%; height:auto; border:1px solid var(--rule); }
figure.shot figcaption { padding:12px 2px 0; font:500 10px/1.6 var(--mono); letter-spacing:.13em; text-transform:uppercase; color:var(--smoke); }
.head-shot { padding:0 4.25vw clamp(30px,4vw,56px); }
.head-shot figure.shot { max-width:900px; }
@media (max-width:760px) { .head-shot { padding:0 5.4vw 34px; } }

.band { display:grid; grid-template-columns:minmax(145px,25%) minmax(0,1fr); padding:clamp(78px,10vw,140px) 4.25vw; border-top:1px solid var(--rule); }
.band-body { max-width:900px; }
.band-body h2 { font-size:clamp(30px,3.4vw,46px); margin-bottom:18px; }
.band-lede { max-width:640px; color:#5b5a56; font-size:16px; line-height:1.65; margin-bottom:34px; }

/* The failure list. Each row is one habit and the price it charges, so the problem is
   stated as consequences rather than as a lecture. */
.leaks { border-top:1px solid var(--rule); margin:0; padding:0; list-style:none; max-width:760px; }
.leaks li { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:8px 28px; padding:20px 0; border-bottom:1px solid var(--rule); }
.leaks b { font-size:17px; font-weight:500; letter-spacing:-.035em; }
.leaks span { color:#5e5d59; font-size:15px; line-height:1.6; }
@media (max-width:620px) { .leaks li { grid-template-columns:1fr; gap:6px; } }

.specs { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:0; border-top:1px solid var(--rule); max-width:920px; }
.specs div { padding:22px 24px 24px 0; border-bottom:1px solid var(--rule); }
.specs dt { color:var(--rose); font:500 10px/1.5 var(--mono); letter-spacing:.15em; text-transform:uppercase; margin-bottom:10px; }
.specs dd { margin:0; color:#5e5d59; font-size:15px; line-height:1.6; }
.specs dd strong { display:block; color:var(--ink); font-size:17px; font-weight:500; letter-spacing:-.035em; margin-bottom:6px; }

/* The capture. Dark band so it reads as the one thing on the page to act on. */
.grab { display:grid; grid-template-columns:minmax(145px,25%) minmax(0,1fr); padding:clamp(88px,11vw,150px) 4.25vw; background:var(--night); color:var(--paper); border-top:1px solid var(--rule); }
.grab .section-index { color:#bdbcb5; }
.grab-body { max-width:640px; }
.grab-body h2 { font-size:clamp(34px,4.2vw,58px); margin-bottom:18px; }
.grab-body > p { color:#c4c3bc; font-size:16px; line-height:1.65; margin-bottom:34px; max-width:560px; }

/* Controls WRAP onto a second line rather than scrolling sideways. The field has a
   min-width so it never collapses to an unusable sliver on a narrow phone. */
.grab-form { display:flex; flex-wrap:wrap; gap:12px; align-items:stretch; }
.grab-form label { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.grab-form input[type=email], .grab-form input[type=text] { flex:1 1 300px; min-width:0; min-height:58px; padding:0 18px; background:transparent; border:1px solid rgba(238,236,231,.4); color:var(--paper); font:400 15px/1 var(--sans); }
.grab-form input::placeholder { color:#8f8e88; }
.grab-form input:focus-visible { outline:2px solid var(--paper); outline-offset:-2px; }
.grab-form button { flex:0 0 auto; min-height:58px; padding:0 27px; border:0; cursor:pointer; color:var(--ink); background:var(--paper); font:500 10px/1 var(--mono); letter-spacing:.14em; text-transform:uppercase; transition:background-color .25s ease,transform .25s ease; }
.grab-form button:hover:not(:disabled) { background:#c9c7c0; }
.grab-form button:active:not(:disabled) { transform:translateY(1px) scale(.98); }
.grab-form button:disabled { opacity:.55; cursor:default; }
.hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

.grab-note { margin:20px 0 0; color:#9d9c96; font:500 10px/1.7 var(--mono); letter-spacing:.13em; text-transform:uppercase; max-width:520px; }
/* Inline status, never a browser dialog. Reserves no space until it says something. */
.grab-status { margin:18px 0 0; font-size:15px; line-height:1.6; min-height:0; }
.grab-status[data-tone=error] { color:#e8a7a9; }
.grab-status[data-tone=ok] { color:var(--paper); }
.grab-done { display:none; }
.grab-done h3 { font-size:clamp(24px,2.6vw,34px); font-weight:500; letter-spacing:-.05em; margin:0 0 14px; }
.grab-done p { color:#c4c3bc; font-size:16px; line-height:1.65; margin:0 0 12px; max-width:540px; }
.grab-done a.text-link { color:var(--paper); border-bottom-color:var(--paper); display:inline-block; margin-top:10px; }
.is-sent .grab-form, .is-sent .grab-note, .is-sent .grab-body > p, .is-sent .grab-body > h2 { display:none; }
.is-sent .grab-done { display:block; }

@media (max-width:760px) {
  .band, .grab { display:block; padding:70px 5.4vw; }
  .page-head { padding:130px 5.4vw 40px; padding-top:calc(130px + var(--sat)); }
  .grab-form button { flex:1 1 100%; }
}

footer { flex-wrap:wrap; }
.legal { flex-basis:100%; order:9; margin-top:14px; padding-top:13px; border-top:1px solid rgba(238,236,231,.16); font:500 9px/1.7 var(--mono); letter-spacing:.1em; text-transform:uppercase; color:#9d9c96; }
@media (max-width:760px) { .legal { margin-top:4px; } }

/* Generated page additions. */
.lockup .lockup-text { font:500 11px/1.4 var(--mono); letter-spacing:.2em; text-transform:uppercase; color:var(--smoke); }
.lockup .lockup-chip { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; background:var(--night); color:var(--paper); font:500 11px/1 var(--mono); letter-spacing:.08em; }
.page-head .disclaimer { margin-top:22px; max-width:610px; padding-top:16px; border-top:1px solid var(--rule); color:#5e5d59; font-size:14px; line-height:1.6; }
.page-head .head-actions { display:flex; flex-wrap:wrap; gap:12px 26px; align-items:center; margin-top:30px; }
.repo-line { display:block; margin-top:6px; font:500 12px/1.6 var(--mono); letter-spacing:.02em; color:var(--smoke); overflow-wrap:anywhere; }
.specs dd strong { overflow-wrap:anywhere; }
.grab-done .repo-line { color:#bdbcb5; }
/* Four facts read as two pairs, never three and an orphan. */
.specs-pair { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (max-width:620px) { .specs-pair { grid-template-columns:1fr; } }

/* /freebies/: every tool as a card. The card rules are the portfolio page's own .tool
   component (public/portfolio/index.html keeps its inline copy), so a card looks the same
   in both places. */
.tools-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr)); gap:18px; }
.tool { display:flex; flex-direction:column; max-width:560px; border:1px solid var(--rule); background:#e6e3dc; transition:border-color .25s ease; }
.tool:hover { border-color:var(--ink); }
.tool > img { display:block; width:100%; height:auto; border-bottom:1px solid var(--rule); }
.tool-txt { display:flex; flex-direction:column; gap:13px; padding:22px 24px 24px; }
.tool-head { display:flex; align-items:baseline; justify-content:space-between; gap:14px; }
.tool-nm { font-size:20px; letter-spacing:-.04em; }
.tool-tag { flex:none; font:500 9px/1.5 var(--mono); letter-spacing:.14em; text-transform:uppercase; color:var(--rose); }
.tool-body { color:#5e5d59; font-size:15px; line-height:1.62; }
.tool-go { align-self:flex-start; padding-bottom:5px; border-bottom:1px solid var(--ink); font:500 10px/1 var(--mono); letter-spacing:.12em; text-transform:uppercase; }
.tool-go span { font-size:15px; margin-left:7px; }
.tool-plate { display:flex; flex-direction:column; justify-content:space-between; gap:18px; aspect-ratio:16/10; padding:clamp(18px,3vw,30px); background:var(--night); color:var(--paper); border-bottom:1px solid var(--rule); }
.tool-plate-chip { align-self:flex-start; padding:7px 9px; border:1px solid rgba(238,236,231,.4); font:500 11px/1 var(--mono); letter-spacing:.14em; }
.tool-plate-cmd { font:400 clamp(12px,1.2vw,15px)/1.6 var(--mono); color:#bdbcb5; overflow-wrap:anywhere; }
.tool-plate-cmd b { font-weight:500; color:var(--paper); }
.band-more { margin-top:34px; }
