/* ==========================================================================
   One Code Club — dark × gold redesign
   ========================================================================== */

:root {
  --bg: #0b0a08;
  --bg-2: #121009;
  --surface: rgba(24, 21, 14, 0.72);
  --line: rgba(212, 175, 94, 0.18);
  --line-strong: rgba(212, 175, 94, 0.45);
  --gold: #d4af5e;
  --gold-bright: #f0dfae;
  --gold-deep: #8a713a;
  --ink: #ede5d2;
  --ink-dim: #a89e86;
  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --nav-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-feature-settings: "palt";
  line-height: 2;
  letter-spacing: 0.04em;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #14110a; }

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

/* --- fixed WebGL canvas + film grain ------------------------------------ */

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6%, 4%); }
  40% { transform: translate(4%, -7%); }
  60% { transform: translate(-3%, -3%); }
  80% { transform: translate(6%, 5%); }
}

/* --- intro loader --------------------------------------------------------- */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease 0.15s, visibility 0s 1.1s;
}

.intro__mark {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.5em;
  padding-left: 0.5em;
  color: var(--gold);
  opacity: 0;
  animation: introMark 1.4s ease forwards;
}

@keyframes introMark {
  0% { opacity: 0; letter-spacing: 0.9em; filter: blur(6px); }
  100% { opacity: 1; letter-spacing: 0.5em; filter: blur(0); }
}

body.loaded .intro { opacity: 0; visibility: hidden; }

/* --- navigation ----------------------------------------------------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(11, 10, 8, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav__logo img { width: clamp(180px, 22vw, 260px); }

.nav__links {
  display: flex;
  gap: clamp(18px, 2.6vw, 38px);
  list-style: none;
  align-items: center;
}

.nav__links a {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  position: relative;
  padding: 6px 0;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav__links a:hover { color: var(--gold-bright); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__burger {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  width: 44px;
  height: 40px;
  cursor: pointer;
  position: relative;
  z-index: 60;
}

.nav__burger span,
.nav__burger span::before,
.nav__burger span::after {
  content: "";
  position: absolute;
  left: 11px;
  width: 20px;
  height: 1.5px;
  background: var(--gold);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__burger span { top: 19px; }
.nav__burger span::before { left: 0; top: -6px; }
.nav__burger span::after { left: 0; top: 6px; }

/* --- hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 4vh) clamp(20px, 6vw, 84px) 8vh;
}

.hero__bg-word {
  position: absolute;
  right: -0.06em;
  bottom: 2vh;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(4rem, 13vw, 11rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(212, 175, 94, 0.12);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

.hero__inner { max-width: 980px; }

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: clamp(18px, 3vh, 30px);
}

.hero__kicker::before {
  content: "";
  width: 52px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero__title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.35rem, 4vw, 3.55rem);
  line-height: 1.55;
  letter-spacing: 0.045em;
  margin-bottom: clamp(28px, 5vh, 44px);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.65);
}

.hero__title .tl { display: inline-block; }  /* wrap between phrases, never inside */

.gold {
  background: linear-gradient(115deg, #f5e6bd 0%, var(--gold) 38%, #b28c40 62%, #f0dfae 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.hero__scroll {
  position: absolute;
  left: clamp(24px, 6vw, 84px);
  bottom: 4vh;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  color: var(--ink-dim);
}

.hero__scroll::after {
  content: "";
  width: 64px;
  height: 1px;
  background: var(--line-strong);
  transform-origin: left;
  animation: scrollLine 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollLine {
  0% { transform: scaleX(0); transform-origin: left; }
  45% { transform: scaleX(1); transform-origin: left; }
  55% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* hero load-in */
.reveal-load {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s);
}

body.loaded .reveal-load { opacity: 1; transform: none; }

/* --- buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid var(--gold);
  position: relative;
  overflow: hidden;
  transition: color 0.35s ease, border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.btn--gold {
  background: linear-gradient(115deg, #e8d193, var(--gold) 55%, #c29a4b);
  color: #191408;
  border-color: transparent;
}

.btn--gold::before {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn--gold:hover::before { left: 130%; }
.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(212, 175, 94, 0.28);
  color: #191408;
}

.btn--ghost { background: transparent; color: var(--gold); }
.btn--ghost:hover {
  color: #191408;
  background: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 10px 34px rgba(212, 175, 94, 0.22);
}

.js-copy-mail { min-width: 250px; justify-content: center; }

.mail-hint {
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.mail-hint a { color: var(--ink-dim); }
.mail-hint a:hover { color: var(--gold-bright); }

.link-arrow {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  transition: color 0.3s ease;
}

.link-arrow:hover { color: var(--gold-bright); }

/* --- marquee ----------------------------------------------------------------- */

.marquee {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 14px 0;
  background: rgba(11, 10, 8, 0.55);
}

.marquee__track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee__track span {
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.34em;
  color: rgba(212, 175, 94, 0.6);
  white-space: nowrap;
  padding-right: 0.34em;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* --- sections ------------------------------------------------------------------ */

.section {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(90px, 14vh, 150px) clamp(20px, 5vw, 48px) 0;
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: clamp(24px, 4vh, 40px);
}

.section__no {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.section__label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

.section__head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
  align-self: center;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin-bottom: clamp(28px, 4vh, 44px);
}

.section p { color: var(--ink); }
.section p b, .section p strong { color: var(--gold-bright); font-weight: 700; }

.lead { max-width: 780px; color: var(--ink); }

.subhead {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 10px;
}

/* two-column layouts */
.cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.cols--text-top { align-items: start; }

/* gold-cornered image frame */
.frame {
  position: relative;
  padding: 14px;
}

.frame img {
  width: 100%;
  border-radius: 2px;
  filter: saturate(0.92);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 46px;
  height: 46px;
  pointer-events: none;
}

.frame::before {
  top: 0;
  left: 0;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.frame::after {
  bottom: 0;
  right: 0;
  border-bottom: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
}

/* status card (募集中) */
.status-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(28px, 4vw, 44px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: #191408;
  background: linear-gradient(115deg, #e8d193, var(--gold));
  padding: 7px 18px 7px 20px;
  border-radius: 2px;
  margin-bottom: 18px;
  animation: badgePulse 2.8s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 94, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(212, 175, 94, 0); }
}

.status-card__term {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 22px;
}

.status-card__kcc {
  display: inline-block;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.status-card__kcc:hover { border-color: var(--line-strong); background: rgba(212, 175, 94, 0.06); }
.status-card__kcc img { width: 210px; }

/* Q&A text blocks */
.qa { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px); margin-top: clamp(40px, 6vh, 64px); }
.qa p { font-size: 0.95rem; color: var(--ink); }

/* --- tilt cards ------------------------------------------------------------------ */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
  margin-top: clamp(36px, 5vh, 56px);
  perspective: 1200px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(28px, 3vw, 40px) clamp(24px, 2.6vw, 34px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 50%), rgba(212, 175, 94, 0.13), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover { border-color: var(--line-strong); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45); }
.card:hover::after { opacity: 1; }

.card__no {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  margin-bottom: 20px;
  transform: translateZ(30px);
}

.card h3 {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  transform: translateZ(24px);
}

.card p {
  font-size: 0.88rem;
  line-height: 2;
  color: var(--ink-dim);
  transform: translateZ(12px);
}

/* --- english section accent -------------------------------------------------------- */

.section--en .section__label { color: var(--gold); }

.en-note {
  font-family: var(--serif);
  font-style: normal;
  color: var(--ink-dim);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  margin-top: -20px;
  margin-bottom: 30px;
}

/* --- contact -------------------------------------------------------------------------- */

.section--contact {
  text-align: center;
  padding-bottom: clamp(90px, 14vh, 150px);
}

.contact__mail {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.4rem, 4.6vw, 3.2rem);
  letter-spacing: 0.06em;
  margin: clamp(18px, 3vh, 30px) 0 clamp(28px, 4vh, 40px);
  color: var(--ink);
  position: relative;
}

.contact__mail::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0.4);
  opacity: 0.6;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.contact__mail:hover { color: var(--gold-bright); }
.contact__mail:hover::after { transform: scaleX(1); opacity: 1; }

/* --- footer ------------------------------------------------------------------------------ */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: rgba(11, 10, 8, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: clamp(56px, 8vh, 84px) clamp(20px, 5vw, 48px) 36px;
}

.footer__inner { max-width: 1180px; margin: 0 auto; }

.footer h4 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 18px;
}

.footer p {
  max-width: 640px;
  font-size: 0.88rem;
  color: var(--ink-dim);
  margin-bottom: 14px;
}

.footer__logo img { width: 220px; margin-bottom: 28px; }

.footer__copy {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(212, 175, 94, 0.1);
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: rgba(168, 158, 134, 0.7);
}

/* --- scroll reveal ---------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(46px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s);
}

.reveal.in-view { opacity: 1; transform: none; }

/* --- scrollbar --------------------------------------------------------------------------- */

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2e2817; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* --- responsive ---------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .cols, .qa, .cards { grid-template-columns: 1fr; }
  .cols > .frame { order: -1; }
  .hero__bg-word { font-size: 17vw; bottom: 10vh; }
}

@media (max-width: 760px) {
  .nav__links {
    position: fixed;
    inset: 0;
    background: rgba(11, 10, 8, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    flex-direction: column;
    justify-content: center;
    gap: 34px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  }

  .nav__links a { font-size: 1.05rem; }

  .nav.open .nav__links { transform: none; opacity: 1; }
  .nav.open .nav__burger span { background: transparent; }
  .nav.open .nav__burger span::before { transform: translateY(6px) rotate(45deg); }
  .nav.open .nav__burger span::after { transform: translateY(-6px) rotate(-45deg); }

  .nav__burger { display: block; }
  .pc { display: none; }

  .hero__kicker { font-size: 0.72rem; letter-spacing: 0.14em; }
  .hero__kicker::before { display: none; }
}

/* --- reduced motion --------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .grain,
  .marquee__track,
  .badge,
  .hero__scroll::after,
  .intro__mark { animation: none; }

  .reveal,
  .reveal-load {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .intro { transition: none; }
  body.loaded .intro { display: none; }
}
