/* ============================================================
   TIMELESS MATTER studio — “a survey of character”
   Editorial topographic design system
   ============================================================ */

:root {
  --paper: #f1ede4;
  --paper-2: #e9e3d6;
  --ink: #16140f;
  --ink-soft: #57523f;
  --line: #d8d1c1;
  --orange: #e8531c;
  --contour: #c9c2b0;
  --overlay: rgba(241, 237, 228, 0.93);

  --font-display: "Bodoni Moda", "Didot", serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;

  --pad: clamp(20px, 4vw, 64px);
}

/* darkroom palette — follows the device setting */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161310;
    --paper-2: #1d1914;
    --ink: #ece6d9;
    --ink-soft: #a89f8c;
    --line: #2f2a21;
    --orange: #f25c22;
    --contour: #383226;
    --overlay: rgba(18, 15, 12, 0.94);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--orange); color: var(--paper); }

a { color: inherit; text-decoration: none; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 400;
}

.dot { color: var(--orange); font-size: 8px; vertical-align: 2px; }

/* film grain */
.grain {
  position: fixed; inset: -100px; z-index: 200; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
}

@media (prefers-color-scheme: dark) {
  /* multiply vanishes on a dark ground — screen keeps grain + nav legible */
  .grain { mix-blend-mode: screen; opacity: 0.04; }
  .site-nav { mix-blend-mode: screen; }
}

/* ============ NAV ============ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px var(--pad);
  mix-blend-mode: multiply;
}

.brand { letter-spacing: 0.12em; text-transform: uppercase; }
.brand em, .brand-foot em {
  font-family: var(--font-display);
  font-style: italic;
  text-transform: lowercase;
  color: var(--orange);
  font-size: 1.25em;
  letter-spacing: 0;
}

.nav-links { display: flex; gap: clamp(14px, 3vw, 40px); }
.nav-links a { position: relative; padding: 2px 0; }
.nav-links a sup { color: var(--orange); font-size: 8px; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-meta { color: var(--ink-soft); }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
}

#topo { position: absolute; inset: 0; width: 100%; height: 100%; }

.hero-inner {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(90px, 14vh, 140px) var(--pad) 0;
  pointer-events: none;
}

.kicker { margin-bottom: clamp(8px, 2vh, 28px); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 480;
  line-height: 0.82;
  letter-spacing: -0.02em;
  display: flex; flex-direction: column;
}

.hero-title .line { display: block; overflow: hidden; padding: 0.09em 0 0.08em; margin-top: -0.09em; }
.hero-title .line-inner { display: inline-block; will-change: transform; }

.hero-title .line:first-child .line-inner { font-size: clamp(64px, 14.5vw, 240px); }

.hero-title .line-accent { text-align: right; margin-top: -0.06em; }
.hero-title .line-accent .line-inner {
  font-size: clamp(60px, 13vw, 215px);
  font-style: italic;
  font-weight: 420;
  color: var(--orange);
  padding-right: 0.04em;
}

.hero-est { margin-top: clamp(10px, 2.5vh, 30px); color: var(--ink-soft); }

.hero-tag {
  position: absolute;
  right: var(--pad);
  top: 38%;
  text-align: right;
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.45;
  font-weight: 500;
}

.hero-foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  padding: 16px var(--pad);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
  padding: clamp(14px, 2.2vw, 26px) 0;
}

.marquee-track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-group { display: flex; align-items: center; flex-shrink: 0; }

.marquee-group span {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 64px);
  font-weight: 460;
  letter-spacing: -0.01em;
  white-space: nowrap;
  padding: 0 0.55em;
}

.marquee-group span:nth-child(odd) { font-style: italic; }

.marquee-group i {
  font-style: normal;
  color: var(--orange);
  font-size: clamp(16px, 2vw, 28px);
  animation: spin 9s linear infinite;
}

@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ SECTIONS (shared) ============ */
section { padding: clamp(64px, 9vw, 140px) var(--pad); }

.section-head {
  display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: clamp(36px, 5vw, 72px);
  color: var(--ink-soft);
}

/* ============ WORK ============ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2.5vw, 40px);
}

.work-item { position: relative; }
.work-item .frame { overflow: hidden; background: var(--paper-2); }
.work-item img {
  aspect-ratio: var(--ar, 3 / 4);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.work-item:hover img { transform: scale(1.045); }

.work-item figcaption {
  display: flex; justify-content: space-between; gap: 12px;
  padding-top: 10px;
  color: var(--ink-soft);
}
.work-item figcaption b { font-weight: 500; color: var(--orange); }
.work-item figcaption span { color: var(--ink-soft); opacity: 0.7; }

/* editorial offsets */
.wi-1 { grid-column: 1 / 7; }
.wi-2 { grid-column: 8 / 13; margin-top: clamp(60px, 10vw, 160px); }
.wi-3 { grid-column: 2 / 6; margin-top: clamp(-40px, -3vw, -20px); }
.wi-4 { grid-column: 7 / 13; margin-top: clamp(30px, 6vw, 100px); --ar: 3 / 2; }
.wi-5 { grid-column: 1 / 9; margin-top: clamp(40px, 7vw, 120px); --ar: 16 / 10; }
.wi-6 { grid-column: 10 / 13; margin-top: clamp(80px, 12vw, 200px); }
.wi-7 { grid-column: 4 / 11; margin-top: clamp(40px, 7vw, 120px); --ar: 16 / 10; }

/* ============ ABOUT ============ */
.about { background: var(--paper-2); }

.statement {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 72px);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 18em;
  margin-bottom: clamp(48px, 6vw, 96px);
}

.statement em, .statement .w.accent { font-style: italic; color: var(--orange); }
.statement .w { display: inline-block; }

.about-cols {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}

.about-eye { max-width: 420px; }
.about-eye img { aspect-ratio: 4 / 5; }
.about-eye figcaption { padding-top: 10px; color: var(--ink-soft); }

.about-copy { max-width: 46ch; }
.about-copy p + p { margin-top: 1.2em; }
.about-note { color: var(--ink-soft); line-height: 1.9; margin-top: 2em; }

/* ============ SERVICES ============ */
.service-list { list-style: none; }

.service-row {
  display: grid;
  grid-template-columns: 3em 1fr auto auto;
  gap: clamp(12px, 2.5vw, 40px);
  align-items: baseline;
  padding: clamp(18px, 2.5vw, 30px) 8px;
  border-bottom: 1px solid var(--line);
  cursor: default;
  transition: background 0.35s ease, color 0.35s ease, padding-left 0.35s ease;
}

.service-row:first-child { border-top: 1px solid var(--line); }

.s-idx { color: var(--orange); }

.s-name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 52px);
  font-weight: 460;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.s-aud { color: var(--ink-soft); text-align: right; }
.s-price { color: var(--ink); font-weight: 500; }

.service-row:hover {
  background: var(--ink);
  color: var(--paper);
  padding-left: 20px;
}
.service-row:hover .s-aud { color: var(--paper); opacity: 0.6; }
.service-row:hover .s-price { color: var(--orange); }
.service-row:hover .s-name { font-style: italic; }

.services-note { margin-top: 28px; color: var(--ink-soft); }
.services-note a { color: var(--orange); }
.services-note a:hover { text-decoration: underline; }

/* ============ CONTACT ============ */
.contact { padding-bottom: 32px; }

.cta-title {
  font-family: var(--font-display);
  font-weight: 480;
  line-height: 0.84;
  letter-spacing: -0.02em;
  margin: clamp(20px, 4vw, 60px) 0 clamp(36px, 5vw, 72px);
  display: flex; flex-direction: column;
}

.cta-title .line { display: block; overflow: hidden; padding: 0.09em 0 0.08em; margin-top: -0.09em; }
.cta-title .line-inner { display: inline-block; font-size: clamp(64px, 13.5vw, 230px); }
.cta-title .line-accent { text-align: right; margin-top: -0.04em; }
.cta-title .line-accent .line-inner {
  font-style: italic; font-weight: 420; color: var(--orange);
  padding-right: 0.04em;
}

.cta-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 16px 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.site-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: clamp(64px, 9vw, 140px);
  padding-top: 20px;
  color: var(--ink-soft);
}
.brand-foot { letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.site-foot a:hover { color: var(--orange); }

/* ============ PAGE HERO (inner pages) ============ */
.page-hero {
  position: relative;
  min-height: 56vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.page-hero #topo { position: absolute; inset: 0; width: 100%; height: 100%; }

.page-hero-inner {
  position: relative; z-index: 2;
  padding: 130px var(--pad) clamp(30px, 5vh, 60px);
  pointer-events: none;
}
.page-hero .kicker { margin-bottom: clamp(10px, 2vh, 18px); }

.page-title {
  font-family: var(--font-display);
  font-weight: 480;
  font-size: clamp(52px, 10.5vw, 168px);
  line-height: 0.86;
  letter-spacing: -0.02em;
}
.page-title em { font-style: italic; font-weight: 420; color: var(--orange); }

.page-lead {
  margin-top: clamp(16px, 2.4vh, 26px);
  max-width: 42ch;
  font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.5;
  font-weight: 500;
}

.page-hero-foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

/* ============ GALLERY (portfolio) ============ */
.gallery-filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: clamp(28px, 4vw, 52px);
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 9px 17px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-btn .count { color: var(--orange); margin-left: 5px; }
.filter-btn.is-active .count { color: var(--paper); opacity: 0.55; }

.gallery { columns: 3; column-gap: clamp(16px, 2vw, 28px); }

.gallery-item {
  break-inside: avoid;
  margin: 0 0 clamp(16px, 2vw, 28px);
  position: relative; cursor: pointer; overflow: hidden;
  background: var(--paper-2);
}
.gallery-item img {
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
  will-change: transform;
}
.gallery-item:hover img { transform: scale(1.045); }

.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; gap: 10px;
  padding: 28px 14px 12px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--paper);
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
  opacity: 0; transition: opacity 0.4s ease; text-transform: uppercase;
}
.gallery-item:hover figcaption { opacity: 1; }
.gallery-item figcaption b { color: var(--orange); font-weight: 500; }
.gallery-item.is-hidden { display: none; }

.gallery-empty {
  display: none; padding: 60px 0; text-align: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft);
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 6vmin;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 88vw; max-height: 84vh; width: auto; height: auto;
  object-fit: contain; box-shadow: 0 40px 100px rgba(0,0,0,0.35);
  transform: scale(0.96); transition: transform 0.4s cubic-bezier(0.22,1,0.36,1);
}
.lightbox.is-open img { transform: scale(1); }
.lightbox-close, .lightbox-cap {
  position: absolute; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; color: var(--ink-soft);
}
.lightbox-close { top: 22px; right: var(--pad); cursor: pointer; text-transform: uppercase; }
.lightbox-close:hover { color: var(--orange); }
.lightbox-cap { bottom: 20px; left: 0; right: 0; text-align: center; text-transform: uppercase; }

/* ============ SERVICES (accordion, full page) ============ */
.svc-list { border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }

.svc-row {
  display: grid;
  grid-template-columns: 3em 1fr auto 1.6em;
  gap: clamp(12px, 2.5vw, 40px);
  align-items: baseline;
  padding: clamp(22px, 2.8vw, 36px) 8px;
  cursor: pointer;
  transition: padding-left 0.35s ease, background 0.35s ease, color 0.35s ease;
}
.svc-row:hover { padding-left: 18px; }
.svc.is-open .svc-row { color: var(--ink); }
.svc-idx { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--orange); }
.svc-head-main { display: flex; flex-direction: column; gap: 8px; }
.svc-name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.3vw, 50px); font-weight: 460;
  letter-spacing: -0.01em; line-height: 1.02;
}
.svc.is-open .svc-name { font-style: italic; }
.svc-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; max-width: 52ch; }
.svc-from { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink); white-space: nowrap; align-self: center; }
.svc-toggle {
  font-family: var(--font-mono); font-size: 22px; line-height: 1;
  color: var(--orange); justify-self: end; align-self: center;
  transition: transform 0.4s cubic-bezier(0.65,0,0.35,1);
}
.svc.is-open .svc-toggle { transform: rotate(45deg); }

.svc-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s cubic-bezier(0.65,0,0.35,1); }
.svc.is-open .svc-detail { grid-template-rows: 1fr; }
.svc-detail-inner { overflow: hidden; }

.svc-meta {
  padding: 0 8px clamp(18px, 2vw, 26px);
  max-width: 70ch; color: var(--ink-soft); line-height: 1.6;
}
.svc-meta .audience { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 12px; color: var(--ink); }

.svc-tiers {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(16px, 2vw, 28px);
  padding: 0 8px clamp(28px, 4vw, 52px);
}
.tier { border: 1px solid var(--line); padding: clamp(18px, 2vw, 26px); display: flex; flex-direction: column; }
.tier-name { font-family: var(--font-display); font-size: 22px; font-weight: 480; }
.tier-dur { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.07em; color: var(--ink-soft); text-transform: uppercase; margin: 6px 0 16px; }
.tier-price { font-family: var(--font-mono); font-size: 13px; color: var(--orange); margin-bottom: 16px; }
.tier-includes { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.tier-includes li { font-size: 13.5px; line-height: 1.4; padding-left: 16px; position: relative; color: var(--ink-soft); }
.tier-includes li::before { content: "—"; position: absolute; left: 0; color: var(--orange); }
.svc-addons { padding: 0 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-soft); text-transform: uppercase; }
.svc-addons b { color: var(--ink); font-weight: 500; }

/* ============ TESTIMONIALS ============ */
.testimonials {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 3vw, 44px);
}
.tcard { border-top: 1px solid var(--line); padding-top: 22px; }
.tcard .stars { color: var(--orange); font-size: 11px; letter-spacing: 3px; margin-bottom: 16px; }
.tcard blockquote {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(18px, 1.5vw, 23px); line-height: 1.32; font-weight: 450;
}
.tcard .tby { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; margin-top: 16px; }
.tcard .tby b { color: var(--ink); font-weight: 500; }

/* ============ CONTACT page ============ */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(20px, 3vw, 40px) clamp(24px, 4vw, 64px);
  border-top: 1px solid var(--line);
  padding-top: clamp(30px, 4vw, 52px);
}
.cblock h3 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.cblock h3 .dot { margin-right: 4px; }
.cblock a, .cblock p { font-family: var(--font-display); font-size: clamp(20px, 2vw, 28px); font-weight: 460; line-height: 1.25; letter-spacing: -0.01em; }
.cblock a { display: inline-block; transition: color 0.25s ease; overflow-wrap: anywhere; }
.cblock a:hover { color: var(--orange); }
.cblock .sub { font-family: var(--font-body); font-size: 13px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }

/* prev/next pager + cross-links */
.section-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft);
  transition: color 0.25s ease, gap 0.25s ease;
}
.section-link:hover { color: var(--orange); gap: 14px; }
.section-head .section-link { align-self: baseline; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-meta { display: none; }
  .hero-tag { position: static; text-align: left; margin-top: 24px; }

  .work-grid > .work-item {
    grid-column: 1 / 13 !important;
    margin-top: 0 !important;
  }
  .work-grid { row-gap: clamp(40px, 8vw, 64px); }
  .wi-4, .wi-5, .wi-7 { --ar: 3 / 2; }

  .about-cols { grid-template-columns: 1fr; align-items: start; }

  .service-row { grid-template-columns: 2.4em 1fr auto; }
  .s-aud { display: none; }

  .hero-coords { display: none; }

  /* inner pages */
  .gallery { columns: 2; }
  .svc-tag { display: none; }
  .svc-row { grid-template-columns: 2.4em 1fr 1.4em; }
  .svc-from { display: none; }
  .page-hero-foot { font-size: 10px; }
}

@media (max-width: 560px) {
  .nav-links { gap: 12px; }
  .nav-links a sup { display: none; }
  .mono { font-size: 10px; }
  .cta-actions .btn { width: 100%; text-align: center; }
  .site-foot { flex-direction: column; gap: 8px; }

  .gallery { columns: 1; }
  .page-hero-foot { display: none; }
  .section-head { flex-wrap: wrap; gap: 6px; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .marquee-group i { animation: none; }
  html { scroll-behavior: auto; }
  .work-item img, .gallery-item img { transition: none; }
  .lightbox, .lightbox img { transition: none; }
}
