/* 3dc-dusk — 3D-C layout (copied from 3dc.css) with the 3D-A dusk palette.
   Ink #16110e, ivory #f3ebdd (15.8:1), amber CTA #c9841a with ink (6.1:1), light amber text #e3a548 (8.7:1).
   Every pairing is listed in contrast.md. */
.theme-c-dusk {
  --bg: #16110e;
  --fg: #f3ebdd;
  --muted: #cfc5b4;
  --accent: #c9841a;
  --accent-ink: #16110e;
  --accent-text: #e3a548;
  --ring: #e3a548;
  --line: rgb(243 235 221 / 0.18);
  --card: #241c17;
  --bar-bg: #c9841a;
  --bar-fg: #16110e;
  --menu-bg: #0d0a08;
  --menu-fg: #f3ebdd;
  --menu-accent: #e3a548;
  --field-bg: #100c0a;
  --field-border: #8a7c69;
  --field-radius: 14px;
  --btn-radius: 999px;
  --lb-bg: #16110e;
  --lb-fg: #f3ebdd;
  --lb-img-bg: #0d0a08;
  --lb-radius: 28px;
  /* Thin ivory edge so photos do not melt into the dark ground. stage-c.js reads --plane-edge for the 3D planes. */
  --plane-edge: rgb(243 235 221 / 0.4);
  --photo-edge: 0 0 0 1.5px var(--plane-edge), 0 28px 56px -28px rgb(0 0 0 / 0.8);
  --r-big: clamp(56px, 9vw, 150px);
  --r-mid: clamp(28px, 4vw, 56px);
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-accent: 'Newsreader', Georgia, 'Times New Roman', serif;
}
.theme-c-dusk h1, .theme-c-dusk h2, .theme-c-dusk h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.06; letter-spacing: -0.03em; }
/* Hover only for a real mouse: on touch it would stick after a tap (mobile-native); touch gets :active in ia3.css */
@media (hover: hover) and (pointer: fine) {
  .theme-c-dusk .btn-ghost:hover { background: rgb(243 235 221 / 0.12); border-color: var(--accent-text); }
  .theme-c-dusk .btn-cta:hover { background: var(--accent-text); }
  .theme-c-dusk main a:not(.btn):hover, .theme-c-dusk .site-footer a:hover, .theme-c-dusk .site-header .mark:hover { color: var(--accent-text); text-decoration: underline; }
}
/* One accent line per page only. */
.accent { display: block; font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--accent-text); }
.kicker { font-weight: 600; color: var(--muted); }
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-title { font-size: var(--step-3); margin-bottom: 2rem; }

/* ---------- Hero ---------- */
.hero-c {
  display: grid; gap: 1.5rem;
  max-width: var(--max); margin-inline: auto; padding: 0.5rem var(--gutter) clamp(3rem, 6vw, 5rem);
}
.hero-c h1 { font-size: clamp(1.75rem, 1rem + 3vw, 4.25rem); max-width: 20ch; }
.hero-c h1 .accent { margin-top: 0.35em; font-size: 0.92em; line-height: 1.12; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 1023px) { .hero-media { order: -1; } }
@media (min-width: 1024px) {
  .hero-c {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center;
    gap: clamp(2rem, 4vw, 4.5rem); min-height: calc(100svh - var(--chrome));
  }
}

.soft-stage { position: relative; aspect-ratio: 6 / 5; touch-action: pan-y; }
.soft-stage > img {
  position: absolute; object-fit: cover; background: var(--card);
  box-shadow: var(--photo-edge);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.5s ease;
}
.soft-main {
  left: 0; top: 4%; width: 64%; height: 92%; z-index: 2;
  border-radius: var(--r-big) 0 0 0;
  transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 5deg)) rotateX(calc(var(--ty, 0) * -4deg));
}
.soft-peek-a {
  right: 0; top: 0; width: 46%; aspect-ratio: 16 / 9;
  border-radius: var(--r-mid) 0 0 0;
  transform: translate(calc(var(--tx, 0) * -10px), calc(var(--ty, 0) * -8px));
}
.soft-peek-b {
  right: 4%; bottom: 6%; width: 50%; aspect-ratio: 3 / 1; object-fit: contain;
  border-radius: var(--r-mid) 0 0 0;
  transform: translate(calc(var(--tx, 0) * -16px), calc(var(--ty, 0) * -12px));
}
.soft-stage.is-live > img { opacity: 0; }
.hero-media figcaption { display: grid; gap: 0.25rem; margin-top: 1.25rem; max-width: 34rem; }
.hero-media figcaption a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; font-weight: 700; font-size: var(--step-1); }

/* Phones: the whole hero fits the first screen. Bar + header are ~104px here (budget 7rem);
   the photo stage shrinks (keeping 6:5, so 3D and CSS still match) and text/CTA keep their size. */
@media (max-width: 760px) {
  .theme-c-dusk .preview-bar { flex-wrap: nowrap; }
  .theme-c-dusk .site-header { min-height: 3.5rem; padding-block: 0.375rem; }
  .hero-c {
    display: flex; flex-direction: column; gap: 1rem;
    padding-top: 0.25rem; padding-bottom: 2rem;
    /* height (not max-height): on tall phones the spare space stays below the CTAs, so the hero
       reaches the dock strip (data-dock-clear hides the dock) and "Selected work" starts below the fold */
    height: calc(100vh - 5rem);
    height: calc(100svh - 5rem); /* 100svh - 7rem chrome + 2rem bottom padding */
  }
  .hero-media { display: flex; flex-direction: column; min-height: 0; }
  .stage-fit { flex: 0 1 calc((100vw - 2 * var(--gutter)) * 5 / 6); min-height: 7.5rem; container-type: size; }
  .stage-fit .soft-stage { width: min(100cqw, 120cqh); }
  .hero-copy { flex-shrink: 0; }
  .hero-media figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 0 0.75rem; margin-top: 0.5rem; }
  .hero-media figcaption > span:last-child { flex-basis: 100%; }
  .hero-actions { flex-wrap: nowrap; gap: 0.5rem; margin-top: 1rem; }
  .hero-actions .btn { padding-inline: 0.875rem; text-align: center; }
}
@media (max-width: 760px) and (max-height: 700px) { .hero-c h1 { font-size: 1.5rem; } }

/* ---------- Works grid ---------- */
.works-c { display: grid; gap: 2.5rem 1.5rem; }
@media (min-width: 700px) { .works-c { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .works-c { grid-template-columns: repeat(3, 1fr); } }
.works-c .work { display: grid; gap: 0.25rem; align-content: start; }
.works-c .work-thumb {
  order: -1; margin-bottom: 0.75rem; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--card); border-radius: var(--r-mid) 0 0 0; box-shadow: 0 0 0 1.5px var(--plane-edge);
}
.works-c .work-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s ease; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .works-c .work:hover .work-thumb img { transform: scale(1.03); }
}
.work-num { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.works-c .work-title { font-size: var(--step-1); }
.work-text { color: var(--muted); }

/* ---------- Services, contact, footer ---------- */
.services-c { list-style: none; display: grid; border-top: 1px solid var(--line); }
.services-c li { padding-block: 1rem; border-bottom: 1px solid var(--line); font: 700 var(--step-3)/1.1 var(--font-display); letter-spacing: -0.03em; }
@media (min-width: 900px) { .services-c { grid-template-columns: repeat(4, 1fr); } .services-c li { border-bottom: 0; } }
.contact-c .wrap { display: grid; gap: 2.5rem; }
.contact-card { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-big) 0 0 0; padding: clamp(1.5rem, 5vw, 4rem); display: grid; gap: 2.5rem; }
.contact-card h2 { font-size: var(--step-4); margin-bottom: 1rem; }
.contact-card p { max-width: 36ch; font-size: var(--step-1); color: var(--muted); }
@media (min-width: 900px) { .contact-card { grid-template-columns: 1fr 1fr; } }
.site-footer { padding-block: 2rem; border-top: 1px solid var(--line); color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; list-style: none; }

/* ---------- About ---------- */
.about-hero-c { padding-block: clamp(2.5rem, 7vw, 6rem); }
.about-hero-c h1 { font-size: var(--step-5); }
.about-hero-c .accent { margin-top: 1.5rem; max-width: 26ch; font-size: var(--step-3); line-height: 1.2; }
.split { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 3rem; } }
.big-copy { font-size: var(--step-2); line-height: 1.4; max-width: 34ch; }
.founder-c { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-big) 0 0 0; padding: clamp(2rem, 6vw, 5rem); }
.founder-name { font: 800 clamp(7rem, 4rem + 22vw, 24rem)/0.82 var(--font-display); letter-spacing: -0.06em; color: var(--accent-text); margin-block: 1rem 2rem; }
.founder-role { font-size: var(--step-2); font-weight: 700; }
.founder-c dl { display: grid; gap: 0.25rem; margin-top: 1rem; color: var(--muted); }

/* ---------- PH I MOA ---------- */
.case-hero-c { display: grid; gap: 2rem; padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(3rem, 6vw, 5rem); }
.case-hero-c h1 { font-size: var(--step-5); letter-spacing: -0.045em; }
.case-sub { margin-top: 1rem; font-size: var(--step-1); color: var(--muted); max-width: 32ch; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 1rem; font-weight: 600; }
.case-photo img {
  width: 100%; aspect-ratio: 1050 / 1180; object-fit: cover; border-radius: var(--r-big) 0 0 0;
  box-shadow: var(--photo-edge);
  transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 4deg)) rotateX(calc(var(--ty, 0) * -3deg));
  transition: transform 0.5s ease;
}
.case-photo figcaption { margin-top: 0.75rem; color: var(--muted); }
@media (min-width: 1024px) { .case-hero-c { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; } .case-photo { max-width: 34rem; justify-self: end; } }
.meta { display: grid; gap: 1rem; margin-top: 2rem; }
.meta div { border-top: 1px solid var(--line); padding-top: 0.75rem; }
.meta dt { font-weight: 700; }
@media (min-width: 600px) { .meta { grid-template-columns: 1fr 1fr; } }
.prose { font-size: 1.125rem; max-width: 40rem; }
.prose p + p { margin-top: 1rem; }
.mission { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; line-height: 1.12; max-width: 22ch; margin-bottom: 1.5rem; }
.steps { list-style: none; counter-reset: s; max-width: 40rem; }
.steps li { counter-increment: s; display: flex; gap: 1rem; padding-block: 0.75rem; border-bottom: 1px solid var(--line); font-size: 1.125rem; }
.steps li::before { content: counter(s, decimal-leading-zero); font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.gallery { display: grid; gap: 2rem 1.5rem; margin-top: 3rem; }
@media (min-width: 760px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery figure:first-child { grid-column: 1 / -1; } }
.zoom { display: block; width: 100%; padding: 0; border: 0; overflow: hidden; background: var(--card); box-shadow: 0 0 0 1.5px var(--plane-edge); border-radius: var(--r-mid) 0 0 0; cursor: zoom-in; }
.zoom img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.gallery figure:first-child .zoom img { aspect-ratio: 16 / 9; }
.gallery figcaption { margin-top: 0.75rem; color: var(--muted); }
.quote { max-width: 46rem; }
.quote p { font-size: var(--step-2); font-weight: 600; line-height: 1.35; letter-spacing: -0.02em; }
.quote footer { margin-top: 1.25rem; color: var(--muted); font-weight: 600; }
