/* =====================================================================
   ADW Studium — Studio Site
   styles.css  ·  shared across index.html + about.html
   ---------------------------------------------------------------------
   Sections:
     01  Tokens
     02  Base / reset
     03  Thin rail (left navigation)
     04  Front page — full-bleed colour bento
     05  Status modal
     06  About page
     07  Footer
     08  Reveal-on-scroll
     09  Responsive
   ===================================================================== */

/* ── 01 · TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Primary brand */
  --purple: #775AA6;
  --teal:   #1B9EA9;
  --amber:  #FCB245;
  --navy:   #2A6B9D;
  --rose:   #D56072;
  --black:  #000000;

  /* Hover (deepened) tones */
  --purple-d: #5d4488;
  --teal-d:   #157f88;
  --amber-d:  #ef9f24;
  --navy-d:   #21557d;
  --rose-d:   #c14c5e;

  /* Supporting */
  --cream:  #FFF7B1;
  --white:  #FFFFFF;
  --ink:    #1c130a;     /* dark text used on amber */

  /* Neutrals */
  --rail-bg: #0e0e10;
  --card:    #121212;
  --card-2:  #171717;
  --dim:     #8A8A8A;
  --dim-2:   #5a5a5a;
  --rule:    #232323;

  /* Type */
  --font-display: 'Big Caslon', 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Myriad Pro', 'Trebuchet MS', Helvetica, sans-serif;

  /* Layout */
  --rail-w: 66px;
  --gap: 12px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── 02 · BASE / RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The front page is a fixed full-viewport board — never scrolls */
body.home { overflow: hidden; }

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

.eyebrow {
  
  align-items: center;
  gap: 12px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }

/* ── 03 · THIN RAIL ──────────────────────────────────────────────── */
.rail {
  position: fixed;
  top: 0; left: 0;
  width: var(--rail-w);
  height: 100vh;
  background: var(--rail-bg);
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 0 20px;
  z-index: 60;
}

.rail-name {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
	transform: rotate(180deg);
}
@media (max-width: 768px) {
  .rail-name {
    writing-mode: horizontal-tb;
    transform: none;
  }
}
.rail-name b { color: var(--amber); font-weight: 600; }

.rail-mid { flex: 1; display: flex; align-items: center; }
.rail-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s var(--ease);
}
.rail-logo img { width: 34px; height: auto; }
.rail-logo:hover { transform: translateY(-3px) rotate(-4deg); }

.rail-social { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rail-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 7px;
  color: var(--dim);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.rail-social a:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.rail-social svg { width: 16px; height: 16px; }

/* ── 04 · FRONT PAGE — COLOUR BENTO ──────────────────────────────── */
.stage {
  position: fixed;
  top: 0; left: var(--rail-w); right: 0; bottom: 0;
  padding: var(--gap);
}

.bento {
  display: grid;
  width: 100%; height: 100%;
  gap: var(--gap);
  grid-template-columns: 1fr 1fr 1.15fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "worlds   research  about"
    "exp      history   about";
}

.tile {
  --t: var(--teal);
  --td: var(--teal-d);
  --on: var(--white);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-area: research;
  background: var(--t);
  color: var(--on);
  border-radius: 16px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  transition: background .4s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.tile:hover { background: var(--td); transform: translateY(-2px); box-shadow: 0 24px 50px rgba(0,0,0,0.34); }
.tile:focus-visible { outline: 3px solid rgba(255,255,255,0.6); outline-offset: -4px; }

/* per-tile colour */
.tile--about    { grid-area: about;    --t: var(--purple); --td: var(--purple-d); }
.tile--research { grid-area: research; --t: var(--navy);   --td: var(--navy-d); }
.tile--exp      { grid-area: exp;      --t: var(--teal);   --td: var(--teal-d); }
.tile--history  { grid-area: history; --t: var(--rose);   --td: var(--rose-d); }
.tile--worlds   { grid-area: worlds;  --t: var(--amber);  --td: var(--amber-d); --on: var(--ink); }

/* About is now the large feature tile */
.tile--about .tile-title { font-size: clamp(38px, 4vw, 66px); }

/* big faint triangle watermark — the brand motif */
.tile-watermark {
  position: absolute;
  right: -8%;
  bottom: -14%;
  width: 56%;
  z-index: -1;
  color: var(--on);
  opacity: 0.13;
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.tile:hover .tile-watermark { transform: scale(1.12) rotate(-6deg); opacity: 0.18; }
.tile--worlds .tile-watermark { opacity: 0.16; width: 44%; right: 6%; }

.tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tile-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}

.tile-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.32);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tile-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.85;
}
.tile-status.is-open { border-color: rgba(28,19,10,0.4); }
.tile-status.is-open::before { animation: pulse 2.2s infinite; opacity: 1; }
.tile--worlds .tile-status { border-color: rgba(28,19,10,0.35); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 currentColor; }
  70%  { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* the small triangle glyph that nudges on hover */
.tile-glyph { transition: transform .4s var(--ease); }
.tile:hover .tile-glyph { transform: translateY(-4px) rotate(10deg); }

.tile-foot { display: flex; flex-direction: column; gap: 8px; }

.tile-num {
  font-family: var(--font-display);
  font-size: 15px;
  opacity: 0.7;
  margin-bottom: 2px;
}

.tile-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 52px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.tile-desc {
  font-size: 14px;
  line-height: 1.6;
  max-width: 34ch;
  opacity: 0.82;
}

/* "What we do" stylised list — About tile only */
.tile-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 4px 0 2px;
}
.tile-list li {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(16px, 1.7vw, 23px);
  line-height: 1.42;
  letter-spacing: -0.01em;
  opacity: 0.88;
}
.tile-list li b {
  font-weight: 400;
  font-style: italic;
  color: var(--amber);
  opacity: 1;
}

.tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tile-cta .arrow {
  font-size: 16px;
  transition: transform .3s var(--ease);
}
.tile:hover .tile-cta .arrow { transform: translate(4px, -4px); }
.tile-cta.is-modal:hover .arrow { transform: translateX(5px); }

/* ── 05 · STATUS MODAL ───────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s var(--ease);
}
.modal-backdrop.is-open { opacity: 1; visibility: visible; }

.modal {
  width: min(100%, 520px);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: 0 40px 90px rgba(0,0,0,0.6);
  padding: 36px;
  border-top: 4px solid var(--accent, var(--teal));
  transform: translateY(12px) scale(0.98);
  transition: transform .3s var(--ease);
}
.modal-backdrop.is-open .modal { transform: none; }

.modal .eyebrow { margin-bottom: 18px; color: var(--accent, var(--teal)); }
.modal .eyebrow::before { background: currentColor; }
.modal h2 {
  font-family: var(--font-display);
  font-weight: 400; font-size: 40px; line-height: 1;
  margin-bottom: 16px; letter-spacing: -0.01em;
}
.modal-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 18px;
}
.modal-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent, var(--amber)); }
.modal p { color: var(--dim); font-size: 14px; line-height: 1.85; margin-bottom: 28px; }
.modal-close {
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 11px 18px; font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--white);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.modal-close:hover { border-color: var(--teal); background: rgba(255,255,255,0.03); }

/* ── 06 · ABOUT PAGE ─────────────────────────────────────────────── */
body.about-page::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 18% 8%, rgba(119,90,166,0.16), transparent 26%),
    radial-gradient(circle at 88% 16%, rgba(27,158,169,0.12), transparent 24%),
    radial-gradient(circle at 78% 90%, rgba(252,178,69,0.09), transparent 24%),
    var(--black);
}

.main {
  margin-left: var(--rail-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.content {
  flex: 1;
  padding: 64px 56px 40px;
  max-width: 1140px; width: 100%; margin: 0 auto;
}

.page-header { margin-bottom: 20px; }
.page-header .eyebrow { margin-bottom: 26px; }
.page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 16ch;
  text-wrap: balance;
}
.page-title em { font-style: italic; color: var(--amber); }

.about-section { padding: 56px 0; border-top: 1px solid var(--rule); }
.about-section:first-of-type { border-top: none; padding-top: 40px; }

.section-grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.section-index { display: flex; flex-direction: column; gap: 10px; }
.section-index .num { font-family: var(--font-display); font-size: 32px; color: var(--dim-2); line-height: 1; }
.section-index .label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }

.lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.lede em { font-style: italic; color: var(--amber); }

.prose { color: var(--dim); font-size: 15px; line-height: 1.9; max-width: 60ch; }
.prose + .prose { margin-top: 18px; }
.prose strong { color: var(--white); font-weight: 500; }

.outputs { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--rule); }
.output {
  display: flex; align-items: baseline; gap: 16px;
  padding: 18px 4px; border-bottom: 1px solid var(--rule);
  transition: padding .25s var(--ease);
}
.output:hover { padding-left: 12px; }
.output .o-num { font-family: var(--font-display); font-size: 15px; color: var(--accent, var(--teal)); width: 28px; }
.output .o-name { font-size: 16px; color: var(--white); }
.output .o-meta { margin-left: auto; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim-2); }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 28px; padding: 14px 22px;
  border: 1px solid var(--rule); border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--white);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.btn .arrow { color: var(--amber); transition: transform .25s var(--ease); }
.btn:hover { border-color: var(--amber); background: rgba(252,178,69,0.06); transform: translateY(-2px); }
.btn:hover .arrow { transform: translateX(5px); }

.founder { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; }
.portrait {
  position: relative; aspect-ratio: 4 / 5;
  border-radius: 18px; overflow: hidden; border: 1px solid var(--rule);
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 22px),
    var(--card);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-fallback {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center; padding: 24px;
}
.portrait-fallback img { width: 84px; height: auto; opacity: 0.85; }
.portrait-fallback .pf-note { font-size: 10px; letter-spacing: 0.12em; color: var(--dim-2); text-transform: uppercase; }
.portrait-fallback .pf-sub { font-size: 9px; color: #3a3a3a; letter-spacing: 0.04em; }

.founder-name { font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1; margin-bottom: 10px; }
.founder-role { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); margin-bottom: 22px; }

.beliefs { display: grid; border-top: 1px solid var(--rule); }
.belief {
  display: grid; grid-template-columns: 56px 1fr; gap: 24px;
  padding: 26px 4px; border-bottom: 1px solid var(--rule);
  align-items: start; transition: padding .25s var(--ease);
}
.belief:hover { padding-left: 12px; }
.belief .b-num { font-family: var(--font-display); font-size: 22px; line-height: 1; }
.belief p {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(20px, 2.4vw, 27px); line-height: 1.32;
  letter-spacing: -0.01em; text-wrap: pretty;
}
.belief p em { font-style: italic; color: var(--amber); }

.closing {
  margin-top: 8px;
  padding: 56px 56px;
  margin-left: -56px; margin-right: -56px;
  border-top: 1px solid var(--rule);
  background:
    radial-gradient(circle at 80% 30%, rgba(119,90,166,0.16), transparent 42%),
    #0d0d0d;
}
.closing-inner { max-width: 760px; }
.closing .eyebrow { color: var(--purple); margin-bottom: 24px; }
.closing .eyebrow::before { background: var(--purple); }
.closing p {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(26px, 3.6vw, 42px); line-height: 1.25;
  letter-spacing: -0.015em; text-wrap: pretty;
}

/* ── 07 · FOOTER (about page) ────────────────────────────────────── */
.footer {
  margin-top: auto;
  padding: 32px 56px 40px;
  border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.footer-left { display: flex; align-items: center; gap: 16px; }
.footer-left img { width: 30px; height: auto; }
.footer-name { font-family: var(--font-display); font-size: 17px; }
.footer-sub { font-size: 10px; color: var(--dim-2); letter-spacing: 0.06em; line-height: 1.6; }
.footer-right { font-size: 10px; color: var(--dim-2); letter-spacing: 0.08em; text-align: right; line-height: 1.7; }
.footer-palette { display: flex; height: 4px; width: 120px; border-radius: 2px; overflow: hidden; }
.footer-palette div { flex: 1; }

/* ── 08 · REVEAL ON SCROLL ───────────────────────────────────────── */
.reveal-on .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-on .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto; }
}

/* ── 09 · RESPONSIVE ─────────────────────────────────────────────── */

/* Medium — board becomes scrollable so nothing clips */
@media (max-width: 1024px) {
  body.home { overflow: auto; }
  .stage {
    position: static;
    margin-left: var(--rail-w);
    padding: var(--gap);
  }
  .bento {
    height: auto;
    min-height: calc(100vh - 2 * var(--gap));
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-auto-rows: minmax(248px, 1fr);
    grid-template-areas:
      "about    about"
      "worlds   research"
      "exp      history";
  }
  .section-grid { grid-template-columns: 1fr; gap: 20px; }
  .section-index { flex-direction: row; align-items: baseline; gap: 14px; }
}

/* Mobile — rail becomes a slim top bar; bento stacks and scrolls */
@media (max-width: 720px) {
  body.home { overflow: auto; }

  .rail {
    position: sticky; top: 0;
    width: 100%; height: auto;
    flex-direction: row;
    align-items: center;
    padding: 12px 18px;
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .rail-name { writing-mode: horizontal-tb; font-size: 11px; letter-spacing: 0.24em; }
  .rail-mid { flex: 0; }
  .rail-logo img { width: 30px; }
  .rail-social { flex-direction: row; margin-left: auto; }

  .stage { position: static; margin-left: 0; padding: 12px; }
  .bento {
    display: flex; flex-direction: column;
    height: auto; gap: 12px;
  }
  .tile { min-height: 42vw; padding: 22px 22px; }
  .tile--about { min-height: 60vw; }
  .tile-title { font-size: clamp(34px, 9vw, 48px); }
  .tile--about .tile-title { font-size: clamp(40px, 11vw, 58px); }
  .tile-desc { max-width: none; }

  .main { margin-left: 0; }
  .content { padding: 40px 22px 32px; }
  .outputs { grid-template-columns: 1fr; }
  .founder { grid-template-columns: 1fr; gap: 24px; }
  .portrait { max-width: 280px; }
  .closing { padding: 44px 22px; margin-left: -22px; margin-right: -22px; }
  .footer { padding: 28px 22px 36px; flex-direction: column; align-items: flex-start; }
  .footer-right { text-align: left; }
}
.card-logo {
  display: block;
  width: clamp(48px, 30%, 90px);
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}
