/* ============================================================
   O.C.C.D. — a creative directors' club
   Art-direction pass: dense work wall + floating panels (NEU skeleton, OCCD voice)
   Field: bone · Tiles & dark panels: near-black · Accent: chartreuse lime (sparing) · Grain
   Type: Space Mono (micro) · Bricolage Grotesque (display) · Newsreader italic (serif)
   ============================================================ */

:root {
  --bone:      #E7E3D6;   /* the field                      */
  --panel:     #F1EDE1;   /* light paper panels             */
  --ink:       #14130F;   /* tiles & dark panels            */
  --ink-2:     #1C1B15;   /* tile surface (current take)    */
  --ink-3:     #101009;   /* tile surface (rejected take)   */
  --lime:      #C8F000;   /* accent — used sparingly        */
  --grey:      #8B8775;
  --grey-2:    #6F6C5E;
  --paper:     #EFEBDD;   /* text on dark                   */
  --line:      rgba(20,19,15,0.14);
  --line-dark: rgba(239,235,221,0.14);

  --gap: 3px;                         /* hairline wall gap   */
  --field: clamp(14px, 1.8vw, 24px);  /* bone margin         */
  --rail-w: clamp(248px, 23vw, 320px);
  --shadow: 0 8px 30px rgba(20,19,15,0.13), 0 1px 0 rgba(255,255,255,0.4) inset;
  --r: 12px;

  --mono: "Space Mono", ui-monospace, Menlo, monospace;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--display);
  background: var(--bone);
  color: var(--ink);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
button, summary { font: inherit; color: inherit; cursor: pointer; }

/* grain over the whole field + panels */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  background-image: url("assets/svg/grain.svg");
  background-size: 220px 220px;
  opacity: 0.055;
  mix-blend-mode: multiply;
}

/* ---- micro atoms ---------------------------------------- */
.mono {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-2);
}
.serif-it { font-family: var(--serif); font-style: italic; font-weight: 400; }

.logo { width: 120px; height: auto; }
.logo--ink  { color: var(--ink); }
.logo--lime { color: var(--lime); }
.logo--grey { color: var(--grey); }

.status {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey-2);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 0 rgba(200,240,0,0.5);
  animation: pulse 2.8s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(200,240,0,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(200,240,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,240,0,0); }
}

/* ============================================================
   THE FIELD + WORK WALL
   ============================================================ */
.field {
  padding: var(--field);
  min-height: 100vh;
}

/* dense, mixed-ratio packed wall (multi-column = correct ratios, hairline gaps) */
.wall {
  column-count: 5;
  column-gap: var(--gap);
}
@media (min-width: 1500px) { .wall { column-count: 6; } }
@media (max-width: 1100px)  { .wall { column-count: 4; } }
@media (max-width: 760px)   { .wall { column-count: 3; } }
@media (max-width: 480px)   { .wall { column-count: 2; } }

.tile {
  break-inside: avoid;
  display: block;
  margin-bottom: var(--gap);
  position: relative;
}
.tile__frame {
  position: relative;
  aspect-ratio: var(--ar, 16 / 9);
  overflow: hidden;
  background: var(--ink-2);
}

/* two stacked takes: current (front) reveals the rejected one (behind) on hover */
.tile__take {
  position: absolute; inset: 0;
  display: grid; place-items: center;
}
.tile__take img, .tile__take video { width: 100%; height: 100%; object-fit: cover; }

.tile__reject {
  z-index: 1;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.018) 0 2px, transparent 2px 10px),
    var(--ink-3);
  filter: saturate(0.6) brightness(0.78);
}
.tile__current {
  z-index: 2;
  background:
    radial-gradient(120% 90% at 30% 20%, #26251d, #161510 70%),
    var(--ink-2);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

/* placeholder texture so empty tiles still read as frames */
.tile__current::before, .tile__reject::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(239,235,221,0.04) 100%),
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(239,235,221,0.04) 100%);
  background-size: 22px 22px;
}

/* caption (default) — project · medium · year */
.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 9px 7px;
  font-family: var(--mono); font-size: 0.58rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(239,235,221,0.7);
  background: linear-gradient(transparent, rgba(8,8,5,0.6));
  transition: opacity 0.18s var(--ease);
}
/* rejected-take label (hover) */
.tile__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 9px 7px;
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.03em; text-transform: uppercase;
  color: rgba(239,235,221,0.82);
  background: linear-gradient(transparent, rgba(8,8,5,0.72));
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.2s var(--ease) 0.04s, transform 0.2s var(--ease) 0.04s;
}
.tile__label .v { color: var(--lime); }

/* the one obsessive flourish: lift the approved take, reveal the reject beneath */
@media (hover: hover) {
  .tile:hover .tile__current { transform: translateY(-7%) scale(1.015); opacity: 0; }
  .tile:hover .tile__cap { opacity: 0; }
  .tile:hover .tile__label { opacity: 1; transform: none; }
}

/* ============================================================
   FLOATING PANELS
   ============================================================ */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px 16px 15px;
}
.panel__label {
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-2);
}

/* — brand (top-left) — */
.brand { display: flex; flex-direction: column; gap: 13px; }
.brand__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.brand__mark { display: flex; flex-direction: column; gap: 8px; }
.wordmark {
  font-family: var(--display); font-weight: 800;
  font-size: 1.7rem; letter-spacing: -0.03em; line-height: 0.9;
}
.wordmark .d { color: var(--lime); }
.brand__tagline { font-family: var(--serif); font-style: italic; font-size: 1.02rem; color: var(--ink); }
.brand__desc {
  font-family: var(--mono); font-size: 0.64rem; line-height: 1.5;
  letter-spacing: 0.02em; color: var(--grey-2); max-width: 30ch;
}
.brand__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.chip {
  display: inline-flex; align-items: center; gap: 0.45em;
  background: var(--lime); color: var(--ink);
  font-family: var(--mono); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 7px 13px; border-radius: 100px;
  transition: transform 0.2s var(--ease);
}
.chip:hover { transform: translateY(-1px); }

/* — rail (top-right): expandable panels — */
.rail { display: flex; flex-direction: column; gap: var(--field); }

details.panel { padding: 0; overflow: hidden; }
details.panel > summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px;
}
details.panel > summary::-webkit-details-marker { display: none; }
.sum__title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.sum__sign {
  font-family: var(--mono); font-size: 0.9rem; color: var(--grey-2);
  transition: transform 0.25s var(--ease);
}
details[open] .sum__sign { transform: rotate(45deg); }
.panel__body { padding: 0 16px 16px; }
.panel__body .panel__label { display: block; margin-bottom: 9px; }

/* services list — problem-lines */
.problems { list-style: none; display: flex; flex-direction: column; }
.problems li {
  display: flex; gap: 9px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid var(--line);
}
.problems li:first-child { border-top: none; }
.problems .n { font-family: var(--mono); font-size: 0.6rem; color: var(--grey); flex: none; }
.problems .q {
  font-family: var(--serif); font-style: italic;
  font-size: 0.98rem; line-height: 1.25; letter-spacing: -0.005em;
}

/* club prose */
.club-text { font-family: var(--display); font-size: 0.92rem; line-height: 1.5; }
.club-text .serif-it { color: var(--ink); }

/* audience */
.aud { list-style: none; display: flex; flex-direction: column; }
.aud li { padding: 9px 0; border-top: 1px solid var(--line); }
.aud li:first-child { border-top: none; }
.aud .who { font-family: var(--display); font-weight: 700; font-size: 0.95rem; }
.aud .line { font-family: var(--display); font-size: 0.86rem; color: var(--grey-2); line-height: 1.35; }
.ph {
  display: inline-block; font-family: var(--mono); font-size: 0.54rem;
  letter-spacing: 0.1em; color: var(--ink); background: var(--lime);
  padding: 1px 5px; border-radius: 4px; margin-left: 4px; vertical-align: middle;
}

/* — clock card (dark, bottom-right) — */
.clock {
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line-dark);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: 16px; display: flex; flex-direction: column; gap: 11px;
}
.clock__top { display: flex; align-items: center; justify-content: space-between; }
.clock__top .panel__label { color: var(--grey); }
.clock__time {
  font-family: var(--mono); font-weight: 700;
  font-size: 1.9rem; letter-spacing: 0.01em; line-height: 1;
  color: var(--lime);
}
.clock__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.clock__row span { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey); }
.clock__note { font-family: var(--serif); font-style: italic; font-size: 0.92rem; color: var(--paper); line-height: 1.3; }

/* — manifesto (dark, bottom-left) — */
.manifesto {
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line-dark);
  border-radius: var(--r); box-shadow: var(--shadow);
  padding: 18px; display: flex; flex-direction: column; gap: 13px;
}
.manifesto__head { display: flex; align-items: center; justify-content: space-between; }
.manifesto__head .panel__label { color: var(--grey); }
.manifesto p {
  font-family: var(--serif); font-style: italic;
  font-size: 1.04rem; line-height: 1.4; letter-spacing: -0.005em;
}
.manifesto p .hl { color: var(--lime); font-style: normal; font-family: var(--display); font-weight: 600; }

/* — footer micro strip — */
.foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: var(--field) 2px 4px;
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-2);
}
.foot .logo { width: 60px; }

/* ============================================================
   DESKTOP — float the panels over the wall
   ============================================================ */
@media (min-width: 1025px) {
  .field { padding-bottom: 0; }
  .wall { /* fills field; panels overlay corners */ }

  .brand, .rail, .clock, .manifesto {
    position: fixed; z-index: 20; width: var(--rail-w);
  }
  .brand     { top: var(--field); left: var(--field); }
  .rail      { top: var(--field); right: var(--field); max-height: calc(100vh - 2*var(--field)); overflow-y: auto; }
  .manifesto { left: var(--field); bottom: var(--field); width: clamp(300px, 26vw, 380px); }
  .clock     { right: var(--field); bottom: var(--field); }

  /* the wall fills the whole field; panels layer over it (NEU-style) */
  .wall { column-count: 6; }
  /* breathing room at the very bottom so the last tiles clear the fixed corner panels */
  .field { padding-bottom: clamp(180px, 16vh, 240px); }
  .foot { padding-inline: calc(var(--rail-w) + var(--field)); }
}
@media (min-width: 1600px) { .wall { column-count: 7; } }

/* very wide: a touch more breathing room is unnecessary — panels stay put */

/* ============================================================
   MOBILE / TABLET — panels flow in document order
   ============================================================ */
@media (max-width: 1024px) {
  .brand { margin-bottom: var(--field); }
  .rail  { margin-top: var(--field); }
  .clock, .manifesto { margin-top: var(--field); }
  .rail { display: grid; grid-template-columns: 1fr; }
}
@media (min-width: 641px) and (max-width: 1024px) {
  .rail { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ---- reduced motion ------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .tile:hover .tile__current { transform: none; opacity: 1; }
  .tile:hover .tile__label { opacity: 1; transform: none; }
}

/* ============================================================
   HOLDING / COMING-SOON PAGE  (dark — index while pre-launch)
   ============================================================ */
body.holding-page { background: #100F0B; color: var(--paper); }
body.holding-page::after {            /* grain reads on dark */
  mix-blend-mode: soft-light; opacity: 0.10;
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: min(58vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  background:
    radial-gradient(circle,
      rgba(200,240,0,0.105) 0%,
      rgba(200,240,0,0.052) 30%,
      rgba(239,235,221,0.018) 52%,
      transparent 72%);
  filter: blur(28px);
  mix-blend-mode: screen;
  transition: opacity 0.55s var(--ease);
  will-change: transform, opacity;
}

.cursor-glow.is-active { opacity: 1; }

.holding-page .holding-field {
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--field);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: clamp(20px, 3vh, 34px);
  position: relative;
  z-index: 2;
}

/* registration / crop marks in the corners */
.crop {
  --crop-size: 18px;
  --crop-stroke: 1px;
  --crop-color: rgba(239,235,221,0.34);
  position: fixed;
  width: var(--crop-size);
  height: var(--crop-size);
  z-index: 5;
  pointer-events: none;
}
.crop::before,
.crop::after {
  content: "";
  position: absolute;
  background: var(--crop-color);
}
.crop::before {
  width: 100%;
  height: var(--crop-stroke);
}
.crop::after {
  width: var(--crop-stroke);
  height: 100%;
}
.crop--tl { top: var(--field); left: var(--field); }
.crop--tr { top: var(--field); right: var(--field); }
.crop--bl { bottom: var(--field); left: var(--field); }
.crop--br { bottom: var(--field); right: var(--field); }
.crop--tl::before,
.crop--tr::before { top: 0; }
.crop--bl::before,
.crop--br::before { bottom: 0; }
.crop--tl::after,
.crop--bl::after { left: 0; }
.crop--tr::after,
.crop--br::after { right: 0; }

/* — top bar — */
.hbar {
  position: relative;
  z-index: 2;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em;
  line-height: 1; text-transform: uppercase; color: var(--grey);
}
.hbar__brand { display: inline-flex; align-items: center; gap: 11px; }
.hbar__brand .logo { width: 76px; height: 24px; }
.hbar__meta { display: inline-flex; align-items: center; gap: 18px; }
.hbar__meta .status { color: var(--grey); }
.hbar__meta b { color: var(--paper); font-weight: 700; }

/* — center / the pitch — */
.hmain {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 880px;
  display: flex; flex-direction: column; gap: clamp(18px, 2.6vw, 30px);
}
.hkicker {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey);
}
.hstatement {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.3rem, 7vw, 5.4rem);
  line-height: 0.98; letter-spacing: -0.035em;
}
.hstatement .em {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  color: var(--lime); letter-spacing: -0.015em;
}
.hsoon {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.55rem); color: var(--grey);
}

/* — signup / waitlist — */
.signup { display: flex; flex-direction: column; gap: 11px; max-width: 540px; margin-top: clamp(4px, 1vw, 10px); }
.signup__label {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--paper);
}
.signup__row { display: flex; gap: 9px; }
.signup__input {
  flex: 1; min-width: 0;
  background: #171610;
  border: 1px solid var(--line-dark); border-radius: 100px;
  padding: 14px 20px; color: var(--paper);
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.signup__input::placeholder { color: var(--grey-2); }
.signup__input:focus { outline: none; border-color: var(--lime); background: #1C1B14; }
.signup__btn {
  flex: none; white-space: nowrap;
  background: var(--lime); color: var(--ink);
  border-radius: 100px; padding: 0 22px;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}
.signup__btn:hover { transform: translateY(-1px); }
.signup__btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.signup__note { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey-2); }
.signup__note .msg-err { color: #E8835A; }
.signup.is-error .signup__input { border-color: #E8835A; }

.signup__done {
  display: none; align-items: center; gap: 0.6em; max-width: 540px;
  border: 1px solid var(--line-dark); border-radius: 100px;
  padding: 14px 20px; margin-top: clamp(4px, 1vw, 10px);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--paper);
}
.signup__done .ok { color: var(--lime); font-weight: 700; }
.signup.is-done { display: none; }
.signup.is-done + .signup__done { display: flex; }

/* — ambient ticker: the club's rejected takes — */
.ticker {
  position: relative;
  z-index: 2;
  background: #100F0B;
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark);
  padding: 11px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: inline-flex; flex-wrap: nowrap; align-items: center;
  will-change: transform;
  animation: ticker 90s linear infinite;
}
.ticker__group { flex: 0 0 auto; }
.ticker__track span {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--grey);
}
.ticker__track .sep { color: var(--lime); margin: 0 1.1em; }
/* two identical groups; shifting by exactly one (-50%) loops seamlessly */
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* — footer — */
.hfoot {
  position: relative;
  z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.06em;
  line-height: 1; text-transform: uppercase; color: var(--grey);
}
.hfoot a:hover { color: var(--paper); }

@media (max-width: 620px) {
  .hbar__meta .clk { display: none; }
  .signup__row { flex-wrap: wrap; }
  .signup__btn { width: 100%; padding: 13px; }
}
