:root {
  --bg: #0a0a0a;
  --fg: #f5f3ef;
  --muted: rgba(245, 243, 239, .6);
  --hair: rgba(245, 243, 239, .18);
  --hair-dark: rgba(22, 20, 15, .12);
  --paper: #f6f3ee;
  --ink: #16140f;
  --ink-muted: #8c8478;
  --rhythm: 3.6rem;
  --top-content: calc(var(--rhythm) * 1.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { font-family: "Montserrat", "Zen Kaku Gothic New", sans-serif; background: var(--paper); }
img { max-width: 100%; }

/* ===== HERO BACKGROUND ===== */
.hero-bg {
  position: fixed; top: 0; left: 0; width: 100vw; height: 118vh; z-index: 0;
  overflow: hidden; background: var(--bg);
  will-change: transform;
}
.hero-bg .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.hero-bg .slide.active { opacity: 1; }
@keyframes kenburns-left {
  0%   { transform: scale(1.1) translateX(3%); }
  100% { transform: scale(1.1) translateX(-3%); }
}
@keyframes kenburns-right {
  0%   { transform: scale(1.1) translateX(-3%); }
  100% { transform: scale(1.1) translateX(3%); }
}
@keyframes pan-left {
  0%   { transform: scale(1.06) translateX(3%); }
  100% { transform: scale(1.06) translateX(-3%); }
}
@keyframes pan-right {
  0%   { transform: scale(1.06) translateX(-3%); }
  100% { transform: scale(1.06) translateX(3%); }
}
.hero-bg .slide img {
  width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.97);
  animation: kenburns-left 6s ease-out forwards;
}
.hero-bg .slide:nth-child(even) img {
  animation: kenburns-right 6s ease-out forwards;
}

.bottom-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30vh; z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,.68), transparent);
  opacity: .4; transition: opacity .4s ease; pointer-events: none;
}
.bottom-fade.show { background: linear-gradient(to top, rgba(0,0,0,.9), transparent); opacity: 1; height: 30vh; }

/* ===== HERO FOREGROUND ===== */
.hero {
  position: relative; z-index: 1; height: 100vh;
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--fg);
}
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2rem 3rem;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
}
.wordmark { display: flex; flex-direction: column; gap: .4rem; }
.wordmark .name {
  font-weight: 700; font-size: .82rem; letter-spacing: .22em; text-transform: uppercase;
}
.wordmark .role {
  font-weight: 400; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg);
}
nav { display: flex; gap: 2.4rem; }
nav a {
  color: var(--fg); text-decoration: none; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; opacity: .85; transition: opacity .3s;
}
nav a:hover { opacity: 1; }

.bottom-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 3rem 2.4rem;
}
.caption { font-size: .78rem; letter-spacing: .04em; color: var(--muted); white-space: nowrap; transition: opacity .4s ease; }

.icon-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: inherit; width: 15px; height: 15px;
}
.icon-arrow svg { width: 100%; height: 100%; display: block; }
.btn-prev .icon-arrow svg { transform: rotate(180deg); }
.back-to-top .icon-arrow svg { transform: rotate(-90deg); }
.work-cta .icon-arrow { width: 14px; height: 14px; }

.arrows { display: flex; gap: 1.1rem; justify-self: end; }
.arrows button {
  background: none; border: 1px solid var(--hair); color: var(--fg);
  width: 2.6rem; height: 2.6rem; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; transition: border-color .3s;
}
.arrows button:hover { border-color: var(--fg); }

.scroll-cue {
  justify-self: center;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
  opacity: .85; transition: opacity .4s ease; cursor: pointer; background: none; border: none;
  font-family: inherit;
}
.scroll-cue.hide { opacity: 0; pointer-events: none; }
.scroll-cue .chevron { font-size: .9rem; line-height: 1; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ===== INTRO ===== */
.intro {
  position: relative; z-index: 1;
  background: var(--paper); color: var(--ink);
  padding: 9rem 2rem 8rem; text-align: center;
}
.intro .catch {
  max-width: 760px; margin: 0 auto; font-weight: 500;
  font-size: clamp(1.7rem, 4.4vw, 3rem); line-height: 1.3; letter-spacing: .005em;
}
.intro .sub {
  max-width: 680px; margin: 2.4rem auto 0; color: var(--ink-muted);
  font-size: .92rem; line-height: 1.9;
}
.intro .sub .jp { font-family: "Zen Kaku Gothic New", "Montserrat", sans-serif; margin-bottom: .6rem; }

/* ===== WORK PREVIEW ===== */
.work-preview {
  position: relative; z-index: 1;
  background: var(--paper); color: var(--ink);
  padding: 0 3rem 7rem;
}
.work-rows { max-width: 1300px; margin: 0 auto; }
.work-row { display: flex; align-items: flex-start; gap: 2.4%; }
.work-row + .work-row { margin-top: 4.5rem; }
.work-row--2 { width: 80%; margin-left: 12%; }
.work-row--3 { width: 82%; margin-left: 4%; }

.work-item { transition: opacity .2s ease; }
.work-item:hover { opacity: .8; }
.work-item img { width: 100%; display: block; background: #e7e3dc; }
.work-caption {
  margin-top: .8rem;
  font-size: .7rem;
  color: var(--ink-muted);
  letter-spacing: .02em;
}

/* work item slot layouts */
.work-slot-1 { width: 56%; align-self: flex-start; }
.work-slot-2 { width: 24%; margin-top: 9%; margin-left: 3%; align-self: flex-start; }
.work-slot-3 { width: 14%; margin-top: -3%; margin-left: auto; align-self: flex-start; }
.work-slot-4 { width: 62%; align-self: flex-start; }
.work-slot-5 { width: 30%; margin-top: 6%; margin-left: auto; align-self: flex-start; }
.work-slot-6 { width: 22%; margin-top: 7%; align-self: flex-start; }
.work-slot-7 { width: 30%; margin-left: 4%; align-self: flex-start; }
.work-slot-8 { width: 34%; margin-left: auto; align-self: flex-end; }

/* ===== STICKY HEADER ===== */
.sticky-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.2rem 3rem;
  background: rgba(246, 243, 238, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(22, 20, 15, .08);
  color: var(--ink);
  opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.sticky-header.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.sticky-header .name {
  font-weight: 700; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
}
.sticky-header nav { display: flex; gap: 2rem; }
.sticky-header nav a {
  color: var(--ink); text-decoration: none; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; opacity: .7; transition: opacity .25s ease;
}
.sticky-header nav a:hover { opacity: 1; }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; right: 2rem; bottom: 2rem; z-index: 50;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--ink); color: var(--paper); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-family: inherit;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .3s ease, transform .25s ease, bottom .15s ease-out;
}
.back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { transform: scale(1.08); }
.back-to-top.show:hover { transform: translateY(0) scale(1.08); }

/* ===== WORK CTA ===== */
.work-cta { text-align: center; margin-top: 5rem; }
.work-cta a {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--ink-muted); text-decoration: none; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700;
  transition: color .25s ease;
}
.work-cta a:hover { color: var(--ink); }
.work-cta a .icon-arrow { transition: transform .4s cubic-bezier(.4,0,.2,1); }
.work-cta a:hover .icon-arrow { transform: translateX(5px); }

/* ===== FOOTER ===== */
footer {
  position: relative; z-index: 1;
  background: var(--paper); color: var(--ink);
  border-top: 1px solid rgba(22, 20, 15, .12);
  padding: 2.2rem 3rem;
  display: flex; justify-content: space-between; align-items: center;
}
footer .copyright { font-size: .74rem; letter-spacing: .04em; color: var(--ink-muted); }
footer .social { display: flex; gap: 1.2rem; }
footer .social a { color: var(--ink-muted); display: flex; transition: color .25s ease; }
footer .social a:hover { color: var(--ink); }
footer .social svg { width: 18px; height: 18px; }

/* ===== MOBILE ===== */
@media (max-width: 760px) {
  header { padding: 1.3rem; }
  .wordmark .name { font-size: .72rem; letter-spacing: .13em; }
  .wordmark .role { font-size: .56rem; letter-spacing: .07em; }
  nav { gap: 1.1rem; }
  nav a { font-size: .62rem; letter-spacing: .09em; }
  .bottom-bar { padding: 0 1.3rem 1.6rem; grid-template-columns: 1fr auto 1fr; }
  .caption { font-size: .6rem; }
  .arrows { gap: .8rem; }
  .arrows button { width: 2.5rem; height: 2.5rem; }
  .bottom-fade { height: 24vh; }
  .intro { padding: 6rem 1.3rem 5rem; }
  .work-preview { padding: 0 1.3rem 5rem; }
  .work-row { flex-direction: column; gap: 0; width: 100% !important; margin-left: 0 !important; }
  .work-row + .work-row { margin-top: 2rem; }
  .work-rows { display: flex; flex-direction: column; }
  .work-item { width: 100% !important; margin: 0 0 2rem 0 !important; align-self: stretch !important; }
  .work-item:last-child { margin-bottom: 0 !important; }
  .work-item:active { opacity: .7; transition: opacity .1s ease; }
  footer { padding: 1.6rem 1.3rem; flex-direction: column; gap: 1rem; text-align: center; }
  .sticky-header { padding: 1rem 1.3rem; }
  .sticky-header .name { font-size: .66rem; letter-spacing: .12em; }
  .sticky-header nav { gap: 1rem; }
  .sticky-header nav a { font-size: .6rem; letter-spacing: .08em; }
  .back-to-top { right: 1.2rem; bottom: 1.2rem; width: 2.5rem; height: 2.5rem; }
  /* SP: 横パンのみ（ズームなし） */
  .hero-bg .slide img { animation: pan-left 5s linear forwards; }
  .hero-bg .slide:nth-child(even) img { animation: pan-right 5s linear forwards; }
}

/* ============================================================
   WORK PAGE  (body.page-work)
   ============================================================ */

/* ===== PAGE HERO BACKGROUND (fixed, blurred) ===== */
.page-work .hero-bg {
  /* height is set by JS to match .page-hero height + parallax buffer */
  background: var(--bg);
}
.page-work .hero-bg img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: blur(18px) saturate(1.05); transform: scale(1.12);
}
.hero-tint {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,9,7,.4), rgba(10,9,7,.58));
}

/* ===== PAGE HERO FOREGROUND ===== */
.page-hero {
  position: relative; z-index: 1; color: var(--fg);
}
.page-hero header {
  background: transparent;
}
.page-hero nav { display: flex; gap: 2.4rem; }
.page-hero nav a {
  color: var(--fg); text-decoration: none; font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  opacity: .85; transition: opacity .3s;
}
.page-hero nav a:hover, .page-hero nav a.current { opacity: 1; }
.sticky-header nav a.current { opacity: 1; }

.page-hero .title-block {
  text-align: center; padding: 1.5rem 2rem 2rem;
}
.page-hero .title-block h1 {
  font-weight: 500; font-size: clamp(1.5rem, 3vw, 1.9rem); letter-spacing: .06em;
}

/* ===== PAGE BODY ===== */
.page-body {
  position: relative; z-index: 1; background: var(--paper);
}

/* ===== SECTION JUMP NAV ===== */
.section-nav {
  display: flex; justify-content: center; flex-wrap: wrap;
  column-gap: 1.8rem; row-gap: 1em;
  padding: var(--rhythm) 3rem; max-width: 1300px; margin: 0 auto;
}
.section-nav a {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--ink-muted); text-decoration: none; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  opacity: 1; transition: color .25s ease;
}
.section-nav a:hover { color: var(--ink); }
.section-nav .icon-arrow { width: 13px; height: 13px; color: inherit; }
.section-nav .icon-arrow svg { transform: rotate(90deg); }

.section-nav-rule { max-width: 1300px; margin: 0 auto; padding: 0 3rem; }
.section-nav-rule hr { border: none; border-top: 1px solid var(--hair-dark); }

/* ===== SECTION EYEBROW ===== */
.section-eyebrow {
  max-width: 1300px; margin: 0 auto;
  padding: var(--top-content) 3rem var(--rhythm);
  font-weight: 500; font-size: .82rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink);
}
#commercial, #private { scroll-margin-top: calc(var(--rhythm) * 0.8); }
.section-divider .section-nav-rule { margin-bottom: 0; }
.page-work footer { border-top: 1px solid var(--hair-dark); }

/* ===== WORK GRID ===== */
.grid-wrap { max-width: 1300px; margin: 0 auto; padding: 0 3rem 7rem; }
/* ===== Scroll fade-in ===== */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}
.fade-in-on-scroll.fade-in-visible {
  opacity: 1;
  transform: translateY(0);
}

.grid { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 2.6%; row-gap: var(--rhythm); }
.grid .card { width: 31.6%; }

.card {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
  cursor: pointer;
}
.card.show { opacity: 1; transform: translateY(0); }
.card:hover { opacity: .8; }

.card-media { position: relative; display: block; background: #e7e3dc; }
.card-media img { width: 100%; display: block; }
.play-overlay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; transition: transform .3s ease;
}
.card-media:hover .play-overlay { transform: translate(-50%, -50%) scale(1.08); }
.count-badge {
  position: absolute; right: .7rem; bottom: .7rem;
  background: rgba(22,20,15,.62); color: #f5f3ef;
  font-size: .62rem; letter-spacing: .05em; padding: .32rem .6rem; border-radius: 999px;
}
.card-caption { margin-top: .85rem; font-size: .72rem; color: var(--ink-muted); letter-spacing: .02em; }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,9,7,.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox-close {
  position: absolute; top: 2rem; right: 2rem; z-index: 5;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 1px solid rgba(245,243,239,.25);
  background: none; color: #f5f3ef; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .3s ease;
}
.lightbox-close:hover { border-color: rgba(245,243,239,.85); }

.lightbox-arrow {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 1px solid rgba(245,243,239,.25);
  background: none; color: #f5f3ef; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .3s ease;
}
.lightbox-arrow:hover { border-color: rgba(245,243,239,.85); }
.lightbox-arrow.prev { left: 2rem; }
.lightbox-arrow.next { right: 2rem; }
.lightbox-arrow.prev .icon-arrow svg { transform: rotate(180deg); }

.lightbox-stage {
  max-width: 84vw; max-height: 78vh;
  display: flex; align-items: center; justify-content: center;
  touch-action: pan-y;
}
.lightbox-stage img { max-width: 84vw; max-height: 78vh; object-fit: contain; display: block; }

.lightbox-play-link {
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  color: #f5f3ef; text-decoration: none;
}
.lightbox-play-link img { max-width: 84vw; max-height: 60vh; object-fit: contain; display: block; }
.watch-link {
  display: inline-flex; align-items: center; gap: .7rem;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  opacity: .7; transition: opacity .25s ease;
}
.lightbox-play-link:hover .watch-link { opacity: 1; }
.watch-link .icon-arrow { width: 14px; height: 14px; transition: transform .4s cubic-bezier(.4,0,.2,1); }
.lightbox-play-link:hover .watch-link .icon-arrow { transform: translateX(5px); }

.lightbox-info {
  position: absolute; left: 0; right: 0; bottom: 1.6rem; z-index: 5;
  text-align: center; color: rgba(245,243,239,.75);
}
.lightbox-info .cat { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(245,243,239,.5); }
.lightbox-info .cap { margin-top: .3rem; font-size: .78rem; letter-spacing: .02em; }
.lightbox-info .pos { margin-top: .3rem; font-size: .6rem; color: rgba(245,243,239,.45); }

/* ===== WORK PAGE MOBILE ===== */
@media (max-width: 760px) {
  :root { --rhythm: 2.4rem; }

  .page-hero header { padding: 1.3rem; }
  .page-hero .title-block { padding: 1.2rem 1.3rem 1.3rem; }
  .page-hero nav { gap: 1.1rem; }
  .page-hero nav a { font-size: .62rem; letter-spacing: .09em; }

  .section-nav { padding: var(--rhythm) 1.3rem; column-gap: 1.1rem; }
  .section-nav-rule { padding: 0 1.3rem; }
  .section-eyebrow { padding: var(--top-content) 1.3rem var(--rhythm); font-size: .72rem; letter-spacing: .13em; }

  .grid-wrap { padding: 0 1.3rem 5rem; }
  .grid .card { width: 100%; }

  .lightbox-arrow { width: 2.5rem; height: 2.5rem; }
  .lightbox-arrow.prev { left: 1.2rem; }
  .lightbox-arrow.next { right: 1.2rem; }
  .lightbox-close { top: 1.2rem; right: 1.2rem; width: 2.5rem; height: 2.5rem; }
  .lightbox-stage img { max-width: 92vw; max-height: 68vh; }
  .lightbox-play-link img { max-width: 92vw; max-height: 55vh; }

  .lightbox-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0 1.2rem;
  }
  .lightbox-arrow.prev,
  .lightbox-arrow.next {
    position: static;
    transform: none;
    flex-shrink: 0;
  }
  .lightbox-text {
    flex: 1;
    min-width: 0;
    text-align: center;
    min-height: 4.2em;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* ============================================================
   ABOUT PAGE  (body.page-about)
   ============================================================ */

.page-about .hero-bg { background: var(--bg); }
.page-about .hero-bg img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: blur(18px) saturate(1.05); transform: scale(1.12);
}

/* ===== ABOUT CONTENT ===== */
.about-content {
  max-width: 1100px; margin: 0 auto;
  padding: var(--top-content) 3rem 7rem;
}

/* tategaki: two jp-rows stacked vertically */
.jp-block {
  display: flex; flex-direction: column;
  gap: var(--rhythm);
  width: fit-content; max-width: 100%; margin: 0 auto var(--rhythm);
}
.jp-row {
  display: flex; justify-content: flex-end;
  height: min(40vh, 420px); min-height: 320px;
}
.jp-col {
  writing-mode: vertical-rl;
  height: 100%;
  font-size: .95rem; line-height: 2.3; letter-spacing: .03em;
  color: var(--ink);
}
.jp-col p { margin-block-start: 1.6em; }
.jp-col p:first-child { margin-block-start: 0; }

/* transition photo between JP and EN blocks */
.wip-photo { max-width: 900px; margin: 0 auto var(--rhythm); }
.wip-photo img { width: 100%; display: block; }

/* EN horizontal copy */
.copy-col { max-width: 660px; margin: 0 auto var(--rhythm); }
.copy-col p { font-size: .92rem; line-height: 2.3; color: var(--ink); }
.copy-col p + p { margin-top: 1.5em; }

/* circular portrait */
.portrait-block {
  max-width: 220px; margin: calc(var(--rhythm) * 0.8) auto 0;
  text-align: center;
}
.portrait-block img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block;
  border-radius: 50%; filter: grayscale(1) contrast(1.03);
}

/* ===== ABOUT PAGE MOBILE ===== */
@media (max-width: 760px) {
  .about-content { padding: var(--top-content) 1.3rem 5rem; }

  /* tategaki → horizontal fallback on narrow viewports */
  .jp-block { gap: 1.5rem; }
  .jp-row { height: auto; min-height: 0; }
  .jp-col { writing-mode: horizontal-tb; height: auto; line-height: 2; }
  .jp-col p + p { margin-top: 1.5em; }
}

/* ============================================================
   CONTACT PAGE  (body.page-contact)
   ============================================================ */

:root { --error: #9b3a2f; }

.page-contact .hero-bg { background: var(--bg); }
.page-contact .hero-bg img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: blur(18px) saturate(1.05); transform: scale(1.12);
}

/* ===== CONTACT CONTENT ===== */
.contact-content {
  max-width: 640px; margin: 0 auto; text-align: center;
  padding: var(--top-content) 3rem 7rem;
}
.contact-content .lead-jp {
  font-family: "Zen Kaku Gothic New", "Montserrat", sans-serif;
  font-size: .92rem; line-height: 2.3; color: var(--ink);
}
.contact-content .lead {
  margin-top: .6rem; font-size: .92rem; line-height: 2.3; color: var(--ink-muted);
}

.email-link {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 2rem;
  font-size: clamp(1rem, 2.4vw, 1.3rem); font-weight: 500;
  color: var(--ink); text-decoration: none; letter-spacing: .01em;
  opacity: .7; transition: opacity .25s ease;
}
.email-link:hover { opacity: 1; }
.email-link .icon-arrow { width: 16px; height: 16px; transition: transform .4s cubic-bezier(.4,0,.2,1); }
.email-link:hover .icon-arrow { transform: translateX(5px); }

/* divider between email and form */
.form-divider {
  display: flex; align-items: center; gap: 1.2rem;
  margin: 0 0 2.4rem;
}
.form-divider::before, .form-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--hair-dark);
}
.form-divider span {
  font-size: .62rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-muted); white-space: nowrap;
}

/* ===== FORM ===== */
#formWrap { background: #fff; border: none; padding: 2.5rem; margin-top: 7rem; }
.contact-form { text-align: left; }

.field { margin-bottom: 1.4rem; }
.field label {
  display: block; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); margin-bottom: .55rem;
}
.field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: .88rem; line-height: 1.6;
  color: var(--ink); background: transparent;
  border: none; border-bottom: 1px solid var(--hair-dark);
  padding: .55rem 0;
  outline: none; transition: border-color .25s ease;
  -webkit-appearance: none; border-radius: 0;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-bottom-color: var(--ink);
}
.field textarea { resize: none; min-height: 7rem; }
.field select { cursor: pointer; color: var(--ink-muted); }
.field select.has-value { color: var(--ink); }

.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; pointer-events: none;
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238c8478' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field .error-msg {
  display: none; margin-top: .4rem;
  font-size: .66rem; letter-spacing: .04em; color: var(--error);
}
.field.has-error input, .field.has-error textarea, .field.has-error select {
  border-bottom-color: var(--error);
}
.field.has-error .error-msg { display: block; }

.form-note {
  font-size: .7rem; color: var(--ink-muted); line-height: 1.8;
  margin-bottom: 1.6rem; text-align: left;
}

.submit-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: .92rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-muted); padding: 0; transition: color .25s ease;
}
.submit-btn:hover { color: var(--ink); }
.submit-btn .icon-arrow { width: 14px; height: 14px; transition: transform .4s cubic-bezier(.4,0,.2,1); }
.submit-btn:hover .icon-arrow { transform: translateX(5px); }
.submit-btn:disabled { opacity: .45; cursor: not-allowed; }
.submit-btn:disabled .icon-arrow { transform: none; }

.form-success {
  display: none; text-align: center; padding: 2rem 0;
}
.form-success p { font-size: .92rem; line-height: 2.3; color: var(--ink); }
.form-success .sub { color: var(--ink-muted); margin-top: .4rem; }

/* ===== CONTACT PAGE MOBILE ===== */
@media (max-width: 760px) {
  .contact-content { padding: var(--top-content) 1.3rem 5rem; }
  .email-link { word-break: break-all; }
  #formWrap { margin-top: 5rem; }
}

/* ===== Clickable logo (inner pages) ===== */
.sticky-header a.name {
  color: inherit;
  text-decoration: none;
}
.page-hero .wordmark {
  text-decoration: none;
  color: inherit;
}

/* ===== Formspree success override ===== */
[data-fs-success] {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 2rem 0 !important;
  text-align: center;
  color: var(--ink);
  font-family: "Montserrat", "Zen Kaku Gothic New", sans-serif;
  font-size: .92rem;
  line-height: 2.3;
}
