/* TADASHI SHIGA — site styles.

   Direction: his subject is DAYLIGHT. Passive house is sun, envelope, healthy
   rooms. So the page is daylit — limewash paper, evergreen ink, technical
   linework borrowed from a section drawing. The structural device is the
   dimension callout, because measuring a site is literally the work.

   Type is deliberately inverted from the usual: a wide grotesque for display
   over a serif for reading. */

:root {
  /* paper + ink */
  --paper:      #EDF0E9;   /* pale limewash, faintly green */
  --paper-2:    #E4E9DF;   /* recessed band */
  --paper-3:    #F6F7F2;   /* raised card */
  --ink:        #16241C;   /* evergreen-black */
  --ink-2:      #3C4E43;
  --ink-3:      #6A7A6E;   /* captions, leaders */
  --rule:       #C7D0C4;

  /* the two accents, used sparingly */
  --water:      #1E6B63;   /* teal — the fountain, the barrier line */
  --sun:        #C97C22;   /* burnt gold — heat, blooms, emphasis */
  --sun-pale:   #F0C97E;

  --ease: cubic-bezier(.22, 1, .36, 1);

  /* motion-layer overrides: on paper the "glow" is a low sun wash */
  --a3-glow-a: rgba(201, 124, 34, .085);
  --a3-glow-b: rgba(30, 107, 99, .035);
  --a3-glow-size: 780px;
  --a3-reveal-rise: 20px;
  --a3-reveal-ms: 720ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Spectral, Georgia, "Times New Roman", serif;
  font-size: 17.5px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.grot {
  font-family: "Bricolage Grotesque", "Archivo", system-ui, -apple-system, sans-serif;
  font-weight: 600;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── rhythm ────────────────────────────────────────────────────── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(22px, 5vw, 64px); }
.narrow { max-width: 720px; }
section { position: relative; padding: clamp(76px, 10vw, 148px) 0; }
.band { background: var(--paper-2); }

/* the structural device: a dimension callout, as on a section drawing */
.dim {
  display: flex; align-items: center; gap: 13px;
  font-family: "Bricolage Grotesque", Archivo, system-ui, sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 26px;
}
.dim::before {
  content: ""; width: 1px; height: 13px; background: var(--ink-3); flex: none;
}
.dim::after {
  content: ""; flex: 1; height: 1px; background: var(--rule); max-width: 190px;
}
.dim .n { color: var(--sun); }

h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h2.head {
  font-family: "Bricolage Grotesque", Archivo, system-ui, sans-serif;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}
p { margin: 0 0 20px; color: var(--ink-2); }
p.lead { font-size: clamp(18px, 2vw, 21.5px); line-height: 1.62; color: var(--ink); max-width: 60ch; }
strong { font-weight: 600; color: var(--ink); }
em.mark { font-style: normal; color: var(--sun); }

/* ── nav ───────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px clamp(20px, 5vw, 64px);
  transition: background .35s ease, border-color .35s ease, padding .35s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(237,240,233,.93);
  backdrop-filter: blur(9px);
  border-bottom-color: var(--rule);
  padding-top: 11px; padding-bottom: 11px;
}
.nav .mark { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav .mark img { height: 30px; width: auto; }
.nav .mark span {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav a.lnk {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ink-2); text-decoration: none; padding: 4px 0; position: relative;
}
.nav a.lnk::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--sun); transition: width .35s var(--ease);
}
.nav a.lnk:hover::after, .nav a.lnk:focus-visible::after { width: 100%; }
.nav .cta {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--ink); border-radius: 2px; padding: 9px 18px;
  text-decoration: none; transition: background .3s ease, color .3s ease;
}
.nav .cta:hover, .nav .cta:focus-visible { background: var(--ink); color: var(--paper); }
@media (max-width: 900px) { .nav ul { display: none; } .nav .mark span { display: none; } }

/* ── hero: the fountain ────────────────────────────────────────── */
.hero { min-height: 100svh; display: flex; align-items: center; padding: 118px 0 70px; overflow: hidden; }
#fountain {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-copy { max-width: min(760px, 64%); }
@media (max-width: 860px) {
  .hero-copy {
    max-width: 100%;
    background: linear-gradient(180deg, rgba(237,240,233,.94) 62%, rgba(237,240,233,.55));
    padding: 20px 18px 26px; margin: 0 -6px; border-radius: 3px;
  }
}

.hero h1 {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: clamp(34px, 4.9vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.hero h1 .l { display: block; overflow: hidden; }
.hero h1 .l i {
  display: block; font-style: normal;
  transform: translateY(103%);
  animation: rise 1.05s var(--ease) forwards;
}
.hero h1 .l:nth-child(2) i { animation-delay: .10s; }
.hero h1 .l:nth-child(3) i { animation-delay: .20s; }
.hero h1 .w { color: var(--water); }
@keyframes rise { to { transform: translateY(0); } }

.hero .sub {
  font-size: clamp(17px, 1.9vw, 20px);
  color: var(--ink-2); max-width: 44ch;
  opacity: 0; animation: fade .9s var(--ease) .48s forwards;
}
.hero .attr {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 30px;
  opacity: 0; animation: fade .9s var(--ease) .68s forwards;
}
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.cue {
  position: absolute; left: clamp(22px, 5vw, 64px); bottom: 30px;
  display: flex; align-items: center; gap: 12px; z-index: 2;
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
  opacity: 0; animation: fade .9s var(--ease) 1.0s forwards;
}
.cue .r { width: 46px; height: 1px; background: var(--ink-3); position: relative; overflow: hidden; }
.cue .r::after {
  content: ""; position: absolute; left: -40%; top: 0; width: 40%; height: 1px;
  background: var(--sun); animation: run 2.3s ease-in-out infinite;
}
@keyframes run { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .hero h1 .l i, .hero .sub, .hero .attr, .cue { animation: none !important; opacity: 1 !important; transform: none !important; }
  .cue .r::after { animation: none; }
}

/* ── the advisory: a list on rules, not boxed cards ────────────── */
.svc { border-top: 1px solid var(--rule); margin-top: 46px; }
.svc-row {
  display: grid; grid-template-columns: 86px 1fr 1.15fr; gap: 26px;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.svc-row .no {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--sun);
}
.svc-row h3 {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: clamp(19px, 2.3vw, 25px); letter-spacing: -0.015em; line-height: 1.15;
}
.svc-row p { margin: 0; font-size: 16px; }
@media (max-width: 800px) {
  .svc-row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
}

/* ── portrait ──────────────────────────────────────────────────── */
.who { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 880px) { .who { grid-template-columns: 1fr; } }
.portrait { position: relative; }
.portrait img { width: 100%; filter: saturate(.92) contrast(1.02); }
.portrait figcaption {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); margin-top: 12px; display: flex; gap: 10px; align-items: center;
}
.portrait figcaption::before { content: ""; width: 22px; height: 1px; background: var(--ink-3); }

/* ── assembly ──────────────────────────────────────────────────── */
/* the stage pins while the section scrolls past, so the envelope finishes
   assembling in front of you instead of below the fold */
.assembly-stage { position: sticky; top: 78px; margin-top: 40px; }
#assemblyCanvas { width: 100%; height: clamp(360px, 52vh, 520px); display: block; }
.assembly-runway { height: 78vh; }
@media (max-width: 700px) { .assembly-runway { height: 55vh; } }
@media (prefers-reduced-motion: reduce) {
  .assembly-stage { position: static; }
  .assembly-runway { display: none; }
}
.assembly-note {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); text-align: center; margin-top: 6px;
}

/* ── solis + reveal slider ─────────────────────────────────────── */
.solis-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 68px); align-items: center; }
@media (max-width: 940px) { .solis-grid { grid-template-columns: 1fr; } }

.reveal-frame {
  position: relative; overflow: hidden; cursor: ew-resize;
  border: 1px solid var(--ink); background: var(--paper-3);
  aspect-ratio: 16 / 10; touch-action: none; user-select: none;
}
.reveal-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  pointer-events: none; -webkit-user-drag: none;
}
/* the "as drawn" state: the photograph treated as a survey print */
.reveal-frame .drawn {
  filter: grayscale(1) contrast(1.5) brightness(1.12) sepia(.35) hue-rotate(120deg) saturate(.7);
  mix-blend-mode: multiply;
}
.reveal-frame .built { clip-path: inset(0 0 0 50%); }
.reveal-frame .bar {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 1px;
  background: var(--paper-3); box-shadow: 0 0 0 1px rgba(22,36,28,.35);
  pointer-events: none;
}
.reveal-frame .bar::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 40px; height: 40px; transform: translate(-50%, -50%);
  border: 1px solid var(--ink); border-radius: 50%;
  background: var(--paper-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2316241C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 8 4 4-4 4'/%3E%3Cpath d='m6 8-4 4 4 4'/%3E%3Cpath d='M8 12h.01'/%3E%3Cpath d='M12 12h.01'/%3E%3Cpath d='M16 12h.01'/%3E%3C/svg%3E") center / 22px no-repeat;
  transition: transform .3s var(--ease);
}
.reveal-frame:hover .bar::after { transform: translate(-50%, -50%) scale(1.08); }
.reveal-frame.is-dragging .bar::after { transform: translate(-50%, -50%) scale(.94); }
.reveal-frame:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
.reveal-tags {
  display: flex; justify-content: space-between; margin-top: 11px;
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 11.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3);
}

/* measured comparison */
.perf { margin-top: 34px; }
.perf .big {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: clamp(64px, 10vw, 108px); line-height: .9;
  letter-spacing: -0.05em; color: var(--sun);
  font-variant-numeric: tabular-nums;
}
.perf .big sup { font-size: .34em; vertical-align: super; margin-left: 3px; letter-spacing: 0; }
.perf .cap { font-size: 16px; margin: 12px 0 26px; max-width: 34ch; }
.bar-row { margin-bottom: 17px; }
.bar-row .lab {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 7px;
}
.bar-row .lab b { color: var(--ink); font-size: 13px; letter-spacing: 0; }
.track { height: 10px; background: var(--paper-2); border: 1px solid var(--rule); overflow: hidden; }
.track i { display: block; height: 100%; width: 0; transition: width 1.4s var(--ease); }
.track.median i { background: repeating-linear-gradient(90deg, var(--ink-3) 0 2px, transparent 2px 6px); }
.track.solis i  { background: var(--sun); }
.perf .foot { font-size: 14px; color: var(--ink-3); border-top: 1px solid var(--rule); padding-top: 13px; margin-top: 22px; }

/* ── approach ──────────────────────────────────────────────────── */
.pull {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: clamp(26px, 3.9vw, 46px); line-height: 1.1; letter-spacing: -0.028em;
  max-width: 21ch; margin: 0 0 28px;
}
.pull em { font-style: normal; color: var(--water); }
.skeptic {
  margin-top: 52px; border-top: 2px solid var(--ink); padding-top: 26px;
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px;
}
@media (max-width: 800px) { .skeptic { grid-template-columns: 1fr; gap: 12px; } }
.skeptic h3 {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: clamp(23px, 3vw, 33px); letter-spacing: -0.02em; line-height: 1.1;
}
.skeptic p { margin: 0; }

/* ── journal: an index, not cards ──────────────────────────────── */
.idx { border-top: 1px solid var(--rule); margin-top: 42px; }
.idx a {
  display: grid; grid-template-columns: 128px 1fr auto; gap: 24px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--rule);
  text-decoration: none; transition: background .35s ease, padding .35s var(--ease);
}
.idx a:hover, .idx a:focus-visible { background: var(--paper-3); padding-left: 12px; padding-right: 12px; outline: none; }
.idx .kind {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--sun);
}
.idx h3 {
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: clamp(18px, 2.2vw, 24px); letter-spacing: -0.015em; line-height: 1.2;
}
.idx .go { font-family: "Bricolage Grotesque", Archivo, sans-serif; font-size: 13px; color: var(--ink-3); transition: transform .35s var(--ease); }
.idx a:hover .go { transform: translateX(6px); color: var(--ink); }
@media (max-width: 760px) { .idx a { grid-template-columns: 1fr; gap: 7px; } .idx .go { display: none; } }

/* ── connect ───────────────────────────────────────────────────── */
.connect { background: var(--ink); color: var(--paper); }
.connect h2.head { color: var(--paper); }
.connect p { color: rgba(237,240,233,.76); }
.connect .dim { color: rgba(237,240,233,.6); }
.connect .dim::before { background: rgba(237,240,233,.6); }
.connect .dim::after { background: rgba(237,240,233,.28); }
.connect .dim .n { color: var(--sun-pale); }
.btn {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 12px;
  font-family: "Bricolage Grotesque", Archivo, sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: .06em;
  background: var(--sun-pale); color: var(--ink);
  padding: 16px 32px; border-radius: 2px; text-decoration: none;
  transition: transform .32s var(--ease), background .3s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); background: #fff; outline: none; }

/* ── footer ────────────────────────────────────────────────────── */
footer { background: var(--ink); color: rgba(237,240,233,.62); padding: 0 0 44px; font-size: 14px; }
footer .row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center;
  border-top: 1px solid rgba(237,240,233,.16); padding-top: 26px; }
footer a { text-decoration: none; color: rgba(237,240,233,.82); }
footer a:hover { color: var(--sun-pale); }
footer img { height: 26px; width: auto; opacity: .85; }

:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
.a3-above { position: relative; z-index: 1; }

@media print {
  #fountain, .cue { display: none !important; }
  body { background: #fff; }
}
