/* Poblado Labs — brutalist monochrome. Black #000 on white #fff only.
   No gradients, no rounded corners, no shadows. */
:root {
  --black: #000;
  --white: #fff;
  --border: 4px solid var(--black);
  --font-display: "Saira Stencil One", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
}

/* Self-hosted Aptos Display — used only by the Wisp portfolio panel */
@font-face {
  font-family: "Aptos Display";
  src: url("../assets/fonts/Aptos-Display.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Aptos Display";
  src: url("../assets/fonts/Aptos-Display-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
}

h1, h2 { font-family: var(--font-display); text-transform: uppercase; line-height: 1.05; }
h1 { font-size: clamp(2.8rem, 9vw, 7rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin-bottom: 1rem; }

.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 5vw; border-bottom: var(--border);
  position: sticky; top: 0; z-index: 100; background: var(--white);
  transition: padding 0.25s ease;
}
/* Condensed state: JS adds .condensed once you scroll past the hero top. */
.site-header.condensed { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.logo { height: 56px; width: auto; transition: height 0.25s ease; }
.site-header.condensed .logo { height: 38px; }
.header-cta { transition: padding 0.25s ease, background 0.15s ease, color 0.15s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.site-header.condensed .header-cta { padding: 0.35rem 1rem; }
.header-nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.header-cta {
  font-family: var(--font-display); text-transform: uppercase;
  color: var(--black); text-decoration: none;
  border: var(--border); padding: 0.5rem 1.25rem;
}
.header-cta:hover, .header-cta:focus { background: var(--black); color: var(--white); }

.hero { padding: 8vh 5vw 6vh; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.4rem); max-width: 42ch; margin: 1.5rem 0 3rem; }
.hero-art { width: 100%; height: auto; display: block; border: var(--border); }

.bar-section { background: var(--black); color: var(--white); padding: 1.1rem 5vw; }
.bar-label {
  font-family: var(--font-display); letter-spacing: 0.35em;
  text-transform: uppercase; font-size: 1.1rem;
}

.what-we-do, .vision, .contact { padding: 10vh 5vw; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.section-art { width: 100%; height: auto; display: block; border: var(--border); }
.split p + p { margin-top: 1rem; }

.quote-bar { background: var(--black); color: var(--white); padding: 10vh 5vw; }
.quote-bar p { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 2.2rem); line-height: 1.35; }
.quote-bar cite { display: block; margin-top: 1.5rem; font-family: var(--font-body); font-style: normal; letter-spacing: 0.2em; text-transform: uppercase; }

/* Portfolio — Wisp panel. The band is full-bleed; #340070 is the Wisp brand
   purple (intentional exception to the monochrome system, revealed on click). */
.portfolio { padding: 10vh 0; }
.portfolio h2 { padding-inline: 5vw; }
.wisp-panel {
  position: relative;
  margin-top: 3rem;
  padding: 4rem 5vw;
  display: flex; flex-direction: column; align-items: center;
  isolation: isolate;
}
.wisp-panel::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: #340070;
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 0.7s ease-in-out;
}
.wisp-panel.expanded::before { clip-path: circle(150% at 50% 50%); }
/* Circular so the logo plate echoes the circular clip-path morph rather than
   sitting as a square against it. */
.wisp-logo {
  position: relative; display: block;
  width: min(340px, 70vw); aspect-ratio: 1;
  border: none; background: none; padding: 0; cursor: pointer;
  border-radius: 50%;
}
.wisp-logo:focus-visible { outline: 4px solid var(--black); outline-offset: 4px; }
.wisp-panel.expanded .wisp-logo:focus-visible { outline-color: var(--white); }
.wisp-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}
/* While the panel morphs closed, hold the colour mark until the purple is
   gone, then swap to black & white last. */
.wisp-panel.collapsing .wisp-img { transition: opacity 0.3s ease 0.7s; }
.wisp-img-color { opacity: 0; }
/* Hover previews the colour mark; while the panel is expanded the colour
   mark is fixed. Leaving the expanded panel collapses everything (JS). */
.wisp-logo:hover .wisp-img-color,
.wisp-logo:focus-visible .wisp-img-color,
.wisp-panel.expanded .wisp-img-color { opacity: 1; }
.wisp-logo:hover .wisp-img-bw,
.wisp-logo:focus-visible .wisp-img-bw,
.wisp-panel.expanded .wisp-img-bw { opacity: 0; }
.wisp-text {
  max-width: 620px; margin-top: 2.5rem;
  font-family: "Aptos Display", sans-serif;
  font-size: 1rem; line-height: 1.6;
  color: var(--white);
  opacity: 0; transition: opacity 0.5s ease 0.35s;
}
.wisp-panel.expanded .wisp-text { opacity: 1; }
.wisp-text[hidden] { display: none; }
.wisp-link { margin-top: 1.25rem; font-weight: 700; }
.wisp-link a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.wisp-link a:hover, .wisp-link a:focus-visible { opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .wisp-panel::before, .wisp-img, .wisp-text { transition: none; }
}

.contact form { max-width: 620px; display: flex; flex-direction: column; gap: 0.4rem; margin-top: 1.5rem; }
.contact label { font-family: var(--font-display); text-transform: uppercase; margin-top: 1rem; }
.contact input, .contact textarea {
  border: var(--border); background: var(--white); color: var(--black);
  font-family: var(--font-body); font-size: 1rem; padding: 0.8rem;
}
.contact input:focus, .contact textarea:focus { outline: 4px solid var(--black); outline-offset: 2px; }
.contact button {
  margin-top: 1.5rem; align-self: flex-start; cursor: pointer;
  font-family: var(--font-display); text-transform: uppercase; font-size: 1.1rem;
  background: var(--white); color: var(--black); border: var(--border); padding: 0.9rem 2.5rem;
}
.contact button:hover:not(:disabled), .contact button:focus:not(:disabled) { background: var(--black); color: var(--white); }
.contact button:disabled { opacity: 0.5; cursor: wait; }
.form-status { min-height: 1.5rem; font-weight: 700; }
.form-status.error { text-decoration: underline; }
.contact-alt { margin-top: 2rem; }
.contact-alt a { color: var(--black); font-weight: 700; }

.site-footer {
  background: var(--black); color: var(--white);
  padding: 3rem 5vw; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.site-footer p:first-child {
  font-family: var(--font-display); letter-spacing: 0.35em; text-transform: uppercase;
}
.site-footer p:nth-of-type(2) { flex: 1; text-align: center; }
.footer-social {
  color: var(--white); display: inline-flex; line-height: 0; align-self: center;
}
.footer-social:hover, .footer-social:focus-visible { color: var(--black); background: var(--white); }
.footer-social:focus-visible { outline: 4px solid var(--white); outline-offset: 4px; }

/* --- Motion: scroll-reveal, parallax, magnetic hover (Lusion-inspired) --- */

/* Heading line masks: each line slides up from behind a hard edge in view.
   Hidden until JS wraps the lines (only when .js is present, so no-JS shows text). */
.js h1[data-reveal], .js h2[data-reveal] { visibility: hidden; }
.line-mask { display: block; overflow: hidden; }
.reveal-lines .line-inner {
  display: block; transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform;
}
.reveal-lines.in-view .line-inner { transform: translateY(0); }

/* Bordered images wipe in top-to-bottom + fade whenever they enter view. */
.js .reveal-img { clip-path: inset(0 0 100% 0); opacity: 0; }
.reveal-img { transition: clip-path 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease; }
.reveal-img.in-view { clip-path: inset(0 0 0 0); opacity: 1; }

/* Magnetic elements ease toward the cursor (transform set inline by JS). */
.magnetic { transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }

@media (prefers-reduced-motion: reduce) {
  .site-header, .logo, .header-cta { transition: none; }
  .js h1[data-reveal], .js h2[data-reveal] { visibility: visible; }
  .reveal-lines .line-inner { transform: none; transition: none; }
  .js .reveal-img, .reveal-img { clip-path: none; opacity: 1; transition: none; }
  .magnetic { transition: none; }
}

@media (max-width: 760px) {
  .split, .split-reverse { grid-template-columns: 1fr; gap: 2rem; }
  .split-reverse img { order: 2; }
  .logo { height: 40px; }
  .site-header.condensed .logo { height: 28px; }
}
