/* Harris Innovations — the dark room */

:root {
  --bg: #18191b;
  --surface: #222427;
  --raised: #2d2f33;
  --ink: #eff0f1;
  --muted: #a6a8ad;
  --accent: #ff4a1f;
  --accent-ink: #18191b;
  --field: #eff0f1;
  --field-ink: #18191b;
  --field-muted: #4a4c50;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);

  --m: clamp(20px, 2.4vw, 36px);
  --gap: clamp(120px, 14vw, 220px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --photo: saturate(0.6) brightness(0.8) contrast(1.05);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html:focus-within { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Erode", Georgia, "Times New Roman", serif;
  font-size: var(--step-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed; inset: 0 0 auto 0;
  height: 6px;
  background: var(--accent);
  z-index: 60;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--m); top: -60px; z-index: 70;
  background: var(--ink); color: var(--bg); padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 16px; }

/* Shared pieces */
.h-section {
  font-size: var(--step-head);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 0.98;
  text-wrap: balance;
}
.lead { font-size: var(--step-lead); line-height: 1.4; max-width: 34ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--step-body); font-weight: 600; letter-spacing: 0;
  text-decoration: none; border: 0; border-radius: 0;
  transition: transform 240ms var(--ease), background-color 240ms var(--ease);
}
.btn:hover { background: #ff6a45; }
.btn:active { transform: scale(0.97); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: var(--step-small); }

.link {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
  transition: color 200ms var(--ease), text-underline-offset 200ms var(--ease);
}
.link:hover { color: var(--accent); text-underline-offset: 0.35em; }

/* Bar */
.bar {
  position: fixed; inset: 6px 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--m);
  background: var(--bg);
  transition: transform 400ms var(--ease);
}
.bar.is-hidden { transform: translateY(-110%); }
.wordmark-small { font-size: var(--step-body); font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 36px); }
.nav-links a:not(.btn) {
  font-size: var(--step-small); text-decoration: none; color: var(--ink);
  transition: color 200ms var(--ease);
}
.nav-links a:not(.btn):hover { color: var(--accent); }
.menu-toggle { display: none; }

/* Hero: headline beside the keypad, the one lit object */
.hero {
  min-height: 100svh;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  align-items: center;
  padding: 110px var(--m) 8vh;
}
.hero-text { grid-column: 1 / 8; }
.hero .keypad { grid-column: 9 / 13; justify-self: center; }
.keypad {
  width: min(30vw, 400px);
  aspect-ratio: 4 / 5;
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface);
  padding: 24px 24px 26px;
  display: grid; grid-template-rows: 1fr auto; gap: 20px;
  text-align: left;
  border-radius: 6px;
}
.keypad-display {
  background: #111214;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  border-radius: 2px;
}
.keypad-scene { font-size: var(--step-lead); line-height: 1.1; font-weight: 500; }
.keypad-state { font-size: var(--step-small); line-height: 1.45; color: var(--ink); }
.keypad-state li { transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.keypad.is-switching .keypad-state li { opacity: 0; transform: translateY(6px); }
.keypad-sun { margin-top: auto; font-size: var(--step-small); color: var(--muted); line-height: 1.3; }
.keypad-buttons { display: grid; gap: 8px; }
.keypad-buttons button {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; padding: 0 14px;
  background: var(--raised); border: 0; border-radius: 3px; cursor: pointer;
  font-size: var(--step-small); text-align: left;
  transition: background-color 200ms var(--ease), transform 160ms var(--ease);
}
.keypad-buttons button:hover { background: #393c41; }
.keypad-buttons button:active { transform: scale(0.98); }
.keypad-buttons i {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4a4d52;
  transition: background-color 300ms var(--ease);
}
.keypad-buttons button[aria-pressed="true"] i { background: var(--accent); }
.keypad-buttons button[aria-pressed="true"] { background: #3d4045; }

.wordmark-wide {
  margin-top: clamp(28px, 4vh, 44px);
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.5em;
  margin-right: -0.5em; /* balance trailing letter-spacing */
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-line {
  margin: 0;
  font-size: clamp(2.75rem, 1rem + 4.6vw, 5.75rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.hero-line .mask { display: block; }
.hero-sub { margin-top: 24px; max-width: 46ch; font-size: var(--step-body); line-height: 1.5; color: var(--ink); }
.link-quiet { text-decoration: none; color: var(--muted); transition: color 200ms var(--ease); }
.link-quiet:hover { color: var(--ink); }
.mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
.mask > span { display: inline-block; }
.hero-row {
  margin-top: 36px;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  font-size: var(--step-small); color: var(--muted);
}
.hero-row p:first-child { order: 2; }
.hero-row .btn { order: 1; }
.hero-row p:last-child { order: 3; }

/* Home automation: sticky photograph, active list */
.automation {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  padding: var(--gap) var(--m) 0;
}
.automation-media {
  grid-column: 1 / 6;
  position: sticky; top: 14vh;
  align-self: start;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--surface);
}
.automation-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: var(--photo);
  opacity: 0; transform: scale(1.04);
  transition: opacity 500ms var(--ease), transform 1200ms var(--ease);
}
.automation-media img.is-on { opacity: 1; transform: scale(1); }
.automation-list { grid-column: 7 / 13; padding-bottom: 12vh; }
.automation-list .lead { margin-top: 24px; margin-bottom: 48px; }
.services li { position: relative; }
.services button {
  width: 100%; min-height: 60px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 14px 0; background: none; border: 0; cursor: pointer; text-align: left;
}
.services .name {
  font-size: var(--step-lead); line-height: 1.25; font-weight: 400;
  color: var(--muted);
  transition: color 300ms var(--ease), transform 300ms var(--ease);
}
.services .tag { font-size: var(--step-small); color: var(--muted); white-space: nowrap; text-align: right; }
.services li.is-active .name { color: var(--ink); font-weight: 500; }
.services button:hover .name { color: var(--ink); }
.services li > p {
  max-width: 40ch;
  font-size: var(--step-body); line-height: 1.55; color: var(--ink);
  display: grid; grid-template-rows: 0fr;
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 450ms var(--ease), opacity 300ms var(--ease), padding 450ms var(--ease);
}
.services li.is-active > p { max-height: 12em; opacity: 1; padding-bottom: 22px; }

/* Integrated living: one evening */
.evening { position: relative; margin-top: var(--gap); height: 280svh; }
.evening-stage {
  position: sticky; top: 0;
  height: 100svh; overflow: hidden;
}
.evening-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 60%;
  filter: saturate(0.85) brightness(0.72) contrast(1.05);
  transform: scale(1.08);
  will-change: transform;
}
.evening-scrim {
  position: absolute; inset: 0 0 auto 0; height: 62%;
  /* taste-skill-ignore: neutral scrim over photo */ background: linear-gradient(to bottom, rgba(24,25,27,0.94) 0%, rgba(24,25,27,0.85) 55%, rgba(24,25,27,0) 100%);
}
.evening-copy {
  position: relative; z-index: 2;
  width: min(560px, calc(100% - 2 * var(--m)));
  margin: 0 auto; padding-top: max(96px, 12vh);
  text-align: center;
}
.evening-note { margin: 16px auto 28px; max-width: 42ch; font-size: var(--step-body); line-height: 1.5; }
.steps { display: grid; gap: 10px; font-size: var(--step-body); line-height: 1.3; }
.steps li { color: var(--muted); transition: color 400ms var(--ease), transform 400ms var(--ease); }
.steps li.is-active { color: var(--ink); font-weight: 500; transform: scale(1.04); }
.steps .t { display: inline-block; min-width: 6.5em; margin-right: 0.6em; font-variant-numeric: tabular-nums; text-align: right; }
.steps li.is-active .t { color: var(--accent); }
.evening-pics img {
  position: absolute; z-index: 1;
  width: clamp(160px, 15vw, 240px); height: auto;
  object-fit: cover; filter: var(--photo);
  opacity: 0; transform: translateY(32px);
  transition: opacity 600ms var(--ease), transform 900ms var(--ease);
}
.evening-pics img.left  { left: max(var(--m), 7vw); top: 58%; aspect-ratio: 4 / 3; }
.evening-pics img.right { right: max(var(--m), 7vw); top: 44%; aspect-ratio: 3 / 4; }
.evening-pics img[data-step="2"], .evening-pics img[data-step="4"] { top: 66%; }
.evening-pics img[data-step="3"], .evening-pics img[data-step="5"] { top: 50%; }
.evening-pics img.is-on { opacity: 1; transform: none; }
.evening-markers { position: absolute; inset: 0; display: grid; grid-template-rows: repeat(6, 1fr); pointer-events: none; }
.evening-markers i { display: block; }

/* Home services: band of unequal panels */
.home-services { padding: var(--gap) 0 0; }
.home-services > .h-section { padding: 0 var(--m); margin-left: calc((100% - 2 * var(--m)) / 6); margin-bottom: 64px; }
.band { display: flex; height: 68svh; min-height: 420px; }
.panel { position: relative; overflow: hidden; flex: 2 1 0; transition: flex-grow 500ms var(--ease); }
.panel.p1 { flex-grow: 5; }
.panel.p3 { flex-grow: 3; }
.panel img { width: 100%; height: 100%; object-fit: cover; filter: var(--photo); transition: transform 900ms var(--ease); }
.panel figcaption {
  position: absolute; left: 0; top: 0;
  padding: 24px 28px 40px 24px; max-width: 15em;
  font-size: var(--step-lead); line-height: 1.15; font-weight: 500; letter-spacing: -0.01em;
  background: rgba(24,25,27,0.78);
}
@media (hover: hover) {
  .band:hover .panel { flex-grow: 2; }
  .band:hover .panel.p1:not(:hover) { flex-grow: 3; }
  .band .panel:hover { flex-grow: 6; }
  .band .panel:hover img { transform: scale(1.03); }
}
.services-text {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  padding: 72px var(--m) 0;
}
.services-text .lead { grid-column: 1 / 5; max-width: 26ch; }
.chores {
  grid-column: 6 / 13;
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; row-gap: 32px;
}
.chores dt { font-weight: 600; font-size: var(--step-body); }
.chores dd { color: var(--ink); line-height: 1.5; margin-top: 4px; }
.services-cta { grid-column: 6 / 13; margin-top: 40px; font-size: var(--step-lead); }

/* About: founder's letter */
.about { padding: var(--gap) var(--m); display: flex; justify-content: center; }
.letter { width: min(560px, 100%); }
.letter .h-section { margin-bottom: 40px; }
.letter p { font-size: var(--step-body); line-height: 1.62; }
.letter p + p { margin-top: 1.4em; }
.signoff { display: grid; gap: 4px; margin-top: 2.2em !important; }
.signoff em { font-size: var(--step-lead); font-style: italic; }
.signoff span { font-size: var(--step-small); color: var(--muted); }

/* Our approach: one verb at a time */
.approach-intro {
  padding: 0 var(--m) 72px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: end;
}
.approach-intro .h-section { grid-column: 1 / 7; }
.approach-intro .lead { grid-column: 8 / 13; }
.verb-panel { position: relative; height: 86svh; overflow: clip; }
.verb-panel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.5) brightness(0.55) contrast(1.05); }
.verb {
  position: absolute; left: 0; right: 0; top: 50%; margin-top: -0.5em;
  text-align: center;
  font-size: clamp(5rem, 17vw, 18rem); font-weight: 500; line-height: 0.9; letter-spacing: -0.04em;
  color: var(--ink);
}
.verb-note {
  position: absolute; left: 0; bottom: 0; z-index: 2;
  max-width: min(480px, 92vw);
  padding: 28px var(--m) 32px;
  font-size: var(--step-body); line-height: 1.5;
  background: rgba(24,25,27,0.82);
}
.verb-note strong { font-weight: 600; }

/* Service area */
.area {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  padding: var(--gap) var(--m);
  align-items: start;
}
.area-map { grid-column: 1 / 8; }
.area-map img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: var(--photo); }
figcaption { font-size: var(--step-small); color: var(--muted); margin-top: 12px; line-height: 1.4; }
.area-text { grid-column: 9 / 13; }
.area-text > p { margin-top: 24px; line-height: 1.55; }
.towns { margin-top: 32px; columns: 2; column-gap: 24px; line-height: 1.9; }
.area-then { margin-top: 48px; }
.area-then img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: var(--photo); }

/* Contact: inverse field */
.contact {
  min-height: 100svh;
  background: var(--field); color: var(--field-ink);
  display: grid; grid-template-rows: auto 1fr auto auto;
  padding: clamp(64px, 9vh, 112px) var(--m) clamp(32px, 5vh, 56px);
}
.contact-ask { font-size: var(--step-lead); font-weight: 500; line-height: 1.3; max-width: 22ch; letter-spacing: -0.01em; }
.contact-email {
  grid-row: 3;
  display: block;
  font-size: clamp(2.5rem, 8.4vw, 10rem); line-height: 0.95; letter-spacing: -0.035em; font-weight: 400;
  text-decoration: none;
  margin-bottom: 10vh;
  transition: color 300ms var(--ease);
}
.contact-email span { display: block; }
.contact-email:hover { color: #c8320f; }
.contact-foot {
  grid-row: 4;
  display: flex; justify-content: space-between; gap: 24px;
  font-size: var(--step-small); line-height: 1.7; color: var(--field-muted);
}
.contact-foot p:last-child { text-align: right; color: var(--field-ink); font-size: var(--step-body); }
.contact .link:hover { color: #c8320f; }

/* Footer */
.footer {
  min-height: 76svh;
  display: grid; grid-template-rows: auto 1fr auto auto; grid-template-columns: minmax(0, 1fr);
  padding: 48px var(--m) 24px;
  background: var(--bg);
}
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; font-size: var(--step-small); line-height: 1.8; color: var(--muted); }
.footer-cols p:first-child { color: var(--ink); }
.footer-cols a { overflow-wrap: anywhere; text-decoration: none; transition: color 200ms var(--ease); }
.footer-cols a:hover { color: var(--ink); }
.footer-mark {
  grid-row: 3;
  font-size: 10.6vw; line-height: 0.85; letter-spacing: -0.045em; font-weight: 500;
  white-space: nowrap; margin-left: -0.04em;
}
.legal { grid-row: 4; margin-top: 24px; font-size: var(--step-small); color: var(--muted); line-height: 1.6; max-width: 75ch; overflow-wrap: anywhere; }
.legal a { text-decoration: underline; text-underline-offset: 0.2em; }

/* Entrances */
.js .reveal { opacity: 0.25; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 900ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .hero .mask > span { transform: translateY(110%); transition: transform 900ms var(--ease); }
.js .hero .mask + .mask > span { transition-delay: 110ms; }
.js .hero.is-in .mask > span { transform: none; }
.js .hero .keypad, .js .hero .hero-sub, .js .hero .hero-row { opacity: 0; transform: translateY(16px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.js .hero.is-in .keypad { opacity: 1; transform: none; }
.js .hero.is-in .hero-sub { opacity: 1; transform: none; transition-delay: 320ms; }
.js .hero.is-in .hero-row { opacity: 1; transform: none; transition-delay: 420ms; }

/* Phone and tablet */
@media (max-width: 900px) {
  .automation-media { grid-column: 1 / 13; position: sticky; top: 64px; aspect-ratio: auto; height: 38svh; z-index: 3; }
  .automation-list { grid-column: 1 / 13; padding-top: 28px; }
  .services-text .lead, .chores, .services-cta { grid-column: 1 / 13; }
  .services-text .lead { max-width: 34ch; margin-bottom: 40px; }
  .area-map, .area-text { grid-column: 1 / 13; }
  .area-text { margin-top: 48px; }
  .approach-intro .h-section, .approach-intro .lead { grid-column: 1 / 13; }
  .approach-intro .lead { margin-top: 20px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
    background: none; border: 0; font-size: var(--step-body); cursor: pointer;
  }
  .nav-links {
    position: fixed; inset: 62px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 16px var(--m) 28px; background: var(--bg);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 250ms var(--ease), transform 250ms var(--ease), visibility 0s 250ms;
  }
  .nav-links.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .nav-links a:not(.btn) { display: block; padding: 10px 0; font-size: var(--step-lead); }
  .nav-links .btn { margin-top: 12px; width: 100%; }

  .hero { padding-top: 104px; padding-bottom: 12svh; row-gap: 48px; }
  .hero-text, .hero .keypad { grid-column: 1 / 13; }
  .hero .keypad { width: 100%; max-width: 420px; aspect-ratio: auto; justify-self: start; }
  .wordmark-wide { margin-top: 28px; font-size: 4.4vw; letter-spacing: 0.32em; margin-right: -0.32em; }
  .hero-line { font-size: 10.5vw; }
  .hero-row { flex-direction: column; align-items: flex-start; gap: 14px; width: 100%; }
  .hero-row .btn { width: 100%; }

  .evening-scrim { inset: auto 0 0 0; height: 70%; /* taste-skill-ignore: neutral scrim over photo */ background: linear-gradient(to top, rgba(24,25,27,0.95) 0%, rgba(24,25,27,0.88) 60%, rgba(24,25,27,0) 100%); }
  .evening-copy { position: absolute; left: var(--m); right: var(--m); bottom: 6svh; width: auto; padding: 0; text-align: left; }
  .evening-note { margin-left: 0; }
  .steps .t { min-width: 0; text-align: left; display: block; font-size: var(--step-small); margin: 0; }
  .steps li.is-active { transform: none; }
  .evening-pics img.left, .evening-pics img.right { left: auto; right: var(--m); top: 88px !important; width: 44vw; }

  .home-services > .h-section { margin-left: 0; margin-bottom: 40px; }
  .band { flex-wrap: wrap; height: 84svh; }
  .panel { height: 50%; }
  .panel.p1 { flex: 0 0 64%; } .panel.p2 { flex: 0 0 36%; }
  .panel.p3 { flex: 0 0 36%; } .panel.p4 { flex: 0 0 64%; }
  .panel figcaption { padding: 16px 16px 24px; font-size: 1.125rem; }
  .chores { grid-template-columns: 1fr; row-gap: 24px; }

  .verb { font-size: 24vw; }
  .verb-note { max-width: none; right: 0; padding: 20px var(--m) 28px; }

  .contact { min-height: 86svh; }
  .contact-email { font-size: 10.4vw; margin-bottom: 8svh; }
  .contact-foot { flex-direction: column; gap: 16px; }
  .contact-foot p:last-child { text-align: left; }

  .footer { min-height: 80svh; }
  .footer-mark { font-size: 15.5vw; white-space: normal; }
  .footer-mark span { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0s !important; animation: none !important; }
  .js .reveal, .js .hero .mask > span, .js .hero .keypad, .js .hero .hero-sub, .js .hero .hero-row { opacity: 1; transform: none; }
  .evening-bg { transform: none !important; }
}
