/*
Theme Name: Soho Precision
Theme URI: https://sohoprecision.com
Author: Soho Precision
Description: Custom one-page theme for Soho Precision, a machine shop and contract manufacturer in Lower Manhattan. Includes a real quote form with file uploads, editable contact details in the Customizer, and self-hosted fonts and video.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: soho-precision
*/

@font-face {
  font-family: "Montserrat";
  src: url("assets/fonts/montserrat-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ECEDEE;
  --bg-alt: #E0E2E4;
  --ink: #1E2124;
  --muted: #565C62;
  --rule: #B4B8BC;
  --mark: #7C7C7C;
  --accent: #1E2124;
  --on-accent: #FFFFFF;
  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --text: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171A;
    --bg-alt: #1D2024;
    --ink: #E8E9EA;
    --muted: #A2A8AE;
    --rule: #3C4147;
    --accent: #E8E9EA;
    --on-accent: #101318;
  }
}
:root[data-theme="dark"] {
  --bg: #15171A;
  --bg-alt: #1D2024;
  --ink: #E8E9EA;
  --muted: #A2A8AE;
  --rule: #3C4147;
  --accent: #E8E9EA;
  --on-accent: #101318;
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1280px; margin: 0 auto; padding-inline: var(--gutter); }
/* header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px; }
.brand { display: block; color: var(--mark); line-height: 0; }
.brand svg { height: 56px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); font-family: var(--display); font-size: 1.0625rem; }
.site-nav a { text-decoration: none; }
.site-nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 6px; }
.btn {
  --btn-fill: #111; --btn-ink: #fff; --btn-line: #fff; --btn-edge: #111;
  --btn-rings: inset 0 0 0 3px var(--btn-fill), inset 0 0 0 4px var(--btn-line);
  display: inline-block;
  background: var(--btn-fill);
  color: var(--btn-ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.8125rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 26px;
  border: 1px solid var(--btn-edge);
  border-radius: 0;
  box-shadow: var(--btn-rings);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--btn-line); color: var(--btn-fill); box-shadow: inset 0 0 0 3px var(--btn-line), inset 0 0 0 4px var(--btn-fill); }
.site-nav .btn { padding: 11px 18px; font-size: 0.75rem; }
@media (max-width: 720px) {
  .site-nav .hide-sm { display: none; }
  .brand svg { height: 48px; }
}
/* hero */
.hero { padding-top: clamp(40px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); }
.hero h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.05rem, 4.9vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0.005em;
  margin: 0 0 28px;
  max-width: 23ch;
  text-wrap: balance;
}
.hero p.lede { max-width: 56ch; font-size: 1.0625rem; color: var(--muted); margin: 0 0 36px; }
.hero .rush { margin: 26px 0 0; font-size: 1.0625rem; line-height: 1.5; color: var(--ink); max-width: 56ch; text-wrap: balance; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
/* the ruler: echoes the logo's bars, a taller mark every fifth */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
/* reel + stills */
.hero-video { position: relative; background: #000; aspect-ratio: 2 / 1; overflow: hidden; margin-top: clamp(40px, 6vw, 72px); }
@media (max-width: 720px) {
  .hero-video { aspect-ratio: 4 / 3; }
}
.hero-video video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 10px; margin-top: 10px; align-items: start; }
.mosaic picture { display: contents; }
.mosaic figure { margin: 0; order: var(--o, 0); }
.mosaic .ph { position: relative; overflow: hidden; background: var(--bg-alt); aspect-ratio: 1 / 1; }
.mosaic .ph::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.10); pointer-events: none; }
.mosaic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mosaic .big, .mosaic .big2, .mosaic .wide, .mosaic .door { grid-column: span 2; }
.mosaic .big .ph, .mosaic .wide .ph { aspect-ratio: 4 / 3; }
.mosaic .door .ph { aspect-ratio: 3 / 5; }
@media (min-width: 800px) {
  .mosaic { grid-template-columns: repeat(3, 1fr); gap: 28px 12px; }
  .mosaic figure { order: 0; }
  .mosaic .big, .mosaic .big2, .mosaic .wide, .mosaic .door { grid-column: auto; }
  .mosaic .big .ph, .mosaic .wide .ph, .mosaic .door .ph { aspect-ratio: 1 / 1; }
}
/* trio of vertical clips */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.clip { margin: 0; }
.clip .ph { aspect-ratio: 3 / 4; background: #000; overflow: hidden; }
.clip video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
@media (max-width: 720px) {
  .trio {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .trio::-webkit-scrollbar { display: none; }
  .clip { flex: 0 0 72%; scroll-snap-align: start; }
}
/* equipment and skills, grouped */
.caps-head { margin-bottom: clamp(40px, 6vw, 72px); }
.caps-head h2 { margin: 0 0 18px; }
.caps-head p { margin: 0; max-width: 60ch; }
.groups { display: grid; gap: clamp(32px, 4vw, 48px) clamp(24px, 4vw, 56px); grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .groups { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .groups { grid-template-columns: repeat(3, 1fr); }
}
.group { border-top: 1px solid var(--rule); padding-top: 22px; }
.group h3, .group h4 { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 500; font-size: 1.125rem; line-height: 1.2; margin: 0 0 18px; }
.group h3::before, .group h4::before { content: ""; width: 3px; height: 1.15em; background: var(--mark); flex: none; }
.group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.group li { font-family: var(--display); font-weight: 400; font-size: 1rem; line-height: 1.4; color: var(--ink); }
/* who we work with: a ruler scale echoing the logo */
.who-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
.who-list li { font-family: var(--display); font-weight: 300; font-size: clamp(1.25rem, 2.2vw, 1.6rem); line-height: 1.25; padding: 18px 0; border-top: 1px solid var(--rule); }
.who-list li:last-child { border-bottom: 1px solid var(--rule); }
@media (min-width: 640px) {
  .who-list { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; column-gap: clamp(32px, 5vw, 72px); }
  .who-list li:nth-child(3) { border-bottom: 1px solid var(--rule); }
}
/* simplified job sizes */
.sizes { list-style: none; margin: 0 0 clamp(48px, 7vw, 80px); padding: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.sizes li { position: relative; padding-left: 22px; font-family: var(--display); font-weight: 300; font-size: clamp(1.5rem, 2.9vw, 2.25rem); line-height: 1.15; }
.sizes li::before { content: ""; position: absolute; left: 0; top: 0.02em; width: 3px; height: 1.15em; background: var(--mark); }
@media (min-width: 720px) {
  .sizes { grid-template-columns: repeat(3, 1fr); gap: 0; }
}
/* tolerances */
.tolerances { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--rule); padding-top: 22px; }
.tolerances h3 { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 500; font-size: 1.125rem; line-height: 1.2; margin: 0 0 26px; }
.tolerances h3::before { content: ""; width: 3px; height: 1.15em; background: var(--mark); flex: none; }
.tol-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 640px) {
  .tol-grid { grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); }
}
.tolerances .tol-value { margin: 0; max-width: none; font-family: var(--display); font-weight: 300; font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.05; color: var(--ink); }
.tolerances .tol-value span { font-size: 0.42em; font-weight: 400; color: var(--muted); white-space: nowrap; }
.tolerances .tol-label { margin: 12px 0 0; max-width: none; font-family: var(--display); font-size: 1rem; line-height: 1.4; color: var(--ink); }
/* historic facade restoration: full-width band */
.feature-band { background: var(--ink); color: var(--bg); padding-top: clamp(64px, 9vw, 120px); overflow: hidden; }
.feature-inner { display: grid; grid-template-columns: 1fr; gap: 24px 64px; }
@media (min-width: 900px) {
  .feature-inner { grid-template-columns: 5fr 7fr; align-items: start; }
}
.feature-band h2 { color: inherit; margin: 0; }
.feature-band .feature-copy p { margin: 0 0 30px; max-width: 54ch; color: var(--bg); opacity: 0.85; }
.feature-band .btn { --btn-fill: #fff; --btn-ink: #111; --btn-line: #111; --btn-edge: #fff; --btn-rings: inset 0 0 0 3px #fff, inset 0 0 0 4px #111, inset 0 0 0 6px #fff, inset 0 0 0 7px #111; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn { --btn-fill: #E8E9EA; --btn-ink: #111; --btn-line: #15171A; --btn-edge: #E8E9EA; --btn-rings: inset 0 0 0 3px #E8E9EA, inset 0 0 0 4px #15171A, inset 0 0 0 6px #E8E9EA, inset 0 0 0 7px #15171A; }
  :root:not([data-theme="light"]) .feature-band .btn { --btn-fill: #15171A; --btn-ink: #E8E9EA; --btn-line: #E8E9EA; --btn-edge: #15171A; --btn-rings: inset 0 0 0 3px #15171A, inset 0 0 0 4px #E8E9EA, inset 0 0 0 6px #15171A, inset 0 0 0 7px #E8E9EA; }
}
:root[data-theme="dark"] .btn { --btn-fill: #E8E9EA; --btn-ink: #111; --btn-line: #15171A; --btn-edge: #E8E9EA; --btn-rings: inset 0 0 0 3px #E8E9EA, inset 0 0 0 4px #15171A, inset 0 0 0 6px #E8E9EA, inset 0 0 0 7px #15171A; }
:root[data-theme="dark"] .feature-band .btn { --btn-fill: #15171A; --btn-ink: #E8E9EA; --btn-line: #E8E9EA; --btn-edge: #15171A; --btn-rings: inset 0 0 0 3px #15171A, inset 0 0 0 4px #E8E9EA, inset 0 0 0 6px #15171A, inset 0 0 0 7px #E8E9EA; }
.feature-photos { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1fr; gap: clamp(12px, 2vw, 24px); }
@media (min-width: 720px) {
  .feature-photos { grid-template-columns: 1fr 1fr; }
}
.feature-photos figure { margin: 0; }
.feature-photos .ph { aspect-ratio: 3 / 2; overflow: hidden; background: #000; }
.feature-photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feature-photos figcaption { color: var(--bg); opacity: 0.78; }
.feature-bars { display: flex; justify-content: space-between; align-items: flex-end; height: clamp(110px, 18vw, 240px); margin-top: clamp(40px, 6vw, 80px); }
.feature-bars i { display: block; width: clamp(3px, 0.5vw, 7px); height: 78%; background: var(--mark); transform-origin: bottom; }
.feature-bars i.tall { height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .feature-bars.js-reveal i { transform: scaleY(0); }
  .feature-bars.js-reveal.in i { transform: scaleY(1); transition: transform 800ms cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i) * 16ms); }
}
.trio-in-caps { margin-top: clamp(48px, 7vw, 88px); }
/* materials */
.materials { margin-top: clamp(48px, 7vw, 88px); border-top: 1px solid var(--rule); padding-top: 22px; }
.materials > h3 { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 500; font-size: 1.125rem; line-height: 1.2; margin: 0 0 26px; }
.materials > h3::before { content: ""; width: 3px; height: 1.15em; background: var(--mark); flex: none; }
.materials .group { border-top: 0; padding-top: 0; }
.materials .group h4 { font-size: 1rem; margin-bottom: 14px; }
.materials .group h4::before { display: none; }
.materials .materials-note { margin: 28px 0 0; max-width: none; font-size: 0.9375rem; color: var(--muted); }
/* captions */
figcaption, .cap { margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.hero .cap { margin-top: 12px; }
/* sections */
.section { padding-block: clamp(64px, 10vw, 128px); }
.section.alt { background: var(--bg-alt); }
.split { display: grid; gap: clamp(32px, 6vw, 96px); grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.08;
  margin: 0 0 20px;
}
.section p { max-width: 52ch; color: var(--muted); margin: 0 0 1em; }
/* quote */
.quote-form { display: grid; gap: 22px; max-width: 620px; }
.row3 { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .row3 { grid-template-columns: 1fr 1fr 1fr; }
}
.row { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .row { grid-template-columns: 1fr 1fr; }
}
.quote-form label { display: block; font-family: var(--display); font-size: 1rem; margin-bottom: 6px; }
.quote-form input, .quote-form textarea, .quote-form select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 12px 14px;
}
.quote-form textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: 0.9375rem; color: var(--muted); margin: 0; }
#status { min-height: 1.5em; margin: 0; color: var(--ink); font-size: 0.9375rem; }
.direct { margin-top: 8px; }
/* footer */
.site-footer { padding-block: 56px 48px; }
.site-footer .inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.site-footer .brand svg { height: 104px; }
.site-footer address a { color: var(--ink); text-underline-offset: 4px; }
.site-footer address { font-style: normal; color: var(--muted); font-size: 0.9375rem; line-height: 1.7; text-align: right; }
@media (max-width: 560px) {
  .site-footer address { text-align: left; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* skip link, helpers */
.skip { position: absolute; left: -9999px; top: 8px; background: #111; color: #fff; padding: 10px 14px; z-index: 100; font-family: var(--display); font-size: 0.875rem; }
.skip:focus { left: 8px; }
.nw { white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* quote form: file upload and states */
.quote-form input[type="file"] { padding: 10px 12px; font-size: 0.9375rem; font-family: var(--display); }
.quote-form input[type="file"]::file-selector-button { font-family: var(--display); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); background: transparent; border: 1px solid var(--ink); border-radius: 0; padding: 8px 14px; margin-right: 12px; cursor: pointer; }
.quote-form input[type="file"]::file-selector-button:hover { background: var(--ink); color: var(--bg); }
.quote-form .file-hint { margin: 8px 0 0; font-size: 0.875rem; line-height: 1.45; color: var(--muted); max-width: none; }
.quote-form .btn[disabled] { opacity: 0.6; cursor: progress; }
#status.is-error { color: #B3261E; }
#status.is-ok { color: var(--ink); font-weight: 500; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) #status.is-error { color: #FF9A94; } }
:root[data-theme="dark"] #status.is-error { color: #FF9A94; }

/* inner pages (privacy policy and similar) */
.page-title { font-family: var(--display); font-weight: 300; font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.1; margin: 0 0 32px; }
.entry { max-width: 70ch; }
.entry h2, .entry h3 { font-family: var(--display); font-weight: 400; margin: 2em 0 0.6em; }
.entry p, .entry li { color: var(--ink); max-width: none; }
.entry a { text-underline-offset: 3px; }
.entry img { max-width: 100%; height: auto; }
