/* CDL Production — site.css
   Global styles, nav, footer, and shared layout.
   Requires tokens.css to be loaded first. */

/* ---- reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---- a11y: visually hidden but present for screen readers + SEO ---- */
.cdl-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;
}

/* ---- base ---- */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--cdl-bg);
  color: var(--cdl-text);
  font-family: var(--cdl-font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
}

/* ---- fixed nav ---- */
#cdlnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--cdl-pad-x);
  background: rgba(17,19,23,0);
  border-bottom: 1px solid rgba(255,255,255,0);
  transition: background 0.4s ease, border-color 0.4s ease, padding 0.4s ease;
}

#cdlnav.scrolled {
  background: rgba(15,17,20,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--cdl-hairline-soft);
  padding-top: 14px;
  padding-bottom: 14px;
}

/* nav left: logo + wordmark */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-wordmark {
  font-family: var(--cdl-font-body);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.nav-wordmark .cdl-part {
  color: var(--cdl-green);
}

.nav-wordmark .prod-part {
  color: var(--cdl-amber);
}

/* nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cdl-nav-idle);
  text-decoration: none;
  transition: color 0.25s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #ffffff;
}

/* Contact pill button */
.nav-contact {
  display: inline-flex;
  align-items: center;
  font-family: var(--cdl-font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--cdl-ink);
  background: var(--cdl-amber);
  padding: 9px 17px;
  border-radius: var(--cdl-radius-pill);
  text-decoration: none;
  transition: transform 0.25s;
  white-space: nowrap;
}

.nav-contact:hover {
  transform: translateY(-2px);
}

/* ---- footer ---- */
#cdlfooter {
  border-top: 1px solid var(--cdl-hairline-soft);
  padding: 44px var(--cdl-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-copy {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  color: var(--cdl-text-dimmer);
  white-space: nowrap;
}

.footer-location {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  color: var(--cdl-text-dimmer);
  white-space: nowrap;
}

/* ---- page entrance animation ---- */
/* Hero child elements stagger individually; main is just a layout container. */
main.cdlpage {
  /* no entrance animation on the container itself — hero elements stagger individually */
}

/* ---- placeholder page content (stub pages) ---- */
.page-stub {
  padding: var(--cdl-pad-top-page) var(--cdl-pad-x) 100px;
  min-height: 80vh;
}

.page-stub-eyebrow {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cdl-green);
  margin-bottom: 20px;
}

.page-stub-title {
  font-family: var(--cdl-font-display);
  font-size: 64px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--cdl-text);
  margin-bottom: 24px;
}

.page-stub-body {
  font-size: 18px;
  color: var(--cdl-text-muted);
  max-width: 560px;
  line-height: 1.65;
}

/* ---- home hero ---- */
.hero {
  padding: var(--cdl-pad-top-hero) var(--cdl-pad-x) 96px;
  position: relative;
  overflow: hidden;
}

.hero-logo-accent {
  position: absolute;
  right: 20px;
  top: 96px;
  width: 520px;
  height: 420px;
  opacity: 0.85;
  pointer-events: none;
  animation: cdlfloat 7s ease-in-out infinite;
}

.hero-eyebrow {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cdl-green);
  margin-bottom: 26px;
  animation: cdlpage 0.55s var(--cdl-ease) forwards;
  animation-delay: 0.05s;
  opacity: 0;
}

.hero-h1 {
  font-family: var(--cdl-font-display);
  font-size: 80px;
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.02em;
  max-width: 940px;
  color: var(--cdl-text);
  animation: cdlpage 0.55s var(--cdl-ease) forwards;
  animation-delay: 0.12s;
  opacity: 0;
}

.hero-h1 em {
  font-style: italic;
  color: var(--cdl-amber);
}

.hero-sub {
  font-size: 20px;
  line-height: 1.6;
  color: var(--cdl-text-soft);
  max-width: 580px;
  margin: 34px 0 42px;
  animation: cdlpage 0.55s var(--cdl-ease) forwards;
  animation-delay: 0.20s;
  opacity: 0;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 28px;
  animation: cdlpage 0.55s var(--cdl-ease) forwards;
  animation-delay: 0.28s;
  opacity: 0;
}

.cta-primary {
  color: var(--cdl-amber);
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--cdl-amber);
  transition: opacity 0.25s;
}

.cta-primary:hover {
  opacity: 0.8;
}

.cta-secondary {
  color: #d7dbe0;
  font-size: 16px;
  transition: color 0.25s;
}

.cta-secondary:hover {
  color: #ffffff;
}

/* ---- marquee strip ---- */
.marquee-strip {
  border-top: 1px solid var(--cdl-hairline-soft);
  border-bottom: 1px solid var(--cdl-hairline-soft);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-inner {
  display: inline-flex;
  gap: 56px;
  animation: cdlmarquee 26s linear infinite;
  will-change: transform;
}

.marquee-item {
  font-family: var(--cdl-font-mono);
  font-size: 13px;
  color: var(--cdl-text-dimmer);
  flex-shrink: 0;
}

.marquee-dot {
  flex-shrink: 0;
}

.marquee-dot.green { color: var(--cdl-green); }
.marquee-dot.amber { color: var(--cdl-amber); }

/* ---- what we build ---- */
.what-section {
  padding: 110px var(--cdl-pad-x) 90px;
}

.section-label {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cdl-text-dim);
  margin-bottom: 32px;
}

.what-list {
  border-top: 1px solid rgba(255,255,255,0.1);
}

.what-row {
  display: grid;
  grid-template-columns: 80px 1fr 1.3fr;
  gap: 30px;
  padding: 30px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  align-items: baseline;
  cursor: default;
  transition: padding-left 0.35s;
}

.what-row:hover {
  padding-left: 14px;
}

.what-num {
  font-family: var(--cdl-font-mono);
  font-size: 13px;
}

.what-num.green { color: var(--cdl-green); }
.what-num.amber { color: var(--cdl-amber); }

.what-title {
  font-family: var(--cdl-font-display);
  font-size: 30px;
  font-weight: 400;
  color: var(--cdl-text);
}

.what-desc {
  font-size: 15px;
  color: var(--cdl-text-muted);
  line-height: 1.6;
}

/* ---- featured work ---- */
.featured-section {
  padding: 20px var(--cdl-pad-x) 100px;
}

.featured-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
}

.featured-label {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cdl-text-dim);
}

.featured-all-link {
  font-size: 14px;
  color: var(--cdl-amber);
  transition: opacity 0.25s;
}

.featured-all-link:hover {
  opacity: 0.8;
}

.featured-row {
  display: flex;
  align-items: center;
  gap: 44px;
  margin-bottom: 40px;
  cursor: pointer;
  transition: opacity 0.25s;
}

.featured-row:hover {
  opacity: 0.96;
}

.featured-row.reverse {
  flex-direction: row-reverse;
}

/* Featured card link — transparent flex passthrough so wrapping the media+text
   in an <a> keeps the exact same two-column row layout. */
.featured-card-link {
  display: flex;
  align-items: center;
  gap: 44px;
  flex: 1 1 auto;
  width: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.featured-row.reverse .featured-card-link {
  flex-direction: row-reverse;
}

.featured-visit {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cdl-green);
}

.featured-card-link:hover .featured-visit {
  color: var(--cdl-amber);
}

.featured-media {
  flex: 1;
  aspect-ratio: 16 / 9;
  align-self: center;
  border-radius: var(--cdl-radius-media);
}

.featured-text {
  flex: 1;
}

.featured-status {
  font-family: var(--cdl-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.featured-status.green { color: var(--cdl-green); }
.featured-status.amber { color: var(--cdl-amber); }

.featured-title {
  font-family: var(--cdl-font-display);
  font-size: 40px;
  font-weight: 400;
  color: var(--cdl-text);
  margin-bottom: 14px;
  line-height: 1.1;
}

.featured-desc {
  font-size: 16px;
  color: var(--cdl-text-muted);
  line-height: 1.65;
}

/* ---- philosophy band ---- */
.philosophy-band {
  padding: 96px var(--cdl-pad-x);
  background: var(--cdl-bg-deep);
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.philosophy-quote {
  font-family: var(--cdl-font-display);
  font-size: 42px;
  font-weight: 300;
  line-height: 1.32;
  max-width: 1000px;
  color: var(--cdl-text);
}

.philosophy-quote em {
  font-style: italic;
  color: var(--cdl-amber);
}

/* ---- work page ---- */
.work-header {
  padding: var(--cdl-pad-top-page) var(--cdl-pad-x) 40px;
}

.page-eyebrow {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cdl-green);
  margin-bottom: 16px;
}

.page-h1 {
  font-family: var(--cdl-font-display);
  font-size: 64px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--cdl-text);
  margin-bottom: 36px;
}

/* filter chips */
.filter-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-chip {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: var(--cdl-radius-pill);
  border: 1px solid rgba(255,255,255,0.14);
  background: transparent;
  color: var(--cdl-nav-idle);
  cursor: pointer;
  transition: all 0.25s;
}

.filter-chip:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,0.3);
}

.filter-chip.active {
  background: var(--cdl-amber);
  color: var(--cdl-ink);
  border-color: var(--cdl-amber);
}

/* project grid */
.projects-grid {
  padding: 0 var(--cdl-pad-x) 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.project-card {
  background: var(--cdl-surface);
  border: 1px solid var(--cdl-hairline-soft);
  border-radius: var(--cdl-radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s, border-color 0.35s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240,196,90,0.4);
}

/* Linked project card — the <a> wraps media+body; strip default link styling so
   the card visuals stay identical, and signal it's clickable. */
.project-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.project-card-ext {
  font-family: var(--cdl-font-mono);
  font-size: 13px;
  color: var(--cdl-green);
  flex-shrink: 0;
}

.project-card-has-link:hover .project-card-ext {
  color: var(--cdl-amber);
}

.project-card-media {
  aspect-ratio: 16 / 9;
  height: auto;
}

.project-card-body {
  padding: 24px 26px 28px;
}

.project-card-title {
  font-family: var(--cdl-font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--cdl-text);
  /* Now a visible title inside .project-card-title-row (a flex row that owns
     the bottom spacing) — no own margin so it baselines cleanly with the badge. */
  margin: 0;
  line-height: 1.2;
}

.project-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.project-badge {
  font-family: var(--cdl-font-mono);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--cdl-amber);
  border: 1px solid rgba(240,196,90,0.35);
  border-radius: var(--cdl-radius-pill);
  padding: 3px 9px;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-card-desc {
  font-size: 14.5px;
  color: var(--cdl-text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-tag {
  font-family: var(--cdl-font-mono);
  font-size: 10px;
  color: #7a818a;
  background: var(--cdl-surface-alt);
  border-radius: var(--cdl-radius-chip);
  padding: 4px 9px;
}

/* ---- studio page ---- */
.studio-header {
  padding: var(--cdl-pad-top-page) var(--cdl-pad-x) 60px;
}

.studio-body {
  padding: 0 var(--cdl-pad-x) 80px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: start;
}

.studio-lead {
  font-size: 19px;
  color: #c3c8ce;
  line-height: 1.7;
  margin-bottom: 24px;
}

.studio-para {
  font-size: 16px;
  color: var(--cdl-text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.studio-lead .highlight,
.studio-para .highlight {
  color: var(--cdl-amber);
}

.studio-portrait {
  display: block;
  width: 100%;
  height: 360px;
  border-radius: var(--cdl-radius-card);
  object-fit: cover;
  object-position: 50% 20%;
}

/* stack block */
.stack-block {
  padding: 60px var(--cdl-pad-x) 80px;
  border-top: 1px solid var(--cdl-hairline);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 32px;
}

.stack-col-title {
  font-family: var(--cdl-font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--cdl-text);
  margin-bottom: 16px;
}

.stack-col-items {
  list-style: none;
}

.stack-col-items li {
  font-size: 14px;
  color: var(--cdl-text-muted);
  line-height: 1.8;
}

/* ---- services page ---- */
.services-header {
  padding: var(--cdl-pad-top-page) var(--cdl-pad-x) 60px;
}

.services-grid {
  padding: 0 var(--cdl-pad-x) 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.service-card {
  background: var(--cdl-surface);
  border: 1px solid var(--cdl-hairline-soft);
  border-radius: var(--cdl-radius-lg);
  padding: 36px;
  transition: border-color 0.25s;
}

/* Accent-driven hover border — keyed off data-accent so admin reordering
   stays correct (not :nth-child). Color comes from the DB accent value. */
.service-card[data-accent="green"]:hover { border-color: var(--cdl-green); }
.service-card[data-accent="amber"]:hover { border-color: var(--cdl-amber); }

.service-num {
  font-family: var(--cdl-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.service-num.green { color: var(--cdl-green); }
.service-num.amber { color: var(--cdl-amber); }

.service-title {
  font-family: var(--cdl-font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--cdl-text);
  margin-bottom: 14px;
}

.service-body {
  font-size: 15px;
  color: var(--cdl-text-muted);
  line-height: 1.65;
}

/* ---- journal page ---- */
.journal-header {
  padding: var(--cdl-pad-top-page) var(--cdl-pad-x) 60px;
}

.channels-grid {
  padding: 0 var(--cdl-pad-x) 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.channel-card {
  background: var(--cdl-surface);
  border: 1px solid var(--cdl-hairline-soft);
  border-radius: var(--cdl-radius-card);
  padding: 30px;
  cursor: default;
  transition: transform 0.35s;
}

.channel-card:hover {
  transform: translateY(-4px);
}

.channel-eyebrow {
  font-family: var(--cdl-font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.channel-eyebrow.green { color: var(--cdl-green); }
.channel-eyebrow.amber { color: var(--cdl-amber); }

.channel-title {
  font-family: var(--cdl-font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--cdl-text);
  margin-bottom: 12px;
}

.channel-desc {
  font-size: 14.5px;
  color: var(--cdl-text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.channel-link {
  font-size: 13px;
  color: var(--cdl-amber);
  text-decoration: none;
  transition: opacity 0.25s;
}

.channel-link:hover {
  opacity: 0.8;
}

/* ---- contact page ---- */
.contact-header {
  padding: var(--cdl-pad-top-page) var(--cdl-pad-x) 60px;
}

.contact-h1 {
  font-family: var(--cdl-font-display);
  font-size: 72px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--cdl-text);
  margin-bottom: 20px;
}

.contact-h1 em {
  font-style: italic;
  color: var(--cdl-amber);
}

.contact-sub {
  font-size: 19px;
  color: var(--cdl-text-soft);
  max-width: 540px;
  line-height: 1.6;
}

.contact-body {
  padding: 0 var(--cdl-pad-x) 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

/* contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form input,
.contact-form textarea {
  background: var(--cdl-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--cdl-radius-input);
  padding: 16px 18px;
  color: var(--cdl-text);
  font-family: var(--cdl-font-body);
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.25s;
  width: 100%;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--cdl-text-dim);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(255,255,255,0.25);
}

.contact-form textarea {
  min-height: 140px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cdl-amber);
  color: var(--cdl-ink);
  font-family: var(--cdl-font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--cdl-radius-input);
  border: none;
  cursor: pointer;
  transition: transform 0.25s;
  align-self: flex-start;
}

.contact-submit:hover {
  transform: translateY(-2px);
}

#form-status {
  font-size: 14px;
  min-height: 20px;
}

#form-status.success { color: var(--cdl-green); }
#form-status.error   { color: #ff6b6b; }

/* contact details column */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-detail-label {
  font-family: var(--cdl-font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a818a;
  margin-bottom: 8px;
}

.contact-email-display {
  font-family: var(--cdl-font-display);
  font-size: 24px;
  color: var(--cdl-amber);
  user-select: text;
}

.contact-location {
  font-size: 17px;
  color: #d7dbe0;
}

.contact-elsewhere-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-elsewhere-link {
  font-size: 15px;
  color: #d7dbe0;
  text-decoration: none;
  transition: color 0.25s;
}

.contact-elsewhere-link:hover {
  color: var(--cdl-amber);
}

/* ---- animated logo SVG wrappers ---- */
.logo-svg {
  display: block;
  overflow: visible;
}

/* ---- hamburger toggle button — hidden on desktop ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  /* Ensure it is keyboard-focusable */
  outline-offset: 4px;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--cdl-green);
  border-radius: 4px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cdl-text);
  border-radius: 2px;
  transition: transform 0.25s var(--cdl-ease), opacity 0.25s var(--cdl-ease);
  transform-origin: center;
}

/* Animate bars to an X when open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- mobile nav drawer — hidden by default ---- */
.nav-mobile-menu {
  display: none; /* shown only <=900px via media query below */
  position: fixed;
  top: 0; /* pushed down via padding-top after nav height */
  left: 0;
  right: 0;
  z-index: 49; /* below nav (z-index:50) */
  background: rgba(15,17,20,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cdl-hairline-soft);
  /* Height starts at 0 (collapsed); js sets aria-hidden; we use max-height for animation */
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.32s var(--cdl-ease);
  /* Pad-top accounts for the nav bar (approx 64px at mobile) */
  padding-top: 60px;
}

.nav-mobile-menu.open {
  max-height: 400px;
}

.nav-mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 16px 0 24px;
}

.nav-mobile-links li {
  border-top: 1px solid var(--cdl-hairline-soft);
}

.nav-mobile-links li:first-child {
  border-top: none;
}

.nav-mobile-links a {
  display: block;
  padding: 16px 24px;
  font-family: var(--cdl-font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cdl-nav-idle);
  text-decoration: none;
  /* Minimum 44px tap target covered by the 16px top+bottom padding */
  transition: color 0.2s, background 0.2s;
}

.nav-mobile-links a:hover,
.nav-mobile-links a[aria-current="page"] {
  color: #ffffff;
  background: rgba(255,255,255,0.04);
}

/* Contact pill inside mobile menu */
.nav-mobile-contact-item {
  border-top: 1px solid var(--cdl-hairline-soft);
  padding: 16px 24px 0;
}

.nav-mobile-contact {
  display: inline-flex !important;
  padding: 10px 20px !important;
  background: var(--cdl-amber);
  color: var(--cdl-ink) !important;
  border-radius: var(--cdl-radius-pill);
  font-family: var(--cdl-font-body) !important;
  font-size: 14px !important;
  font-weight: 500;
  letter-spacing: normal !important;
  text-transform: none !important;
  text-decoration: none;
  transition: transform 0.2s;
}

.nav-mobile-contact:hover {
  transform: translateY(-2px);
  background: var(--cdl-amber) !important;
  color: var(--cdl-ink) !important;
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  #cdlnav {
    padding: 16px 24px;
  }

  /* Show hamburger; hide desktop nav links */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  /* Show the mobile drawer container (visibility controlled by .open class) */
  .nav-mobile-menu {
    display: block;
  }

  .hero {
    padding: 120px 24px 64px;
  }

  .hero-logo-accent {
    display: none;
  }

  .hero-h1 {
    font-size: 48px;
  }

  .hero-sub {
    font-size: 17px;
  }

  .what-row {
    grid-template-columns: 40px 1fr;
  }

  .what-desc {
    display: none;
  }

  .featured-row,
  .featured-row.reverse {
    flex-direction: column;
    gap: 24px;
  }

  .featured-title {
    font-size: 28px;
  }

  .philosophy-quote {
    font-size: 28px;
  }

  .projects-grid,
  .services-grid {
    grid-template-columns: 1fr;
    padding-left: 24px;
    padding-right: 24px;
  }

  .channels-grid {
    grid-template-columns: 1fr;
    padding-left: 24px;
    padding-right: 24px;
  }

  .studio-body {
    grid-template-columns: 1fr;
    padding-left: 24px;
    padding-right: 24px;
  }

  .studio-portrait {
    height: 260px;
    order: -1;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-body {
    grid-template-columns: 1fr;
    padding-left: 24px;
    padding-right: 24px;
  }

  .page-h1,
  .page-stub-title {
    font-size: 44px;
  }

  .work-header,
  .studio-header,
  .services-header,
  .journal-header,
  .contact-header,
  .page-stub {
    padding-left: 24px;
    padding-right: 24px;
  }

  #cdlfooter {
    padding: 32px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .what-section,
  .featured-section,
  .philosophy-band,
  .stack-block {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ------------------------------------------------------------------
 * Amber cursor glow — a soft light that follows the pointer and
 * swells when hovering interactive elements. JS sets --cursor-x/-y
 * (px) and toggles body classes; everything else is declarative.
 * Pointer-fine + motion-allowed devices only.
 * ------------------------------------------------------------------ */
#cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;          /* centre the circle on the cursor point */
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  background: radial-gradient(
    circle closest-side,
    rgba(240, 196, 90, 0.20),
    rgba(240, 196, 90, 0.08) 42%,
    transparent 72%
  );
  translate: var(--cursor-x, -50vw) var(--cursor-y, -50vh);
  scale: var(--glow-scale, 1);
  mix-blend-mode: screen;
  transition: opacity .45s ease, scale .35s ease;
  will-change: translate, scale, opacity;
}

body.cursor-glow-on #cursor-glow { opacity: 1; }
body.glow-hot       { --glow-scale: 1.5; }   /* swell over interactive targets */
body.glow-press     { --glow-scale: 1.2; }   /* quick contract on click        */

/* Hide entirely on touch / coarse pointers and when motion is reduced. */
@media (hover: none), (pointer: coarse) {
  #cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #cursor-glow { display: none; }
}
