/* ─────────────────────────────────────────────────────────
   NEW PORT Studio — main.css
   ───────────────────────────────────────────────────────── */

/* ─── Custom Properties ──────────────────────────────────── */
:root {
  --color-base:    #ffffff;
  --color-sub:     #fafafa;
  --color-text:    #1a1a1a;
  --color-muted:   #888888;
  --color-rule:    #e8e8e8;
  --color-brand:   #F7DB49; /* logo only — never use in UI */

  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-ui:       'DM Sans', system-ui, sans-serif;

  --space-section: 140px;
  --space-gap:     56px;
  --max-width:     1400px;
  --max-text:      640px;

  --ease:          cubic-bezier(.44,.07,.54,.93);
  --ease-out:      cubic-bezier(.16,1,.3,1);
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
body  {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img   { display: block; width: 100%; }
a     { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── Layout helpers ─────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
}
.section        { padding: var(--space-section) 0; }
.section-sub    { padding: 80px 0; background: var(--color-sub); }

/* ─── Section header ─────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 48px;
}
.section-label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.section-link {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-rule);
  padding-bottom: 1px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.section-link:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease);
}
.site-header.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  padding: 18px 40px;
}
.header-logo {
  display: block;
  height: 20px;
  width: auto;
}
.header-logo img {
  height: 100%;
  width: auto;
  display: block;
}

/* Hamburger */
.hamburger {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 1px;
  background: var(--color-text);
  transition: all 0.4s var(--ease);
}
.hamburger span:nth-child(1) { width: 28px; }
.hamburger span:nth-child(2) { width: 20px; }
.hamburger.is-open span:nth-child(1) {
  width: 24px;
  transform: translateY(3.5px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  width: 24px;
  transform: translateY(-3.5px) rotate(-45deg);
}

/* ─── Nav overlay ────────────────────────────────────────── */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-base);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.nav-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}
.nav-list {
  list-style: none;
  text-align: center;
}
.nav-list li {
  overflow: hidden;
  margin-bottom: 8px;
}
.nav-list a {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--color-text);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out), color 0.3s;
}
.nav-overlay.is-open .nav-list a {
  transform: translateY(0);
}
.nav-list li:nth-child(2) a { transition-delay: 0.04s; }
.nav-list li:nth-child(3) a { transition-delay: 0.08s; }
.nav-list li:nth-child(4) a { transition-delay: 0.12s; }
.nav-list a:hover { color: var(--color-muted); }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: #1a1a1a;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}
/* YouTube iframe hero */
.hero-yt-wrap {
  position: absolute;
  inset: -10%;
  pointer-events: none;
}
.hero-yt-wrap iframe {
  width: 100%;
  height: 100%;
}
.hero-content {
  position: absolute;
  bottom: 48px;
  left: 0;
  right: 0;
  padding: 0 48px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.hero-caption {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.4);
  animation: scrollLine 2s var(--ease) infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.hero-scroll-text {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

/* ─── Works Grid (index) ─────────────────────────────────── */
.works-grid { display: flex; flex-direction: column; gap: 4px; }
.works-row  {
  display: flex;
  gap: 4px;
  align-items: stretch;
}
.works-row:nth-child(odd)  .work-card:nth-child(1) { flex: 0 0 calc(70% - 2px); }
.works-row:nth-child(odd)  .work-card:nth-child(2) { flex: 0 0 calc(30% - 2px); }
.works-row:nth-child(even) .work-card:nth-child(1) { flex: 0 0 calc(30% - 2px); }
.works-row:nth-child(even) .work-card:nth-child(2) { flex: 0 0 calc(70% - 2px); }

.work-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.work-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-sub);
}
.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
  display: block;
}
.work-card:hover .work-thumb img { transform: scale(1.04); }

.work-info {
  padding: 16px 0 4px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.work-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.work-client {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-title {
  font-size: 12px;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.work-year {
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

/* ─── Works list page ────────────────────────────────────── */
.page-hero {
  padding-top: 160px;
  padding-bottom: 80px;
}
.page-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 20px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* Filter */
.filter-bar {
  display: flex;
  gap: 32px;
  margin-bottom: 64px;
  border-bottom: 1px solid var(--color-rule);
  padding-bottom: 0;
}
.filter-btn {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  padding-bottom: 16px;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.filter-btn:hover    { color: var(--color-text); }
.filter-btn.is-active {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
}

/* Works list grid — 12 col */
.works-list-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}
.works-list-grid .work-card { grid-column: span 8; }
.works-list-grid .work-card:nth-child(4n+2) { grid-column: span 4; }
.works-list-grid .work-card:nth-child(4n+3) { grid-column: span 4; }
.works-list-grid .work-card:nth-child(4n+4) { grid-column: span 8; }
.works-list-grid .work-card.is-hidden { display: none; }

.works-list-gap { margin-bottom: 80px; }

.empty-state {
  grid-column: 1 / -1;
  padding: 80px 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
  letter-spacing: 0.06em;
  display: none;
}
.empty-state.is-visible { display: block; }

/* ─── Work detail ────────────────────────────────────────── */
.work-detail-hero {
  padding-top: 120px;
}
.work-detail-video {
  aspect-ratio: 16/9;
  background: #1a1a1a;
  overflow: hidden;
}
.work-detail-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.work-detail-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 80px;
  padding: var(--space-section) 0;
}
.work-detail-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 32px;
}
.work-detail-desc {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  max-width: 560px;
  margin-bottom: 40px;
}
.work-detail-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  border: 1px solid var(--color-rule);
  padding: 5px 12px;
}
.work-credits-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 24px;
}
.credits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.credits-table tr {
  border-bottom: 1px solid var(--color-rule);
}
.credits-table td {
  padding: 12px 0;
  vertical-align: top;
}
.credits-table td:first-child {
  color: var(--color-muted);
  width: 44%;
  padding-right: 16px;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding-top: 14px;
}

/* Prev / Next */
.work-nav {
  border-top: 1px solid var(--color-rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.work-nav-item {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.3s var(--ease);
}
.work-nav-item:hover { background: var(--color-sub); }
.work-nav-item + .work-nav-item { border-left: 1px solid var(--color-rule); }
.work-nav-dir {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.work-nav-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-sub);
  max-width: 200px;
}
.work-nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.work-nav-item:hover .work-nav-thumb img { transform: scale(1.05); }
.work-nav-client {
  font-size: 14px;
  font-weight: 500;
}
.work-nav-title {
  font-size: 12px;
  color: var(--color-muted);
}

/* ─── Philosophy ─────────────────────────────────────────── */
.philosophy-hero {
  padding-top: 180px;
  padding-bottom: 120px;
  max-width: 820px;
}
.philosophy-hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-style: italic;
}
.philosophy-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 120px;
  padding-bottom: var(--space-section);
  border-top: 1px solid var(--color-rule);
  padding-top: 80px;
}
.philosophy-block-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 28px;
}
.philosophy-block-heading {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 28px;
}
.philosophy-block-text {
  font-size: 15px;
  line-height: 1.85;
  color: #444;
}

/* ─── Creators ───────────────────────────────────────────── */
.creator-row {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 80px;
  padding: 80px 0;
  border-top: 1px solid var(--color-rule);
  align-items: start;
}
.creator-row.coming-soon {
  opacity: 0.3;
  pointer-events: none;
}
.creator-portrait {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--color-sub);
}
.creator-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.creator-name-block { margin-bottom: 32px; }
.creator-name {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 8px;
}
.creator-role-text {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.creator-bio-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.creator-bio-col { display: flex; flex-direction: column; gap: 10px; }
.bio-lang {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.creator-bio {
  font-size: 15px;
  line-height: 1.85;
  color: #444;
}
.creator-sns {
  display: flex;
  gap: 20px;
  margin-bottom: 48px;
}
.creator-sns a {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-rule);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.creator-sns a:hover {
  color: var(--color-text);
  border-color: var(--color-text);
}
.creator-works-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 20px;
}
.creator-works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.creator-work-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-sub);
  cursor: pointer;
}
.creator-work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.creator-work-thumb:hover img { transform: scale(1.05); }
.coming-soon-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  border: 1px solid var(--color-rule);
  padding: 4px 10px;
  margin-bottom: 12px;
}

/* ─── Contact ────────────────────────────────────────────── */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 120px;
  padding: var(--space-section) 0;
}
.contact-lead {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 32px;
}
.contact-email-block { margin-bottom: 56px; }
.contact-email-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 10px;
}
.contact-email-link {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
  display: inline-block;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact-email-link:hover {
  color: var(--color-muted);
  border-color: var(--color-muted);
}
.contact-sns-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 16px;
}
.contact-sns-list { display: flex; flex-direction: column; gap: 12px; }
.contact-sns-list a {
  font-size: 14px;
  color: var(--color-muted);
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  transition: color 0.3s var(--ease);
}
.contact-sns-list a:hover { color: var(--color-text); }
.contact-sns-platform {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-width: 70px;
}

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 32px; }
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.form-input,
.form-textarea {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--color-text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-rule);
  padding: 12px 0;
  width: 100%;
  outline: none;
  transition: border-color 0.3s var(--ease);
  -webkit-appearance: none;
}
.form-input:focus,
.form-textarea:focus { border-bottom-color: var(--color-text); }
.form-textarea {
  resize: none;
  min-height: 140px;
  line-height: 1.7;
}
.form-submit {
  align-self: flex-start;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-base);
  background: var(--color-text);
  padding: 16px 40px;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s var(--ease);
}
.form-submit:hover { opacity: 0.75; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--color-rule);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.footer-logo { height: 16px; width: auto; }
.footer-logo img { height: 100%; width: auto; display: block; }
.footer-nav {
  display: flex;
  gap: 32px;
  list-style: none;
}
.footer-nav a {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  transition: color 0.3s var(--ease);
}
.footer-nav a:hover { color: var(--color-text); }
.footer-copy {
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

/* ─── Scroll animation ───────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Thanks page ────────────────────────────────────────── */
.thanks-wrap {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px;
}
.thanks-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.thanks-text {
  font-size: 15px;
  color: var(--color-muted);
  margin-bottom: 48px;
}
.thanks-link {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
  transition: color 0.3s var(--ease);
}
.thanks-link:hover { color: var(--color-muted); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --space-section: 100px; --space-gap: 40px; }
  .container { padding: 0 32px; }
  .work-detail-body { grid-template-columns: 1fr; gap: 48px; }
  .philosophy-body { grid-template-columns: 1fr; gap: 64px; }
  .creator-row { grid-template-columns: 260px 1fr; gap: 48px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 64px; }
}

@media (max-width: 768px) {
  :root { --space-section: 80px; }
  .container { padding: 0 24px; }
  .site-header { padding: 20px 24px; }
  .site-header.scrolled { padding: 14px 24px; }
  .hero-content { padding: 0 24px; bottom: 32px; }
  .works-row { flex-direction: column; }
  .works-row .work-card { flex: 1 1 auto !important; }
  .works-list-grid { grid-template-columns: 1fr 1fr; }
  .works-list-grid .work-card,
  .works-list-grid .work-card:nth-child(4n+2),
  .works-list-grid .work-card:nth-child(4n+3),
  .works-list-grid .work-card:nth-child(4n+4) { grid-column: span 1; }
  .work-nav { grid-template-columns: 1fr; }
  .work-nav-item + .work-nav-item { border-left: none; border-top: 1px solid var(--color-rule); }
  .work-nav-item { padding: 28px 24px; }
  .creator-row { grid-template-columns: 1fr; }
  .creator-portrait { max-width: 280px; }
  .creator-bio-cols { grid-template-columns: 1fr; gap: 24px; }
  .creator-works-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .filter-bar { gap: 20px; }
  .footer-nav { flex-wrap: wrap; gap: 16px; }
}
