/* The DAMA page — "Casa DAMA": cream paper, brown ink, the DAMA red, Fraunces and
   Inter. Like the real site, it has a door for each audience, and each door tells
   the story of the project from that side. */

@view-transition { navigation: auto; }

:root {
  --paper: #FBF6EE; --paper-2: #F3E9DB; --ink: #241511; --ink-soft: #6E5A50;
  --red: #8C0000; --red-dark: #5E0606; --clay: #C2603B; --line: rgba(36,21,17,.14);
  --cream: #F6ECDC; --dark: #241511;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16.5px; line-height: 1.6; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

/* nav, with the door switcher */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 28px; background: rgba(251,246,238,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-left { display: flex; align-items: center; gap: 16px; }
.nav-left img { height: 30px; width: auto; display: block; }
.nav-left a.back { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink-soft); }
.nav-left a.back:hover { color: var(--red); }
.doors { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.door { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-soft); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.door:hover { background: rgba(140,0,0,.08); border-color: var(--red); color: var(--red); }
.door[aria-selected="true"] { background: var(--red); border-color: var(--red); color: var(--cream); }
.door.enter { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.door.enter[aria-selected="true"] { background: var(--red); border-color: var(--red); }

/* hero */
.hero { background: linear-gradient(180deg, #FFFDF8 0%, var(--paper) 100%); }
.hero .wrap { padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(56px, 7vw, 88px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
.eyebrow { color: var(--red); font-weight: 700; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.hero h1 { font-family: var(--serif); font-size: clamp(40px, 5.5vw, 62px); line-height: 1; margin: 16px 0 12px; letter-spacing: -1.5px; font-weight: 600; }
.slogan { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--red); margin-bottom: 22px; }
.hero p.lede { max-width: 520px; color: var(--ink-soft); margin-bottom: 26px; }
.btn { display: inline-block; background: var(--red); color: var(--cream); padding: 13px 26px; border-radius: 4px; font-size: 15px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; transition: background .18s, transform .18s; }
.btn:hover { background: var(--red-dark); transform: translateY(-1px); }
.cards { position: relative; width: 100%; max-width: 360px; margin-left: auto; aspect-ratio: 4 / 5; }
.cards span { position: absolute; inset: 0; border-radius: 14px; }
.cards span:nth-child(1) { background: var(--red-dark); transform: rotate(-3deg); }
.cards span:nth-child(2) { background: var(--red); transform: rotate(2.5deg); }
.cards span:nth-child(3) { background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 18px 40px rgba(36,21,17,.16); }
.cards img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

/* a door's panel */
.panel { padding: 80px 0; border-top: 1px solid var(--line); }
.door-page[hidden] { display: none; }
.panel { background: var(--paper-2); }
.head { display: flex; align-items: flex-end; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 11px; margin-bottom: 18px; }
.head .n { font-family: var(--serif); font-size: clamp(30px, 4.2vw, 44px); font-weight: 600; color: var(--red); line-height: .8; letter-spacing: -1.5px; }
.head h2 { flex: 1; font-family: var(--serif); font-size: clamp(18px, 2.4vw, 23px); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; line-height: 1.1; }
.intro { font-size: 16px; line-height: 1.65; color: var(--ink-soft); max-width: 680px; margin-bottom: 34px; }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.row:first-of-type { border-top: 0; }
.row .k { font-family: var(--serif); font-size: 22px; font-weight: 600; color: rgba(140,0,0,.28); line-height: 1; text-align: right; }
.row h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; margin-bottom: 7px; line-height: 1.3; }
.row p { font-size: 15.5px; line-height: 1.7; color: #4A3A33; max-width: 660px; }
.row p + p { margin-top: 8px; }

.shot { margin-top: 40px; }
.shot-frame { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px rgba(36,21,17,.12); }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--paper-2); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }
.shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(36,21,17,.2); }
.shot-bar span { margin-left: 8px; }
.canvas { display: block; aspect-ratio: 16 / 10; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--red) var(--paper-2); }
.canvas img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }

/* numbers */
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 8px; }
.numbers div { background: var(--paper); padding: 22px 18px; }
.numbers b { display: block; font-family: var(--serif); font-size: 38px; font-weight: 600; color: var(--red); line-height: 1; }
.numbers span { display: block; margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); }

/* made + workshop */
.made { padding: 80px 0; border-top: 1px solid var(--line); }
.made p { max-width: 680px; color: var(--ink-soft); margin-bottom: 20px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tags li { font-size: 13px; font-weight: 600; padding: 4px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.workshop { background: var(--red); color: var(--cream); padding: 76px 0; }
.workshop .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px; align-items: center; }
.workshop h2 { font-family: var(--serif); font-size: clamp(34px, 5vw, 52px); font-weight: 600; line-height: 1; letter-spacing: -1px; }
.workshop p { color: rgba(246,236,220,.88); margin: 14px 0 0; max-width: 460px; }
.workshop .ghost { display: inline-block; color: var(--cream); border: 1px solid rgba(246,236,220,.6); padding: 13px 26px; border-radius: 4px; text-decoration: none; font-weight: 600; }
.workshop .ghost:hover { background: var(--cream); color: var(--ink); }
.workshop small { display: block; margin-top: 10px; font-size: 12.5px; color: rgba(246,236,220,.7); }

/* footer */
.footer { background: var(--dark); color: var(--cream); padding: 46px 28px 36px; }
.footer-in { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; align-items: flex-end; }
.footer img { height: 32px; width: auto; display: block; }
.footer p { font-size: 13px; color: rgba(246,236,220,.72); margin-top: 12px; max-width: 340px; }
.footer em { font-family: var(--serif); }
.footer a.back { color: rgba(246,236,220,.88); text-decoration: none; font-weight: 500; }
.footer a.back:hover { color: #fff; }
.footer-clawd { width: 60px; display: block; margin-bottom: 12px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.seen { opacity: 1; transform: none; }
::view-transition-group(*) { animation-duration: .6s; animation-timing-function: cubic-bezier(.7, 0, .2, 1); }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .cards { margin: 0 auto; max-width: 280px; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { padding: 10px 16px; flex-wrap: wrap; }
  .door { padding: 5px 10px; font-size: 12px; }
  .wrap { padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- changing door: Clawd runs across dragging a sheet over the page ---------- */
.dragger { position: fixed; inset: 0; z-index: 9998; overflow: hidden; pointer-events: auto; }
.dragger[hidden] { display: none; }
.dragger .sheet { position: absolute; top: 0; left: 0; width: 100vw; height: 100%; background: linear-gradient(180deg, var(--red), var(--red-dark)); box-shadow: 12px 0 34px rgba(36,21,17,.35); will-change: transform; }
.dragger .sheet::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 10px; background: rgba(0,0,0,.18); }
.drag-clawd { position: absolute; left: 0; top: 0; overflow: visible; will-change: transform; }

/* ---------- the company deck: the real eight slides, scrollable ---------- */
.deck-wrap { position: relative; }
.deck { aspect-ratio: 16 / 10; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; background: #241511; }
.deck::-webkit-scrollbar { display: none; }
.deck .slide { display: block; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; scroll-snap-stop: always; }
.deck:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.deck-dots { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 7px; }
.deck-dots .dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 1px solid rgba(246,236,220,.7); background: transparent; cursor: pointer; }
.deck-dots .dot.on { background: var(--cream); }
.deck-nav { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 12px; border-radius: 999px; background: rgba(36,21,17,.72); color: var(--cream); font-size: 12px; font-weight: 600; }
.deck-nav button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(246,236,220,.5); background: transparent; color: var(--cream); font-size: 18px; line-height: 1; cursor: pointer; }
.deck-nav button:disabled { opacity: .35; cursor: default; }

/* The world card on the home page grows into this full-screen layer: entering a world. */
.vt-portal { position: fixed; inset: 0; pointer-events: none; }
