/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: #ffffff; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }

/* ── CSS Custom Properties (defaults = crème theme) ── */
:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --card: #f1efe9;
  --line: rgba(10,10,10,0.14);
  --muted: rgba(10,10,10,0.55);
  --accent: #d8482c;
  --accent-ink: #ffffff;
  --overlay: rgba(10,10,10,0.30);
  --serif: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --radius: 0px;
  --nav-track: 0.12em;
  --nav-transform: uppercase;
  --nav-blend: difference;
  --hero-h: 100;
  --sp: 1;
  --cols: 2;
  --card-ratio: 3 / 4;
  --banner-h: 42vh;
}

#app {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  min-height: 100vh;
  transition: background 0.6s ease, color 0.6s ease;
}

::selection { background: var(--accent); color: var(--accent-ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--accent); }
::-webkit-scrollbar-track { background: transparent; }

/* ── Page Transition ── */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  pointer-events: none;
  transform: translateY(0);
}

/* ── Grain Overlay ── */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  transition: opacity 0.4s ease;
}
.grain-overlay.active { opacity: 0.5; }

/* ── Navigation ── */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(24px, 6vw, 140px);
  mix-blend-mode: var(--nav-blend);
  color: #fff;
  pointer-events: none;
  transition: mix-blend-mode 0s;
}

#main-nav.nav-over-hero {
  mix-blend-mode: normal;
}

#main-nav.nav-over-footer {
  mix-blend-mode: normal;
  color: #fff;
}

.nav-logo {
  pointer-events: auto;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  pointer-events: auto;
}

.nav-links a {
  text-decoration: none;
  color: inherit;
  font-size: 12px;
  letter-spacing: var(--nav-track);
  text-transform: var(--nav-transform);
}

.nav-divider {
  width: 1px;
  height: 14px;
  background: currentColor;
  opacity: 0.4;
}

.lang-switch {
  display: inline-flex;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.lang-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}
.lang-btn.active { opacity: 1; }

.lang-sep { opacity: 0.4; }

/* ── Hero ── */
.hero-scroll-area {
  height: calc(100vh + 900px);
  position: relative;
  z-index: 3;
  background: var(--bg);
}

.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  z-index: 3;
  background: var(--bg);
}

.hero-media {
  position: absolute;
  inset: -10% 0 0 0;
  width: 100%;
  height: 122%;
  will-change: transform;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg);
  pointer-events: none;
  transition: background 0.3s ease;
}

.hero.loaded .hero-overlay {
  background: var(--overlay);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(90px, 12vh, 150px) clamp(24px, 6vw, 140px) clamp(36px, 6vh, 64px);
  color: #f4f0e8;
  will-change: transform, opacity;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.hero-year {
  opacity: 0.6;
  margin-left: auto;
}

.hero-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-top: clamp(20px, 4vh, 44px);
}

.hero-role {
  font-size: clamp(14px, 1.4vw, 18px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  max-width: 30ch;
  line-height: 1.5;
}

.scroll-cue {
  position: absolute;
  bottom: clamp(36px, 6vh, 64px);
  left: 50%;
  transform: translateX(-50%);
  will-change: transform, opacity;
  color: #f4f0e8;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-line {
  width: 1px;
  height: 34px;
  background: currentColor;
  opacity: 0.5;
}

/* ── Sections ── */
.section {
  padding: calc(clamp(80px, 16vh, 200px) * var(--sp)) clamp(24px, 6vw, 140px) 0;
  scroll-margin-top: 80px;
  position: relative;
  z-index: 3;
  background: var(--bg);
}

.section-label {
  display: flex;
  gap: 16px;
  align-items: baseline;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(36px, 6vh, 72px);
}

.section-num { color: var(--accent); }

/* ── About ── */
.section-about {
  padding-bottom: 200px;
}

.about-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(40px, 8vw, 120px);
  align-items: flex-end;
  justify-content: space-between;
}

.about-lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 58px);
  line-height: 1.24;
  letter-spacing: -0.005em;
  flex: 1 1 620px;
  max-width: 28ch;
  text-wrap: pretty;
}

.about-body {
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.7;
  flex: 0 1 52ch;
  max-width: 52ch;
  color: var(--muted);
}

/* ── Work / Projects ── */
.section-work {
  padding: 0 clamp(24px, 6vw, 140px) 210px;
  scroll-margin-top: 80px;
  position: relative;
  z-index: 3;
  background: var(--bg);
}

.work-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(40px, 7vh, 72px);
}

.work-sub {
  font-size: 14px;
  line-height: 1.6;
  max-width: 34ch;
  opacity: 0.7;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  column-gap: clamp(12px, 1.1vw, 24px);
  row-gap: clamp(44px, 4.8vw, 96px);
}

.project-card {
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  width: 85%;
  margin-inline: auto;
}

.project-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: var(--card-ratio);
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  will-change: transform;
}

.project-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 35%, transparent 60%, rgba(0,0,0,0.35) 100%);
  z-index: 2;
  border-radius: var(--radius);
  pointer-events: none;
}

.project-card-title {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  pointer-events: none;
}

.project-card-meta {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: #fff;
  pointer-events: none;
  z-index: 3;
}

.project-card-num {
  font-size: 13px;
  letter-spacing: 0.1em;
}

.project-card-tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Banner ── */
.banner-wrapper {
  padding-top: 164px;
  padding-bottom: 164px;
  background-color: var(--bg);
  position: relative;
  z-index: 3;
}

.banner-section {
  width: 100%;
  height: var(--banner-h);
  min-height: 170px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

/* ── Expertise ── */
.section-expertise {
  padding-top: 140px !important;
  padding-right: clamp(24px, 6vw, 140px);
  padding-bottom: 200px;
  padding-left: clamp(24px, 6vw, 140px);
  scroll-margin-top: 80px;
  position: relative;
  z-index: 3;
  background: var(--bg);
}

.section-expertise .section-label {
  margin-bottom: clamp(24px, 4vh, 48px);
}

.expertise-list {
  border-top: 1px solid var(--line);
}

.expertise-item {
  border-bottom: 1px solid var(--line);
}

.expertise-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(20px, 3.2vh, 38px) 0;
  transition: color 0.3s ease;
}

.expertise-btn:hover {
  color: var(--accent);
}

.expertise-btn-num {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
  width: 36px;
  flex: none;
}

.expertise-btn-title {
  font-family: var(--serif);
  font-size: clamp(18px, 4.4vw, 24px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  flex: 1;
}

.expertise-btn-sign {
  font-family: var(--sans);
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1;
  color: var(--accent);
  width: 44px;
  text-align: center;
  flex: none;
  font-weight: 300;
}

.expertise-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(.16,1,.3,1), opacity 0.4s ease;
  opacity: 0;
}

.expertise-body.open {
  max-height: 300px;
  opacity: 1;
}

.expertise-body-inner {
  padding: 0 0 clamp(26px, 4vh, 44px) 60px;
  max-width: 64ch;
}

.expertise-body-inner p {
  font-size: clamp(15px, 1.3vw, 16px);
  line-height: 1.6;
  opacity: 0.82;
}

/* ── Footer / Contact ── */
.footer-contact {
  background: var(--fg);
  color: var(--bg);
  padding: calc(clamp(80px, 16vh, 200px) * var(--sp)) clamp(24px, 6vw, 140px) clamp(36px, 6vh, 56px);
  scroll-margin-top: 0;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 2;
  --posX: 0;
  --posY: 0;
}

.footer-contact > *:not(.footer-gradient) {
  position: relative;
  z-index: 1;
}

.footer-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgb(211, 255, 215), rgb(0, 0, 0)),
    radial-gradient(90% 100% at calc(50% + calc(var(--posX) * 1px)) calc(0% + calc(var(--posY) * 1px)), rgb(200, 200, 200), rgb(22, 0, 45)),
    radial-gradient(100% 100% at calc(80% - calc(var(--posX) * 1px)) calc(0% - calc(var(--posY) * 1px)), rgb(250, 255, 0), rgb(36, 0, 0)),
    radial-gradient(150% 210% at calc(100% + calc(var(--posX) * 1px)) calc(0% + calc(var(--posY) * 1px)), rgb(20, 175, 125), rgb(0, 10, 255)),
    radial-gradient(100% 100% at calc(100% - calc(var(--posX) * 1px)) calc(30% - calc(var(--posY) * 1px)), rgb(255, 77, 0), rgb(0, 200, 255)),
    linear-gradient(60deg, rgb(255, 0, 0), rgb(120, 86, 255));
  background-blend-mode: overlay, overlay, difference, difference, difference, normal;
}

.footer-label {
  margin-bottom: clamp(30px, 5vh, 56px);
  opacity: 0.6;
  color: #ffffff;
}

.footer-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(64px, 15vw, 260px);
  line-height: 0.86;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(28px, 6vw, 80px);
  margin-top: clamp(48px, 9vh, 96px);
}

.footer-link-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
}

.footer-link-value {
  color: inherit;
  text-decoration: none;
  font-size: clamp(18px, 2vw, 28px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.hover-link:hover {
  border-bottom-color: var(--accent) !important;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(60px, 12vh, 120px);
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.16);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}



/* ── Parallax Reveal ── */
.parallax-item {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 0.5s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.parallax-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links a { display: none; }
  .nav-divider { display: none; }
  .nav-links { gap: 12px; }

  .about-grid { flex-direction: column; gap: 32px; }
  .about-lead { font-size: clamp(24px, 6vw, 42px); flex: 1 1 100%; }
  .about-body { flex: 1 1 100%; max-width: 100%; }

  .projects-grid { grid-template-columns: 1fr !important; }
  .project-card { transform: none !important; }

  .footer-title { font-size: clamp(48px, 12vw, 120px); }
  .footer-links { flex-direction: column; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .hero { min-height: 500px; }

  .banner-wrapper { padding-top: 82px; padding-bottom: 82px; }
  .banner-section { --banner-h: 84vh; }

  .section-work { padding-bottom: 105px; }
  .section-expertise { padding-top: 70px !important; }

  .scroll-cue { display: none; }
}

@media (max-width: 480px) {
  #main-nav { padding: 16px 20px; }
  .hero-content { padding: 80px 20px 28px; }
  .section { padding-left: 20px; padding-right: 20px; }
  .section-work { padding-left: 20px; padding-right: 20px; }
  .section-expertise { padding-left: 20px; padding-right: 20px; }
  .footer-contact { padding-left: 20px; padding-right: 20px; }
}
