/* =========================================================
   Tactile House: inner pages
   (portfolio, project, contact, blog, post, 404)
   Builds on css/style.css: same colours, type and buttons.
   ========================================================= */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.empty {
  padding: 48px 0;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--white);
  padding: calc(128px + env(safe-area-inset-top, 0px)) 0 clamp(64px, 8vw, 96px);
}
.page-hero .hero-grid {
  mask-image: radial-gradient(ellipse at 80% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 30%, #000 10%, transparent 70%);
}
.page-hero .hero-glow { width: 50vmax; height: 50vmax; right: -14vmax; top: -18vmax; }
.page-hero-inner { position: relative; z-index: 1; }

.page-beams { position: absolute; inset: 0 0 0 40%; pointer-events: none; }
.page-beams span {
  position: absolute;
  top: -20%;
  width: 26%; height: 140%;
  background: linear-gradient(to bottom, rgba(255,227,200,.18), rgba(232,161,116,.04) 60%, transparent);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  transform-origin: 50% 0;
  mix-blend-mode: screen;
  opacity: 0;
  animation: fadeIn 1.2s ease .6s forwards, swayC 7s ease-in-out infinite;
}
.page-beams span:nth-child(1) { left: 8%; animation-name: fadeIn, swayL; }
.page-beams span:nth-child(2) { left: 40%; animation-delay: .8s, -2s; }
.page-beams span:nth-child(3) { left: 72%; animation-name: fadeIn, swayR; animation-delay: 1s, -1s; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(231,236,245,.55);
}
.crumbs a { color: var(--copper-soft); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: rgba(231,236,245,.8); }

.page-title {
  max-width: 18ch;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.035em;
}
.page-title em { color: var(--copper-soft); font-size: 1.1em; }
.page-intro {
  margin-top: 16px;
  max-width: 50ch;
  color: var(--mist-text);
  font-size: 1rem;
}

.crumbs, .page-title, .page-intro, .page-meta, .page-cat {
  opacity: 0;
  transform: translateY(18px);
  animation: rise .9s var(--ease-out) forwards;
}
.crumbs { animation-delay: .05s; }
.page-cat { animation-delay: .1s; }
.page-title { animation-delay: .15s; }
.page-intro { animation-delay: .28s; }
.page-meta { animation-delay: .38s; }

.page-truss {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%; height: 26px;
  fill: none;
  stroke: rgba(154,166,194,.22);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.page-truss path {
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.2s var(--ease) .3s forwards;
}

/* =========================================================
   PORTFOLIO: a dark gallery with two views
   Showcase = large editorial rows, Index = hover list
   ========================================================= */
.portfolio {
  position: relative;
  background: var(--navy-darker);
  color: var(--white);
  padding-top: clamp(36px, 5vw, 56px);
  overflow: hidden;
}
.portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px circle at 100% 10%, rgba(196,110,58,.12), transparent 60%),
    radial-gradient(600px circle at 0% 70%, rgba(42,51,77,.55), transparent 60%);
  pointer-events: none;
}
.portfolio .container { position: relative; }

/* Shared tag (also used on project pages) */
.tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--copper-dark);
  background: rgba(196,110,58,.1);
  border-radius: 999px;
}
.page-hero .tag { color: var(--copper-glow); background: rgba(196,110,58,.28); }

/* ---------- Toolbar: filters + view toggle ---------- */
.pf-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--navy-line);
}
.filters {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
}
.filter {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 0;
  font: 500 .9rem/1 var(--font);
  color: rgba(231,236,245,.55);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .3s;
}
.filter sup { font-size: .62rem; font-weight: 600; color: var(--copper-soft); opacity: .8; }
.filter::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--copper-soft);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.filter:hover { color: var(--white); }
.filter[aria-pressed="true"] { color: var(--white); }
.filter[aria-pressed="true"]::after { transform: scaleX(1); transform-origin: left; }

.view-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--navy-line);
  border-radius: 999px;
}
.view-toggle button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  font: 600 .8rem/1 var(--font);
  color: rgba(231,236,245,.65);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: color .3s;
}
.view-toggle button svg { width: 15px; height: 15px; }
.view-toggle button[aria-pressed="true"] { color: var(--white); }
.vt-thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  background: var(--copper);
  border-radius: 999px;
  box-shadow: 0 6px 18px -6px rgba(196,110,58,.8);
  transition: transform .5s var(--ease-out);
}
.view-toggle[data-view="index"] .vt-thumb { transform: translateX(100%); }

.pf-count {
  margin: 18px 0 clamp(28px, 4vw, 48px);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(231,236,245,.45);
}
.pf-count b { color: var(--copper-soft); font-weight: 700; }

/* ---------- Showcase view ---------- */
.showcase { display: grid; gap: clamp(64px, 9vw, 120px); }
.sc-item {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.sc-item:nth-child(even) { grid-template-columns: 1fr 1.35fr; }
.sc-item:nth-child(even) .sc-media { order: 2; }

.sc-media {
  --cx: 50%; --cy: 50%;
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 22px;
  background: var(--navy);
  cursor: none;
}
.js .sc-item .sc-media { clip-path: inset(12% 12% 12% 12% round 22px); transition: clip-path 1.3s var(--ease-out); }
.js .sc-item.is-visible .sc-media { clip-path: inset(0 0 0 0 round 22px); }
.sc-par {
  position: absolute;
  inset: -8% 0;
  will-change: transform;
}
.sc-par img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  transition: transform 1.2s var(--ease-out), filter .6s;
}
.sc-item.is-visible .sc-par img { transform: scale(1); }
.sc-media:hover .sc-par img { transform: scale(1.05); filter: brightness(.82); }
.sc-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  pointer-events: none;
}

/* "View" bubble that follows the cursor */
.sc-view {
  position: absolute;
  left: var(--cx); top: var(--cy);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 96px; height: 96px;
  margin: -48px 0 0 -48px;
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--copper);
  border-radius: 50%;
  box-shadow: 0 14px 34px -10px rgba(196,110,58,.85);
  transform: scale(0);
  transition: transform .45s var(--ease-out);
  pointer-events: none;
}
.sc-media:hover .sc-view { transform: scale(1); }

.sc-info { position: relative; }
.sc-num {
  display: block;
  margin-bottom: 14px;
  font-size: clamp(3.6rem, 7vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232,161,116,.4);
  user-select: none;
}
.sc-meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 12px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--copper-soft);
}
.sc-meta span + span { color: rgba(231,236,245,.45); }
.sc-meta span + span::before { content: "·"; margin-right: 14px; color: rgba(231,236,245,.3); }
.sc-title {
  position: relative;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
}
.sc-title a { color: inherit; text-decoration: none; }
.sc-title em { color: var(--copper-soft); font-size: 1.08em; }
.sc-summary { margin-top: 14px; max-width: 40ch; color: var(--mist-text); font-size: .95rem; }
.sc-scope { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.sc-scope li {
  padding: 5px 12px;
  font-size: .76rem;
  font-weight: 500;
  color: rgba(231,236,245,.8);
  border: 1px solid var(--navy-line);
  border-radius: 999px;
}
.sc-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
}
.sc-link i {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  font-style: normal;
  border: 1px solid rgba(232,161,116,.5);
  border-radius: 50%;
  color: var(--copper-soft);
  transition: background-color .35s, color .35s, transform .45s var(--ease-out);
}
.sc-link:hover i { background: var(--copper); border-color: var(--copper); color: var(--white); transform: rotate(-45deg); }

.sc-info > * { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .sc-item .sc-info > * { opacity: 0; transform: translateY(24px); }
.js .sc-item.is-visible .sc-info > * { opacity: 1; transform: none; }
.sc-item.is-visible .sc-info > :nth-child(2) { transition-delay: .1s; }
.sc-item.is-visible .sc-info > :nth-child(3) { transition-delay: .18s; }
.sc-item.is-visible .sc-info > :nth-child(4) { transition-delay: .26s; }
.sc-item.is-visible .sc-info > :nth-child(5) { transition-delay: .34s; }
.sc-item.is-visible .sc-info > :nth-child(6) { transition-delay: .42s; }

/* ---------- Index view ---------- */
.idx { border-top: 1px solid var(--navy-line); }
.idx li { border-bottom: 1px solid var(--navy-line); animation: rowIn .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms); }
.idx-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr 220px 90px 44px;
  align-items: center;
  gap: 18px;
  padding: clamp(18px, 2.6vw, 28px) 4px;
  color: var(--white);
  text-decoration: none;
  isolation: isolate;
}
.idx-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(196,110,58,.16), rgba(196,110,58,0) 70%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease-out);
}
.idx-row:hover::before, .idx-row:focus-visible::before { transform: scaleX(1); }
.idx-num { font-size: .8rem; font-weight: 600; color: rgba(231,236,245,.4); letter-spacing: .1em; }
.idx-title {
  font-size: clamp(1.3rem, 2.8vw, 2.3rem);
  font-weight: 650;
  letter-spacing: -.03em;
  line-height: 1.1;
  transition: transform .5s var(--ease-out), color .3s;
}
.idx-row:hover .idx-title { transform: translateX(14px); color: var(--copper-soft); }
.idx-cat { font-size: .82rem; color: var(--mist-text); }
.idx-date { font-size: .82rem; color: rgba(231,236,245,.45); text-align: right; }
.idx-arrow {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--navy-line);
  color: var(--copper-soft);
  transition: background-color .35s, color .35s, border-color .35s, transform .45s var(--ease-out);
}
.idx-row:hover .idx-arrow { background: var(--copper); border-color: var(--copper); color: var(--white); transform: rotate(-45deg); }
.idx-thumb { display: none; }

/* Floating preview that follows the cursor over the list */
.idx-preview {
  position: fixed;
  left: 0; top: 0;
  z-index: 50;
  width: clamp(240px, 24vw, 340px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
  pointer-events: none;
  opacity: 0;
  transform: translate(var(--px, 0), var(--py, 0)) scale(.6) rotate(var(--pr, 0deg));
  transition: opacity .3s ease, transform .35s var(--ease-out);
}
.idx-preview.is-on { opacity: 1; transform: translate(var(--px, 0), var(--py, 0)) scale(1) rotate(var(--pr, 0deg)); }
.idx-preview img { width: 100%; height: 100%; object-fit: cover; }

@keyframes rowIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Load more ---------- */
.load-more {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--navy-line);
}
.load-more[hidden] { display: none; }
.lm-note {
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(231,236,245,.45);
}
.load-more .btn:hover .btn-arrow { transform: translateY(3px); }

/* View switch: quick fade */
#projList { transition: opacity .3s ease; }
#projList.is-switching { opacity: 0; }

@keyframes cardIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* =========================================================
   PROJECT DETAIL
   ========================================================= */
.page-hero--project { padding-bottom: clamp(120px, 14vw, 170px); }
.page-cat { display: inline-block; margin-bottom: 14px; }
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 24px;
  font-size: .82rem;
  color: rgba(231,236,245,.6);
}
.page-meta b { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--copper-soft); margin-bottom: 2px; }

.cover {
  position: relative;
  z-index: 2;
  margin-top: clamp(-130px, -11vw, -80px);
}
.cover-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 8;
  border-radius: 22px;
  background: var(--navy);
  box-shadow: 0 40px 80px -40px rgba(21,26,42,.6);
  animation: coverIn 1.2s var(--ease-out) .3s both;
}
.cover-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: coverZoom 1.6s var(--ease-out) .3s both;
}
@keyframes coverIn { from { clip-path: inset(30% 8% 0 8% round 22px); opacity: 0; } to { clip-path: inset(0 0 0 0 round 22px); opacity: 1; } }
@keyframes coverZoom { from { transform: scale(1.15); } to { transform: none; } }

.proj-detail { background: var(--cream); padding-top: clamp(48px, 6vw, 72px); }
.proj-body {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.prose p { color: var(--ink); font-size: 1rem; line-height: 1.8; }
.prose p + p { margin-top: 16px; }
.prose .lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); line-height: 1.6; color: var(--navy); font-weight: 500; }

.scope-card {
  position: sticky;
  top: 90px;
  padding: clamp(22px, 2.6vw, 30px);
  background: var(--navy);
  color: var(--white);
  border-radius: 20px;
}
.scope-card h2 { font-size: .72rem; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; color: var(--copper-soft); margin-bottom: 12px; }
.scope-card li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid var(--navy-line);
  font-size: .92rem;
}
.scope-card li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  background: var(--copper);
  transform: rotate(45deg);
}
.scope-card .btn { margin-top: 22px; width: 100%; }

.gallery-head { margin: clamp(48px, 6vw, 72px) 0 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.gallery-head h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 700; letter-spacing: -.02em; color: var(--navy); }
.gallery-head p { font-size: .82rem; color: var(--ink-soft); }
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-auto-rows: clamp(150px, 18vw, 230px);
  gap: 12px;
}
.gallery button {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--navy);
  cursor: zoom-in;
}
.gallery button:first-child { grid-row: span 2; }
.gallery img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease-out), opacity .4s;
}
.gallery button:hover img { transform: scale(1.06); opacity: .85; }
.gallery button::after {
  content: "+";
  position: absolute;
  right: 12px; top: 12px;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--navy);
  font: 500 1.2rem/1 var(--font);
  opacity: 0;
  transform: scale(.6);
  transition: opacity .3s, transform .4s var(--ease-out);
}
.gallery button:hover::after, .gallery button:focus-visible::after { opacity: 1; transform: none; }

.proj-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: clamp(48px, 6vw, 72px);
}
.pn-link {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 24px;
  text-decoration: none;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: 18px;
  transition: border-color .3s, transform .4s var(--ease-out);
}
.pn-link:hover { border-color: var(--copper); transform: translateY(-3px); }
.pn-link--next { text-align: right; align-items: flex-end; }
.pn-label { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--copper-dark); }
.pn-title { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: rgba(15,19,31,.96);
  color: var(--white);
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; animation: fadeIn .3s ease; opacity: 0; animation-fill-mode: forwards; }
.lightbox::backdrop { background: rgba(15,19,31,.6); }
.lb-figure {
  grid-column: 2;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 60px 8px;
}
.lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  border-radius: 12px;
  animation: lbIn .5s var(--ease-out);
}
.lb-figure figcaption { font-size: .8rem; letter-spacing: .1em; color: rgba(231,236,245,.6); }
.lb-nav, .lb-close {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin: 0 16px;
  font: 500 1.2rem/1 var(--font);
  color: var(--white);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}
.lb-nav:hover, .lb-close:hover { background: var(--copper); border-color: var(--copper); }
.lb-close { position: absolute; top: calc(16px + env(safe-area-inset-top, 0px)); right: 0; font-size: 1.6rem; }
@keyframes lbIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { background: var(--cream); }
.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contact-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
  color: var(--navy);
}
.contact-title em { color: var(--copper); font-size: 1.08em; }
.contact-lead { margin-top: 12px; color: var(--ink-soft); max-width: 42ch; font-size: .95rem; }

.channels { display: grid; gap: 10px; margin-top: 28px; }
.channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 14px;
  text-decoration: none;
  color: var(--navy);
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: 16px;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s, transform .35s var(--ease-out);
}
.channel:hover { background: var(--navy); border-color: var(--navy); color: var(--white); transform: translateX(4px); }
.ch-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--cream);
  color: var(--copper);
  transition: background-color .35s, color .35s, transform .5s var(--ease-out);
}
.ch-icon svg { width: 20px; height: 20px; }
.channel:hover .ch-icon { background: var(--copper); color: var(--white); transform: rotate(-8deg); }
.ch-text { display: grid; min-width: 0; }
.ch-label { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--copper-dark); transition: color .3s; }
.channel:hover .ch-label { color: var(--copper-soft); }
.ch-value { font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-go { margin-left: auto; transition: transform .3s var(--ease); }
.channel:hover .ch-go { transform: translateX(4px); }

.form-card {
  position: relative;
  padding: clamp(22px, 3.4vw, 40px);
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: 24px;
  box-shadow: 0 40px 80px -50px rgba(21,26,42,.45);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; color: var(--navy); margin-bottom: 20px; }

.chips { border: 0; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { padding: 0; margin-bottom: 10px; font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  font-size: .82rem;
  font-weight: 550;
  color: var(--navy);
  background: var(--cream);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.chips label:hover span { border-color: var(--copper); }
.chips input:checked + span { background: var(--copper); color: var(--white); transform: scale(1.03); }
.chips input:focus-visible + span { outline: 3px solid var(--copper-soft); outline-offset: 2px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { position: relative; margin-bottom: 12px; }
.field input,
.field textarea {
  width: 100%;
  padding: 22px 14px 8px;
  font: 500 .95rem/1.4 var(--font);
  color: var(--ink);
  background: #FBF8F4;
  border: 1px solid var(--cream-deep);
  border-radius: 12px;
  transition: border-color .25s, background-color .25s, box-shadow .25s;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 130px; }
.field label {
  position: absolute;
  left: 15px; top: 15px;
  font-size: .9rem;
  color: var(--ink-soft);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .25s var(--ease), color .25s;
}
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--copper); background: var(--white); box-shadow: 0 0 0 4px rgba(196,110,58,.12); }
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label { transform: translateY(-9px) scale(.78); color: var(--copper-dark); }
.field-error { display: block; min-height: 0; font-size: .76rem; color: #B5412C; margin-top: 4px; }
.field-error:empty { display: none; }
.field.is-invalid input,
.field.is-invalid textarea { border-color: #B5412C; background: #FFF6F3; }
.field.is-invalid { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 8px; flex-wrap: wrap; }
.form-note { font-size: .76rem; color: var(--ink-soft); }
.form-status { margin-top: 12px; font-size: .85rem; color: var(--ink-soft); }
.form-status:empty { display: none; }

.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn-arrow {
  width: 16px; height: 16px;
  font-size: 0;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.form-done { text-align: center; padding: clamp(24px, 5vw, 56px) 8px; }
.form-done:focus { outline: none; }
.done-mark { width: 52px; height: auto; margin: 0 auto 18px; animation: doneIn .8s var(--ease-out); }
.form-done h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -.025em; color: var(--navy); }
.form-done p { margin: 10px auto 24px; max-width: 40ch; color: var(--ink-soft); font-size: .95rem; }
@keyframes doneIn { from { opacity: 0; transform: translateY(20px) scale(.8) rotate(-10deg); } to { opacity: 1; transform: none; } }

/* =========================================================
   BLOG
   ========================================================= */
.blog { background: var(--cream); padding-top: clamp(40px, 5vw, 64px); }

.post-feature {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: 22px;
  animation: cardIn .8s var(--ease-out) both;
  transition: box-shadow .5s var(--ease-out), border-color .4s;
}
.post-feature:hover { box-shadow: 0 40px 80px -50px rgba(21,26,42,.5); border-color: rgba(196,110,58,.4); }
.post-feature .pf-media { position: relative; overflow: hidden; min-height: 300px; background: var(--navy); }
.post-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.post-feature:hover img { transform: scale(1.05); }
.pf-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 3.6vw, 44px); }
.pf-badge {
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 4px 10px;
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--copper);
  border-radius: 999px;
}
.post-meta { font-size: .78rem; color: var(--ink-soft); margin-bottom: 8px; }
.pf-title {
  font-size: clamp(1.4rem, 2.4vw, 1.95rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--navy);
}
.pf-excerpt { margin-top: 12px; color: var(--ink-soft); font-size: .95rem; }
.read-more { display: inline-flex; gap: 6px; margin-top: 20px; font-weight: 600; font-size: .88rem; color: var(--copper); }
.read-more span { transition: transform .3s var(--ease); }
.post-feature:hover .read-more span, .post-card:hover .read-more span { transform: translateX(4px); }

.blog-sub {
  margin: clamp(48px, 6vw, 72px) 0 20px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--navy);
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: 18px;
  animation: cardIn .7s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 80ms);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .4s;
}
.post-card:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -40px rgba(21,26,42,.5); border-color: rgba(196,110,58,.4); }
.pc-media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--navy); }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.post-card:hover .pc-media img { transform: scale(1.06); }
.pc-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 22px; }
.pc-title { font-size: 1.08rem; font-weight: 650; line-height: 1.3; letter-spacing: -.015em; color: var(--navy); }
.pc-excerpt {
  margin-top: 8px;
  font-size: .88rem;
  line-height: 1.6;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-body .read-more { margin-top: auto; padding-top: 16px; }

/* ---------- Single post ---------- */
.page-hero--post { padding-bottom: clamp(120px, 14vw, 170px); }
.page-hero--post .page-title { max-width: 22ch; font-size: clamp(2rem, 4vw, 3.2rem); }

.article-wrap { background: var(--cream); padding-top: clamp(44px, 6vw, 68px); }
.article { max-width: 68ch; margin-inline: auto; }
.article p { font-size: 1.04rem; line-height: 1.85; color: var(--ink); }
.article p + p, .article blockquote + p, .article h2 + p { margin-top: 18px; }
.article > p:first-child::first-letter {
  float: left;
  margin: 6px 10px 0 0;
  font-family: var(--brand-font);
  font-size: 3.4em;
  font-weight: 700;
  line-height: .8;
  color: var(--copper);
}
.article h2 {
  margin-top: 40px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--navy);
}
.article blockquote {
  position: relative;
  margin: 34px 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid var(--copper);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  line-height: 1.35;
  color: var(--navy);
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 68ch;
  margin: 44px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--cream-deep);
}
.share-label { margin-right: 6px; font-size: .72rem; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.share a, .share button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  font: 600 .8rem/1 var(--font);
  color: var(--navy);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.share a:hover, .share button:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

.read-next { margin-top: clamp(56px, 7vw, 88px); }

/* =========================================================
   404
   ========================================================= */
.nf-body { background: var(--navy-deep); }
.nf {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 100px var(--gutter) 60px;
  color: var(--white);
  text-align: center;
}
.nf-brand { position: absolute; top: calc(22px + env(safe-area-inset-top, 0px)); left: var(--gutter); z-index: 1; }
.nf-inner { position: relative; z-index: 1; display: grid; justify-items: center; }
.nf-stage { width: min(380px, 80vw); margin-bottom: 22px; }
.nf-stage g { animation: march 1.6s linear infinite; }
.nf-title {
  max-width: 18ch;
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.03em;
}
.nf-title em { color: var(--copper-soft); font-size: 1.08em; }
.nf-text { margin-top: 14px; color: var(--mist-text); max-width: 42ch; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
@keyframes march { to { stroke-dashoffset: -22; } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .sc-item, .sc-item:nth-child(even) { grid-template-columns: 1fr; gap: 22px; }
  .sc-item:nth-child(even) .sc-media { order: 0; }
  .sc-num { position: absolute; right: 0; top: -.15em; margin: 0; font-size: clamp(3.6rem, 12vw, 5rem); }
  .idx-row { grid-template-columns: 40px 1fr 70px 40px; }
  .idx-cat { display: none; }
  .proj-body { grid-template-columns: 1fr; }
  .scope-card { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .post-feature { grid-template-columns: 1fr; }
  .post-feature .pf-media { min-height: 0; aspect-ratio: 16 / 9; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .page-hero { padding-top: calc(104px + env(safe-area-inset-top, 0px)); }
  .page-title { font-size: clamp(1.9rem, 9vw, 2.4rem); }
  .page-hero--post .page-title { font-size: clamp(1.7rem, 7.6vw, 2.1rem); }
  .page-beams { inset: 0; opacity: .6; }
  .pf-bar { align-items: flex-start; }
  .filters { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; gap: 22px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { white-space: nowrap; }
  .sc-media { border-radius: 16px; }
  .idx-row { grid-template-columns: 1fr 36px; gap: 14px; }
  .idx-num, .idx-date { display: none; }
  .cover-frame { aspect-ratio: 4 / 3; border-radius: 16px; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .gallery button:first-child { grid-column: 1 / -1; grid-row: span 2; }
  .proj-nav { grid-template-columns: 1fr; }
  .pn-link--next { text-align: left; align-items: flex-start; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-foot .btn { width: 100%; }
  .post-grid { grid-template-columns: 1fr; }
  .lightbox[open] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; }
  .lb-figure { grid-column: 1 / -1; grid-row: 1; padding: 70px 0 10px; }
  .lb-prev { grid-row: 2; justify-self: end; margin-bottom: 28px; }
  .lb-next { grid-row: 2; justify-self: start; margin-bottom: 28px; }
}

@media (hover: none) {
  /* Touch: no cursor bubble or floating preview; show thumbnails in the list */
  .sc-media { cursor: pointer; }
  .sc-view { display: none; }
  .idx-preview { display: none; }
  .idx-thumb { display: block; width: 64px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; grid-row: 1; grid-column: 1; }
  .idx-row { grid-template-columns: 64px 1fr 36px; }
  .idx-num, .idx-cat, .idx-date { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .crumbs, .page-title, .page-intro, .page-meta, .page-cat { opacity: 1; transform: none; }
  .page-beams span { opacity: 1; }
  .nf-stage g { animation: none; }
}
