/* ============================================================
   PZero Foundry V4 — Swiss Sumi-e
   White background · Helvetica Neue · Ink wash atmosphere
   Swiss grid provides structure. Ink provides soul.
   ============================================================ */

/* ============================================================
   0. RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  line-height: var(--leading);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul, ol  { list-style: none; }
button  { cursor: pointer; border: none; background: none; font-family: inherit; }
a       { color: inherit; text-decoration: none; }
img,svg { display: block; max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Color — black and white only */
  --bg:          #FFFFFF;
  --ink:         #111111;
  --ink-mid:     #555555;
  --ink-faint:   #999999;
  --rule:        #E0E0E0;
  --rule-strong: #CCCCCC;

  /* Typography */
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Type scale — poster */
  --text-hero:     clamp(4rem, 13vw, 13rem);
  --text-display:  clamp(3rem, 7vw, 7rem);
  --text-heading:  clamp(1.25rem, 2.5vw, 1.75rem);
  --text-kicker:   clamp(2rem, 5vw, 4.5rem);
  --text-body:     1.125rem;
  --text-small:    0.9375rem;
  --text-micro:    0.8125rem;

  /* Leading */
  --leading:       1.7;
  --leading-tight: 1.05;
  --leading-head:  1.2;

  /* Tracking */
  --tracking-wide: 0.06em;
  --tracking-loose: 0.12em;

  /* Spacing — generous Swiss grid */
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  2rem;
  --sp-lg:  4rem;
  --sp-xl:  clamp(8rem, 16vw, 16rem);
  --sp-2xl: clamp(12rem, 20vw, 20rem);

  --max-w:  1120px;
  --pad:    clamp(1.5rem, 6vw, 5rem);

  /* Grid column sizes */
  --col-index: 80px;
  --col-gap:   var(--sp-md);

  /* Animations */
  --ease:   cubic-bezier(0.25, 0.1, 0.25, 1);
  --slow:   900ms;
  --normal: 500ms;
  --fast:   220ms;

  /* Ink tokens — bold sumi-e */
  --ink-enso-opacity: 0.35;
  --ink-wash-opacity: 0.12;
  --ink-divider-opacity: 0.5;
  --ink-splatter-opacity: 0.2;
}

/* ============================================================
   1b. SUBTLE INK GRAIN TEXTURE — washi paper feel
   ============================================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* ============================================================
   2. SELECTION
   ============================================================ */
::selection {
  background: var(--ink);
  color: var(--bg);
}

/* ============================================================
   3. SHARED SVG DEFS — hidden container
   ============================================================ */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ============================================================
   4. SCROLL REVEAL — opacity only (Swiss restraint)
   ============================================================ */
.reveal {
  opacity: 0;
  transition: opacity var(--slow) var(--ease);
}

.reveal.is-visible {
  opacity: 1;
}

.reveal[data-delay="1"] { transition-delay: 150ms; }
.reveal[data-delay="2"] { transition-delay: 300ms; }
.reveal[data-delay="3"] { transition-delay: 450ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; }
}

/* ============================================================
   5. INK WASH — atmospheric background clouds
   ============================================================ */
.ink-wash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.8s var(--ease);
  will-change: opacity, transform;
}

.ink-wash.is-visible {
  opacity: 1;
}

.ink-wash--hero {
  opacity: 0;
  animation: washFadeIn 3s var(--ease) 1s forwards;
}

@keyframes washFadeIn {
  to { opacity: 1; }
}

.ink-wash--footer {
  top: auto;
  bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ink-wash { opacity: 1; transition: none; animation: none; }
  .ink-wash--hero { opacity: 1; }
}

@media (max-width: 767px) {
  .ink-wash { display: none; }
  .ink-wash--hero { display: block; }
}

/* ============================================================
   6. INK DIVIDERS — brush-stroke section separators
   ============================================================ */
.ink-divider {
  display: block;
  width: 100%;
  height: 12px;
  pointer-events: none;
  overflow: visible;
}

.ink-divider__stroke {
  opacity: var(--ink-divider-opacity);
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  transition: stroke-dashoffset 1.6s var(--ease);
}

.ink-divider.is-drawn .ink-divider__stroke {
  stroke-dashoffset: 0;
}

.ink-divider--section-top {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.ink-divider--header {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.ink-divider--hero-foot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.ink-divider--pillar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.ink-divider--footer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .ink-divider__stroke {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    transition: none;
  }
}

/* ============================================================
   7. INK SPLATTERS — small accent marks
   ============================================================ */
.ink-splatter {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

.ink-splatter.is-visible {
  opacity: 1;
}

.ink-splatter--manifesto-bottom {
  bottom: -20px;
  right: 12%;
  width: 60px;
  height: 60px;
}

.ink-splatter--philosophy-bottom {
  bottom: -25px;
  left: 8%;
  width: 80px;
  height: 80px;
}

@media (prefers-reduced-motion: reduce) {
  .ink-splatter { opacity: 1; transition: none; }
}

@media (max-width: 767px) {
  .ink-splatter { display: none; }
}

/* ============================================================
   7b. BOLD BRUSH STROKES — gestural marks between sections
   ============================================================ */
.ink-brush {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 2s var(--ease);
  overflow: visible;
}

.ink-brush.is-visible {
  opacity: 1;
}

.ink-brush--hero-bottom {
  bottom: -60px;
  left: 5%;
  width: 70%;
  height: 120px;
}

.ink-brush--philosophy-bottom {
  bottom: -50px;
  right: 10%;
  width: 60%;
  height: 100px;
}

.ink-brush__stroke {
  stroke-dasharray: 3000;
  stroke-dashoffset: 3000;
  transition: stroke-dashoffset 2.2s var(--ease);
}

.ink-brush.is-visible .ink-brush__stroke {
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ink-brush { opacity: 1; }
  .ink-brush__stroke { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
}

@media (max-width: 767px) {
  .ink-brush--hero-bottom { width: 90%; left: 2%; height: 80px; }
  .ink-brush--philosophy-bottom { width: 80%; right: 5%; height: 70px; }
}

/* ============================================================
   7c. MOUNTAIN WASH — landscape behind signal section
   ============================================================ */
.ink-mountain {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 2.5s var(--ease);
}

.ink-mountain.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .ink-mountain { opacity: 1; transition: none; }
}

@media (max-width: 767px) {
  .ink-mountain { height: 40%; }
}

/* ============================================================
   8. HERO ENSO — bold gestural ink circle
   ============================================================ */
.hero__enso {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(400px, 60vw, 700px);
  height: clamp(400px, 60vw, 700px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: var(--ink-enso-opacity);
}

.hero__enso-path {
  opacity: 0;
  animation: ensoFadeIn 2.5s cubic-bezier(0.25, 0.1, 0.25, 1) 3.8s forwards;
}

@keyframes ensoFadeIn {
  to {
    opacity: 0.32;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__enso-path {
    opacity: 0.32;
    animation: none;
  }
}

@media (max-width: 767px) {
  .hero__enso {
    width: 320px;
    height: 320px;
    opacity: 0.25;
  }
}

/* ============================================================
   9. NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: var(--bg);
  padding: 0;
  display: flex;
  align-items: center;
  transition: box-shadow var(--normal) var(--ease);
}

.nav--scrolled {
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.08);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding-left: var(--pad);
}

.nav__mark {
  width: 28px;
  height: 28px;
  color: var(--ink);
  flex-shrink: 0;
}

.nav__wordmark {
  font-size: var(--text-small);
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  color: var(--ink);
}

.nav__links {
  display: none;
  margin-left: auto;
  padding-right: var(--pad);
  gap: var(--sp-lg);
  align-items: center;
  height: 100%;
}

.nav__link {
  font-size: var(--text-small);
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-mid);
  transition: color var(--fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width var(--normal) var(--ease);
}

.nav__link:hover {
  color: var(--ink);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link:focus-visible {
  color: var(--ink);
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

@media (min-width: 768px) {
  .nav__links { display: flex; }
}

/* ============================================================
   10. HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  overflow: hidden;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 8rem) var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 64px);
}

.hero__headline-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: clamp(2rem, 4vw, 4rem);
}

.hero__headline {
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: pre-wrap;
  min-height: calc(var(--text-hero) * var(--leading-tight) * 2);
}

.hero__cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--ink);
  vertical-align: middle;
  margin-left: 2px;
  animation: cursorBlink 1.1s step-end infinite;
}

.hero__cursor--typing {
  animation: none;
  opacity: 1;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero__foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: var(--sp-lg);
}

.hero__sub {
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--ink-mid);
  line-height: var(--leading);
  max-width: 440px;
}

.hero__location {
  font-size: var(--text-micro);
  font-weight: 400;
  letter-spacing: var(--tracking-loose);
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ============================================================
   11. SECTION — shared grid structure
   ============================================================ */
.section {
  position: relative;
  overflow: hidden;
}

.section--alt {
  background: #FAFAFA;
}

.section__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-xl) var(--pad);
}

.section__header {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--sp-md);
  margin-bottom: clamp(6rem, 10vw, 10rem);
  padding-bottom: var(--sp-md);
}

.section__index {
  font-size: var(--text-micro);
  font-weight: 400;
  letter-spacing: var(--tracking-loose);
  color: var(--ink-faint);
  width: var(--col-index);
  flex-shrink: 0;
}

.section__title {
  font-size: var(--text-small);
  font-weight: 400;
  letter-spacing: var(--tracking-loose);
  text-transform: uppercase;
  color: var(--ink-mid);
}

.section__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

.section__col--label {
  flex: 0 0 auto;
}

.section__col--text {
  flex: 1;
}

.section__kicker {
  font-size: var(--text-kicker);
  font-weight: 300;
  line-height: var(--leading-head);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section__para {
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--ink-mid);
  line-height: 1.85;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: 640px;
}

.section__para:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .section__body {
    flex-direction: row;
    gap: var(--sp-2xl);
    align-items: flex-start;
  }

  .section__col--label {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: calc(64px + var(--sp-md));
  }
}

.section__body--centered {
  flex-direction: column;
  align-items: flex-start;
  max-width: 560px;
}

/* ============================================================
   12. PHILOSOPHY PILLARS
   ============================================================ */
.section__pillars {
  display: flex;
  flex-direction: column;
}

.pillar {
  position: relative;
  display: flex;
  gap: var(--sp-md);
  padding: clamp(4rem, 8vw, 6rem) 0;
  align-items: flex-start;
  transition: background var(--fast);
}

.pillar__content {
  flex: 1;
}

.pillar__number {
  width: var(--col-index);
  flex-shrink: 0;
  font-size: var(--text-micro);
  font-weight: 400;
  letter-spacing: var(--tracking-loose);
  color: var(--ink-faint);
  padding-top: 3px;
}

.pillar__title {
  font-size: var(--text-heading);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: var(--sp-sm);
  line-height: var(--leading-head);
  transition: color var(--fast);
}

.pillar__body {
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--ink-mid);
  line-height: 1.8;
  max-width: 600px;
}

.pillar:hover .pillar__title {
  color: var(--ink-mid);
}

/* ============================================================
   13. SIGNAL SECTION
   ============================================================ */
.signal__heading {
  font-size: var(--text-display);
  font-weight: 300;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--sp-lg);
}

.signal__body {
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--ink-mid);
  line-height: 1.85;
  margin-bottom: var(--sp-lg);
  max-width: 580px;
}

.signal__status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-micro);
  font-weight: 400;
  letter-spacing: var(--tracking-loose);
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: var(--sp-lg);
}

.signal__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
  animation: dotPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.7); }
}

.signal__label {
  display: block;
  font-size: var(--text-micro);
  font-weight: 400;
  letter-spacing: var(--tracking-loose);
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--sp-sm);
}

.signal__form {
  width: 100%;
  max-width: 400px;
}

.signal__row {
  display: flex;
  align-items: center;
  padding-bottom: var(--sp-xs);
  gap: var(--sp-md);
  position: relative;
}

/* Brush-stroke underline for form row */
.signal__row::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--ink);
  opacity: 0.2;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 4'%3E%3Cpath d='M0,2 C40,0.5 80,3.5 120,2 C160,0.5 200,3 240,2 C280,1 320,3 360,2 L400,2' stroke='black' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 4'%3E%3Cpath d='M0,2 C40,0.5 80,3.5 120,2 C160,0.5 200,3 240,2 C280,1 320,3 360,2 L400,2' stroke='black' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  -webkit-mask-size: 100% 100%;
}

.signal__row:focus-within::after {
  opacity: 0.5;
}

.signal__input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-family: var(--font);
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--ink);
  padding: var(--sp-xs) 0;
}

.signal__input::placeholder {
  color: var(--ink-faint);
}

.signal__input:focus-visible {
  outline: none;
}

.signal__input:disabled {
  color: var(--ink-faint);
}

.signal__btn {
  font-family: var(--font);
  font-size: var(--text-micro);
  font-weight: 400;
  letter-spacing: var(--tracking-loose);
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--fast);
}

.signal__btn:hover {
  color: var(--ink-mid);
}

.signal__btn:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

.signal__btn:disabled {
  color: var(--ink-faint);
}

/* ============================================================
   14. FOOTER
   ============================================================ */
.footer {
  position: relative;
  padding: var(--sp-lg) var(--pad);
  overflow: hidden;
}

.footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__mark {
  width: 20px;
  height: 20px;
  color: var(--ink-faint);
}

.footer__wordmark {
  font-size: var(--text-micro);
  font-weight: 300;
  letter-spacing: var(--tracking-wide);
  color: var(--ink-faint);
}

.footer__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--text-micro);
  font-weight: 300;
  color: var(--ink-faint);
}

.footer__email {
  transition: color var(--fast);
}

.footer__email:hover {
  color: var(--ink);
}

.footer__email:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 4px;
}

.footer__sep {
  color: var(--rule-strong);
}

/* ============================================================
   15. REDUCED MOTION — global safety net
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hero__enso-path {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    animation: none;
  }

  .ink-divider__stroke {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }

  .ink-wash {
    opacity: 1;
    animation: none;
  }

  .ink-splatter {
    opacity: 1;
  }

  .signal__dot {
    animation: none;
  }

  .hero__cursor {
    animation: none;
    opacity: 1;
  }
}
