/* ============================================================
   HAUSPLANTS - styles.css
   A museum poster for a new movement. Forms over foliage, EST. 2026.
   Sibling to birdhaus.art; palette drawn from the founding bonsai.
   ============================================================ */

/* ---- PALETTE & TOKENS ---- */
:root {
  --cream:    #EFE7D2;  /* paper (matches the artwork's ground) */
  --black:    #1A1814;  /* ink / the artwork's dark frame */
  --charcoal: #3A3A38;  /* geometric shapes / the pot */
  --gray:     #8A857B;  /* muted rules / secondary text */
  --sage:     #4A5240;  /* the canopy green */
  --terra:    #A05A33;  /* the trunk terracotta */
  --red:      #B23A2E;  /* the one red sun (matches the artwork) */
  --blue:     #2A3A66;  /* deep blue accent */

  --rule:     1px;
  --maxw:     1180px;
  --gutter:   clamp(1.25rem, 5vw, 4.5rem);

  /* System font stack, fake-condensed for poster display. To add a
     real condensed grotesque later (Archivo, Oswald), load it via
     <link> in index.html and prepend it here; the stack stays as
     fallback. */
  --font-display: "Helvetica Neue", "Arial Narrow", Helvetica, Arial, sans-serif;
  --font-body:    system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--black);
  font-family: var(--font-body);
  line-height: 1.5;
  background-image:
    radial-gradient(circle at 82% 10%, rgba(0,0,0,0.015) 0, transparent 60%),
    radial-gradient(circle at 8% 92%, rgba(0,0,0,0.02) 0, transparent 55%);
}
img { display: block; max-width: 100%; }
a { color: inherit; }

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

/* ============================================================
   POSTER HERO
   Full viewport. Asymmetric grid: masthead anchors the lower-left,
   the founding bonsai occupies the right field. Sun + bars float as
   compositional weights. Manifesto + CTA scroll below the hero.
   ============================================================ */
.poster {
  position: relative;
  min-height: 100svh;            /* full viewport, modern unit */
  min-height: 100vh;             /* fallback for older browsers */
  overflow: hidden;
  padding: var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "art  art"
    "mast mast";
  gap: var(--gutter);
  /* a hairline frame, like a printed poster border */
  border: var(--rule) solid var(--black);
  outline: var(--gutter) solid var(--cream);
  outline-offset: calc(-1 * var(--gutter));
}

@media (min-width: 760px) {
  .poster {
    grid-template-areas:
      "mast art"
      "mast art";
  }
}

/* ---- MASTHEAD / TITLE BLOCK ---- */
.masthead {
  grid-area: mast;
  align-self: end;          /* anchor to lower-left, like birdhaus */
  position: relative;
  z-index: 3;
}
.title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 13vw, 9rem);
  line-height: 0.82;
  letter-spacing: -0.02em;
  margin: 0;
  transform: scaleY(1.08);
  transform-origin: bottom left;
  text-transform: uppercase;
}
.subtitle {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: clamp(0.9rem, 2.2vw, 1.35rem);
  margin: 1.1rem 0 0;
  display: inline-block;
  border-bottom: 3px solid var(--red);
  padding-bottom: 0.35rem;
}
.est {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin: 1.5rem 0 0;
  color: var(--terra);
}

/* ---- FOUNDING ARTWORK (hero centerpiece) ---- */
.artwork {
  grid-area: art;
  margin: 0;
  align-self: center;
  justify-self: end;
  z-index: 2;
  width: min(58vw, 600px);
}
@media (max-width: 759px) {
  .artwork { width: min(82vw, 460px); justify-self: center; }
}
.artwork__img {
  width: 100%;
  height: auto;
  /* subtle lift so the artwork reads as the framed centerpiece */
  box-shadow: 0 18px 50px -24px rgba(26, 24, 20, 0.55);
}

/* ---- RED SUN MOTIF (page's own, frames the artwork) ---- */
.sun {
  position: absolute;
  top: clamp(2rem, 12vh, 9rem);
  right: clamp(1rem, 8vw, 7rem);
  width: clamp(110px, 20vw, 240px);
  aspect-ratio: 1;
  background: var(--red);
  border-radius: 50%;
  z-index: 1;                      /* sits behind the artwork */
  opacity: 0.92;
}

/* ---- HORIZONTAL ARCHITECTURAL BARS ----
   Stacked in the upper-left negative space so they read as Bauhaus
   rules without cutting through the lower-left masthead text. */
.bars { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.bar {
  position: absolute;
  left: 0;
  height: clamp(7px, 1vw, 14px);
  background: var(--black);
}
.bar--1 { top: 14%; width: 32%; opacity: 0.9; }
.bar--2 { top: 17.5%; height: 4px; width: 24%; background: var(--gray); }
.bar--3 { top: 9%; width: 18%; background: var(--sage); opacity: 0.8; }

/* ---- BLUE TRIANGLE (cubist scaffold, lower-right) ---- */
.triangle {
  position: absolute;
  bottom: clamp(1rem, 7vh, 5rem);
  right: clamp(1rem, 5vw, 4rem);
  width: 0; height: 0;
  border-left: clamp(36px, 8vw, 100px) solid transparent;
  border-bottom: clamp(54px, 12vw, 140px) solid var(--blue);
  z-index: 0;
  opacity: 0.8;
}

/* ============================================================
   MANIFESTO (below the hero, full-width centered block)
   ============================================================ */
.manifesto {
  max-width: var(--maxw);
  margin: clamp(3rem, 9vw, 7rem) auto;
  padding: 0 var(--gutter);
}
.manifesto__list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 0;
}
.manifesto__list li {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(1.5rem, 6vw, 3.4rem);
  line-height: 1.05;
  padding: clamp(0.6rem, 1.6vw, 1rem) 0;
  border-bottom: var(--rule) solid var(--black);
}
.manifesto__list li:first-child { border-top: var(--rule) solid var(--black); }
.manifesto__list li:nth-child(even) { color: var(--sage); }
.manifesto__list li:nth-child(even)::before {
  content: "";
  display: inline-block;
  width: 0.7em; height: 0.7em;
  margin-right: 0.5em;
  background: var(--red);
  border-radius: 50%;
  vertical-align: 0.02em;
}

/* ============================================================
   SINGLE CTA (under the manifesto)
   ============================================================ */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  text-decoration: none;
  color: var(--cream);
  background: var(--red);
  padding: 0.9rem 1.6rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.cta__arrow { transition: transform 0.2s ease; }
@media (hover: hover) {
  .cta:hover, .cta:focus-visible { background: var(--black); outline: none; }
  .cta:hover .cta__arrow, .cta:focus-visible .cta__arrow { transform: translateX(4px); }
}
.cta:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }

/* ============================================================
   FOOTER (the society line, like birdhaus)
   ============================================================ */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) clamp(3rem, 8vw, 5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  border-top: 3px solid var(--black);
}
.footer__mark {
  width: 18px; height: 18px;
  background: var(--red);
  border-radius: 50%;
  flex: none;
}
.footer p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: clamp(0.75rem, 1.8vw, 0.95rem);
}

/* ============================================================
   MOTION - entrance animations
   Elements start displaced; script.js adds .is-loaded to <body>.
   ============================================================ */
.sun, .artwork .plane, .title, .subtitle { --ease: cubic-bezier(0.22, 1, 0.36, 1); }

body:not(.is-loaded) .sun           { transform: scale(0.2); opacity: 0; }
body:not(.is-loaded) .title         { opacity: 0; transform: translateY(18px) scaleY(1.08); }
body:not(.is-loaded) .subtitle      { opacity: 0; }
body:not(.is-loaded) .artwork .plane { opacity: 0; transform: translateY(14px) scale(0.985); }

.sun      { transition: transform 0.9s var(--ease), opacity 0.9s ease; }
.title    { transition: opacity 0.8s ease 0.1s, transform 0.8s var(--ease) 0.1s; }
.subtitle { transition: opacity 0.8s ease 0.45s; }
.artwork .plane {
  transition: opacity 0.8s ease 0.35s, transform 0.8s var(--ease) 0.35s;
}

/* ---- RESPECT REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  .sun, .artwork .plane, .title, .subtitle, .cta, .cta__arrow {
    transition: none !important;
    animation: none !important;
  }
  body .sun            { transform: none; opacity: 1; }
  body .title          { transform: scaleY(1.08); opacity: 1; }
  body .subtitle       { opacity: 1; }
  body .artwork .plane { transform: none; opacity: 1; }
}
