/* SafeSet — Design System v5 (Clean & Trustworthy) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

:root {
  /* Brand */
  --c-primary:      #7c3aed;
  --c-primary-dark: #6d28d9;
  --c-purple:       #a78bfa;

  /* Backgrounds — clean & neutral */
  --c-bg:      #fafafa;
  --c-bg1:     #f5f3ff;
  --c-bg2:     #ede9fe;
  --c-surface: #ffffff;
  --c-surface2:#fdfcff;

  /* Borders */
  --c-border:  #e2e8f0;
  --c-border2: #cbd5e1;

  /* Text — strong hierarchy */
  --c-text:  #0d0b18;
  --c-text2: #475569;
  --c-muted: #94a3b8;

  /* Semantic */
  --c-green:  #059669;
  --c-yellow: #d97706;
  --c-red:    #7c3aed;
  --c-err:    #dc2626;

  /* Gradients */
  --grad:      linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,58,237,.09), rgba(14,165,233,.09));
  --grad-hero: linear-gradient(160deg, #f0f9ff 0%, #eff6ff 55%, #f8fafc 100%);

  /* Shadows — neutral depth */
  --shadow-xs: 0 1px 3px rgba(10,8,20,.05), 0 1px 2px rgba(10,8,20,.04);
  --shadow-sm: 0 2px 8px rgba(10,8,20,.07), 0 1px 3px rgba(10,8,20,.05);
  --shadow:    0 4px 20px rgba(10,8,20,.09), 0 2px 6px rgba(10,8,20,.05);
  --shadow-lg: 0 12px 48px rgba(10,8,20,.13), 0 4px 12px rgba(10,8,20,.07);

  /* Radii */
  --r:  10px;
  --r2: 16px;
  --r3: 24px;

  /* Typography */
  --font: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --mono: 'SF Mono', 'Fira Code', monospace;
}

/* ─── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: 60px;
}
a { color: var(--c-primary); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }
img { display: block; max-width: 100%; }

/* ════════════════════════════════════════
   NAV
════════════════════════════════════════ */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  height: 60px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--c-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: box-shadow .3s;
}
nav.scrolled { box-shadow: 0 2px 16px rgba(10,8,20,.08); }
.logo {
  font-size: 1.3rem; font-weight: 900; letter-spacing: -.03em;
  display: flex; align-items: center; gap: .45rem; text-decoration: none;
}
.logo-text { color: var(--c-text); }
.logo-text span { color: var(--c-primary); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links > a:not(.btn-primary) {
  color: var(--c-text2); font-size: .875rem; font-weight: 500;
  transition: color .18s;
}
.nav-links > a:not(.btn-primary):hover { color: var(--c-text); }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero {
  min-height: 100svh;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
  padding: 8rem 2.5rem 5rem;
  background: var(--grad-hero);
  margin-top: -60px;
}

/* Soft gradient orbs */
.orb {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(90px); opacity: .5;
  animation: orb-drift 16s ease-in-out infinite;
}
.orb-a {
  width: 600px; height: 600px; top: -200px; right: -120px;
  background: radial-gradient(circle, rgba(124,58,237,.16), transparent 65%);
}
.orb-b {
  width: 450px; height: 450px; bottom: -120px; left: -100px;
  background: radial-gradient(circle, rgba(14,165,233,.13), transparent 65%);
  animation-delay: -6s; animation-direction: reverse;
}
.orb-c {
  width: 320px; height: 320px; top: 45%; left: 42%;
  background: radial-gradient(circle, rgba(99,102,241,.09), transparent 65%);
  animation-delay: -3s;
}
@keyframes orb-drift {
  0%,100% { transform: translate(0,0); }
  50%      { transform: translate(28px,-36px); }
}

.hero-inner {
  position: relative; width: 100%; max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}

/* ── Hero visual (mock contract card) ─────────────── */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.mock-frame {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  width: 300px; overflow: hidden;
  transform: perspective(1000px) rotateY(-6deg) rotateX(2deg);
  transition: transform .5s ease;
  animation: rise .8s .35s ease both;
}
.mock-frame:hover { transform: perspective(1000px) rotateY(-2deg) rotateX(1deg); }
.mock-top-bar {
  background: #f5f4f8; padding: .55rem .9rem;
  display: flex; align-items: center; gap: .35rem;
  border-bottom: 1px solid var(--c-border);
}
.mock-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.mock-dot.red    { background: #fe5f57; }
.mock-dot.yellow { background: #febc2e; }
.mock-dot.green  { background: #28c840; }
.mock-url {
  margin-left: .3rem; font-size: .63rem; color: var(--c-muted);
  background: var(--c-bg2); padding: .1rem .5rem; border-radius: 100px;
  border: 1px solid var(--c-border);
}
.mock-content { padding: 1.1rem; }
.mock-section-title {
  font-size: .65rem; font-weight: 700; color: var(--c-primary);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: .875rem;
}
.mock-contract-row {
  display: flex; align-items: center; gap: .45rem;
  padding: .4rem .55rem; border-radius: 8px;
  font-size: .75rem; color: var(--c-text2);
  margin-bottom: .35rem;
  background: var(--c-bg1); border: 1px solid var(--c-border);
}
.mock-contract-row.done { color: var(--c-green); background: #f0fdf4; border-color: #bbf7d0; }
.mock-seal {
  margin-top: .75rem; padding: .4rem;
  text-align: center; font-size: .63rem; color: var(--c-muted);
  border-top: 1px solid var(--c-border);
}
.mock-sign-btn {
  background: var(--grad); color: #fff; border-radius: 100px;
  padding: .55rem; text-align: center; font-size: .78rem; font-weight: 700;
  margin-top: .625rem;
}

/* Hero text area */
.hero-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .375rem 1rem; border-radius: 100px;
  border: 1px solid rgba(124,58,237,.22);
  background: rgba(124,58,237,.07);
  color: var(--c-primary-dark); font-size: .73rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 1.75rem;
  animation: rise .5s ease both;
}
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 900; letter-spacing: -.04em; line-height: 1.06;
  color: var(--c-text); margin-bottom: 1.5rem;
  animation: rise .55s .1s ease both;
}
.hero h1 em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
#tw { border-right: 2px solid rgba(124,58,237,.4); padding-right: 2px; }
#tw.done { animation: caret 1s step-end infinite; }
@keyframes caret { 50% { border-color: transparent; } }

.hero-desc {
  max-width: 490px; color: var(--c-text2); font-size: 1.025rem;
  line-height: 1.8; margin-bottom: 2.5rem;
  animation: rise .55s .2s ease both;
}
.hero-cta { display: flex; gap: .875rem; flex-wrap: wrap; animation: rise .55s .3s ease both; }

.hero-numbers {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin-top: 3.5rem; padding-top: 2rem;
  border-top: 1px solid rgba(10,8,20,.08);
  animation: rise .55s .45s ease both;
}
.hero-numbers > div {
  padding: 0 1.25rem;
  border-right: 1px solid rgba(10,8,20,.08);
}
.hero-numbers > div:first-child { padding-left: 0; }
.hero-numbers > div:last-child  { border-right: none; }
.n-val {
  font-size: 2.75rem; font-weight: 900; letter-spacing: -.05em; line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  display: block; margin-bottom: .35rem;
}
.n-label {
  font-size: .775rem; color: var(--c-muted); font-weight: 500;
  letter-spacing: .01em; line-height: 1.45; display: block;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.page-enter { animation: fade-in .3s ease; }

/* ════════════════════════════════════════
   SCROLL REVEAL
════════════════════════════════════════ */
.fade { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease; }
.fade.in { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .07s } .d2 { transition-delay: .14s }
.d3 { transition-delay: .21s } .d4 { transition-delay: .28s } .d5 { transition-delay: .35s }

/* ════════════════════════════════════════
   TRUST BAR
════════════════════════════════════════ */
.trust-bar {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 1rem 2rem;
}
.trust-bar-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: .5rem 2rem;
}
.trust-item {
  display: inline-flex; align-items: center;
  font-size: .82rem; color: var(--c-text2); font-weight: 500;
  white-space: nowrap; padding: .3rem 0;
}
@media (max-width: 700px) {
  .trust-bar { padding: .875rem 1.25rem; }
  .trust-bar-inner { gap: .4rem 1.25rem; justify-content: flex-start; }
  .trust-item { font-size: .75rem; }
}

/* ════════════════════════════════════════
   SECTION WRAPPER
════════════════════════════════════════ */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 2.5rem; }
.section { padding: 6rem 0; }
.section-alt { background: var(--c-surface); }

.section-label {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--c-primary); margin-bottom: .75rem;
}
.section-label::before {
  content: ""; display: block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--c-primary); flex-shrink: 0;
}
.section-h {
  font-size: clamp(2rem, 3vw, 2.75rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.2; margin-bottom: .875rem;
  color: var(--c-text);
}
.section-h-sm {
  font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.22; margin-bottom: .75rem;
  color: var(--c-text);
}
.section-sub {
  color: var(--c-text2); font-size: .9375rem;
  line-height: 1.8; margin-bottom: 2.75rem; max-width: 640px;
}

/* ════════════════════════════════════════
   FEATURE GRID
════════════════════════════════════════ */
.feat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem;
}
.feat-card {
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r2); padding: 2rem;
  box-shadow: var(--shadow-xs);
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.feat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124,58,237,.35);
  box-shadow: var(--shadow), 0 0 0 4px rgba(124,58,237,.06);
}
.feat-icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--grad-soft); display: grid; place-items: center;
  font-size: 1.7rem; margin-bottom: 1.25rem;
  border: 1px solid rgba(124,58,237,.12);
}
.feat-card h3 { font-size: 1.0rem; font-weight: 700; margin-bottom: .5rem; color: var(--c-text); letter-spacing: -.01em; }
.feat-card p  { color: var(--c-text2); font-size: .875rem; line-height: 1.7; }

/* ════════════════════════════════════════
   CASTING CARDS
════════════════════════════════════════ */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.5rem;
}
.card-item {
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r2); overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.card-item:hover {
  transform: translateY(-4px);
  border-color: var(--c-border2);
  box-shadow: var(--shadow);
}
.card-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: center; background: var(--c-bg2); }
.card-item .card-body { padding: 1.375rem; }
.card-meta {
  color: var(--c-muted); font-size: .75rem; margin-bottom: .625rem;
  display: flex; gap: .4rem; align-items: center; flex-wrap: wrap;
}
.card-item h3 { font-size: .9375rem; font-weight: 700; line-height: 1.45; margin-bottom: .5rem; }
.card-item h3 a { color: var(--c-text); transition: color .18s; }
.card-item h3 a:hover { color: var(--c-primary); }
.card-desc { color: var(--c-text2); font-size: .8125rem; line-height: 1.65; }
.card-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--c-border);
}
.tag-pay {
  background: rgba(124,58,237,.08); color: #b01445;
  font-size: .73rem; font-weight: 700; padding: .25rem .7rem;
  border-radius: 100px; border: 1px solid rgba(124,58,237,.18);
}
.tag-kyc {
  background: rgba(5,150,105,.07); color: #047857;
  font-size: .73rem; font-weight: 600; padding: .25rem .7rem;
  border-radius: 100px; border: 1px solid rgba(5,150,105,.18);
}
.card-apps { color: var(--c-muted); font-size: .73rem; }

/* ════════════════════════════════════════
   PROFILE CARDS
════════════════════════════════════════ */
.profile-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 240px));
  gap: 1.375rem; justify-content: center;
}
.profile-card {
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r2); overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.profile-card:hover { transform: translateY(-5px); border-color: var(--c-border2); box-shadow: var(--shadow); }
.profile-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: top; }
.profile-card-body { padding: 1rem 1.125rem; text-align: center; }
.profile-name { font-weight: 700; font-size: .9rem; margin-bottom: .25rem; color: var(--c-text); }
.profile-meta { color: var(--c-muted); font-size: .75rem; }
.profile-ok {
  display: inline-flex; align-items: center; gap: .25rem;
  color: var(--c-green); font-size: .7rem; font-weight: 600; margin-top: .5rem;
}

/* ════════════════════════════════════════
   STEPS — with connecting line
════════════════════════════════════════ */
.steps {
  display: flex; flex-direction: column; gap: 0;
  max-width: 600px; margin: 0 auto;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute; left: 15px; top: 16px; bottom: 16px;
  width: 2px; background: linear-gradient(to bottom, var(--c-primary), rgba(14,165,233,.3));
  border-radius: 2px;
}
.step {
  display: flex; gap: 1.5rem; align-items: flex-start;
  padding: 1.625rem 0; position: relative;
}
.step:not(:last-child) { border-bottom: 1px dashed var(--c-border); }
.step-num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--grad); display: grid; place-items: center;
  font-size: .8rem; font-weight: 800; color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.3);
  position: relative; z-index: 1;
}
.step-body { flex: 1; padding-top: .1rem; }
.step-body strong { font-size: 1rem; font-weight: 700; display: block; margin-bottom: .35rem; color: var(--c-text); }
.step-body p { color: var(--c-text2); font-size: .875rem; line-height: 1.7; }

/* ════════════════════════════════════════
   BUTTONS
════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.75rem; border-radius: 100px; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-weight: 700; font-size: .9rem;
  box-shadow: 0 4px 20px rgba(124,58,237,.3);
  transition: transform .18s, box-shadow .18s, opacity .18s;
  letter-spacing: -.01em;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124,58,237,.42); opacity: .97; color: #fff; }
.btn-primary.lg { padding: .9rem 2.25rem; font-size: .975rem; }
.btn-primary.sm { padding: .4rem .9rem; font-size: .78rem; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.75rem; border-radius: 100px; cursor: pointer;
  background: rgba(255,255,255,.7); border: 1.5px solid var(--c-border2);
  color: var(--c-text2); font-weight: 600; font-size: .9rem;
  transition: border-color .18s, color .18s, background .18s;
}
.btn-ghost:hover { border-color: var(--c-primary); color: var(--c-primary); background: rgba(124,58,237,.04); }
.btn-ghost.lg { padding: .9rem 2.25rem; font-size: .975rem; }

.btn-danger { background: #dc2626; color: #fff; padding: .4rem .9rem; border: none; border-radius: 100px; cursor: pointer; font-size: .8125rem; font-weight: 600; }
.btn-sm { padding: .3rem .75rem; font-size: .78rem; border-radius: 100px; cursor: pointer; border: 1.5px solid var(--c-border2); background: var(--c-surface); color: var(--c-text2); transition: border-color .18s, color .18s; }
.btn-sm:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-text { background: none; border: none; color: var(--c-muted); cursor: pointer; }

/* Loading state on buttons */
.btn-primary[data-loading],
.btn-ghost[data-loading] { opacity: .6; cursor: not-allowed; pointer-events: none; }
.btn-primary[data-loading]::after,
.btn-ghost[data-loading]::after {
  content: ""; display: inline-block; width: .9em; height: .9em;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: btn-spin .65s linear infinite;
  margin-left: .5rem; vertical-align: -.1em;
}
.btn-ghost[data-loading]::after {
  border: 2px solid rgba(100,80,160,.22); border-top-color: var(--c-primary);
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════
   FORMS & INPUTS
════════════════════════════════════════ */
main { max-width: 1100px; margin: 0 auto; padding: 3rem 2rem 5rem; }
form { max-width: 480px; }
.form-card {
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r3); padding: 2.5rem; box-shadow: var(--shadow-sm);
}
.form-card-elevated {
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r3); padding: 2.5rem; box-shadow: var(--shadow);
}
.form-h { font-size: 1.6rem; font-weight: 800; letter-spacing: -.025em; margin-bottom: .4rem; color: var(--c-text); }
.form-sub { color: var(--c-text2); font-size: .875rem; margin-bottom: 2rem; line-height: 1.65; }

label { display: block; margin-bottom: 1.1rem; font-size: .8125rem; color: var(--c-text2); font-weight: 500; }
input, textarea, select {
  display: block; width: 100%; margin-top: .35rem;
  background: var(--c-bg1); border: 1.5px solid var(--c-border2);
  border-radius: var(--r); color: var(--c-text);
  padding: .75rem 1rem; font-size: .9125rem; font-family: var(--font);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,.11);
  background: var(--c-surface);
}
textarea { resize: vertical; }
.form-hint { font-size: .75rem; color: var(--c-muted); margin-top: .3rem; line-height: 1.5; }
.form-error-msg { font-size: .75rem; color: var(--c-err); margin-top: .3rem; }

/* ════════════════════════════════════════
   ALERTS / BANNERS / BADGES
════════════════════════════════════════ */
.alert {
  display: flex; align-items: flex-start; gap: .625rem;
  padding: .875rem 1.125rem; border-radius: var(--r);
  font-size: .8125rem; line-height: 1.65; margin-bottom: 1rem;
}
.alert-info  { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-warn  { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-ok    { background: #f0fdf4; border: 1px solid #bbf7d0; color: #065f46; }

.banner { padding: .875rem 1.125rem; border-radius: var(--r); margin-bottom: 1rem; font-size: .875rem; }
.banner.warn  { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.banner.info  { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.banner.ok    { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.banner.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.badge {
  display: inline-flex; align-items: center; font-size: .7rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 100px;
  background: var(--c-bg2); color: var(--c-text2); border: 1px solid var(--c-border);
}
.badge.ok     { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.badge.error  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge.warn   { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-warn   { background: #fef9ec; color: #92400e; border: 1px solid #fde68a; }
.badge-error  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ════════════════════════════════════════
   TABLE
════════════════════════════════════════ */
table { width: 100%; border-collapse: collapse; }
th, td { padding: .875rem 1rem; text-align: left; border-bottom: 1px solid var(--c-border); font-size: .8125rem; }
th { color: var(--c-muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; background: var(--c-bg1); }
tr:hover td { background: var(--c-bg1); }

/* ════════════════════════════════════════
   STAT / MENU CARDS
════════════════════════════════════════ */
.stat-card {
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r2); padding: 1.375rem 1.625rem;
  box-shadow: var(--shadow-xs);
}
.stat-label { font-size: .72rem; color: var(--c-muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .4rem; }
.stat-val { font-size: 2rem; font-weight: 800; letter-spacing: -.04em; color: var(--c-text); }

.menu-card {
  display: block; background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r2); padding: 1.5rem;
  text-decoration: none; color: var(--c-text);
  box-shadow: var(--shadow-xs);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.menu-card:hover { transform: translateY(-4px); border-color: rgba(124,58,237,.3); box-shadow: var(--shadow); color: var(--c-text); }

/* ════════════════════════════════════════
   MYPAGE
════════════════════════════════════════ */
.mypage-nav {
  display: flex; gap: 0; border-bottom: 2px solid var(--c-border);
  margin-bottom: 2rem; overflow-x: auto;
  scrollbar-width: none;
}
.mypage-nav::-webkit-scrollbar { display: none; }
.mypage-nav a {
  color: var(--c-muted); padding: .6rem .95rem; font-size: .8125rem; font-weight: 500;
  white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color .18s, border-color .18s;
}
.mypage-nav a:hover { color: var(--c-text); border-bottom-color: var(--c-border2); }
.mypage-nav a.active { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 600; }
@media (max-width: 640px) {
  .mypage-nav { margin-bottom: 1.5rem; }
  .mypage-nav a { padding: .45rem .65rem; font-size: .775rem; }
}

/* ════════════════════════════════════════
   MESSAGES / CHAT
════════════════════════════════════════ */
.bubble { max-width: 72%; padding: .75rem 1rem; border-radius: 14px; font-size: .875rem; line-height: 1.55; }
.bubble.mine   { align-self: flex-end;   background: var(--grad); color: #fff; border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start; background: var(--c-bg1); border: 1px solid var(--c-border); border-bottom-left-radius: 4px; }
.bubble small  { display: block; font-size: .68rem; margin-top: .25rem; opacity: .7; }

.chat-container {
  display: flex; flex-direction: column;
  height: calc(100vh - 200px); min-height: 480px;
}
.chat-header {
  display: flex; align-items: center; gap: .875rem;
  padding: .75rem 0 1rem;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}
.chat-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: #fff; flex-shrink: 0;
}
.chat-header-name { font-weight: 700; font-size: 1rem; }
.chat-header-sub  { font-size: .72rem; color: var(--c-muted); margin-top: .05rem; }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem 0;
  display: flex; flex-direction: column; gap: .375rem;
  scroll-behavior: smooth;
}
.msg-date-sep { text-align: center; position: relative; margin: .75rem 0; }
.msg-date-sep span {
  font-size: .68rem; color: var(--c-muted);
  background: var(--c-bg); padding: .15rem .75rem;
  position: relative; z-index: 1; border-radius: 100px;
}
.msg-date-sep::before {
  content: ""; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--c-border);
}
.msg-row { display: flex; flex-direction: column; max-width: 70%; }
.msg-row.mine   { align-self: flex-end;   align-items: flex-end; }
.msg-row.theirs { align-self: flex-start; align-items: flex-start; }
.msg-body {
  padding: .65rem 1rem; border-radius: 1.25rem;
  font-size: .875rem; line-height: 1.55; word-break: break-word;
}
.msg-row.mine .msg-body { background: var(--grad); color: #fff; border-bottom-right-radius: .3rem; box-shadow: 0 2px 10px rgba(124,58,237,.2); }
.msg-row.theirs .msg-body { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-bottom-left-radius: .3rem; }
.msg-time { font-size: .63rem; color: var(--c-muted); margin-top: .2rem; padding: 0 .2rem; }
.chat-composer {
  flex-shrink: 0; padding: .875rem 0 0;
  border-top: 1px solid var(--c-border);
  display: flex; gap: .75rem; align-items: flex-end;
}
.chat-composer textarea { flex: 1; resize: none; margin: 0; border-radius: var(--r2); min-height: 44px; max-height: 120px; padding: .65rem 1rem; line-height: 1.5; }
.chat-send-btn { flex-shrink: 0; align-self: flex-end; height: 44px; padding: 0 1.25rem; border-radius: var(--r2); }

/* Inbox */
.inbox-list { border: 1.5px solid var(--c-border); border-radius: var(--r2); overflow: hidden; background: var(--c-surface); }
.inbox-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--c-border);
  text-decoration: none; color: var(--c-text); transition: background .15s;
}
.inbox-item:last-child { border-bottom: none; }
.inbox-item:hover { background: var(--c-bg1); }
.inbox-item.unread { background: rgba(124,58,237,.025); }
.inbox-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; color: #fff; flex-shrink: 0; }
.inbox-content { flex: 1; min-width: 0; }
.inbox-top { display: flex; justify-content: space-between; align-items: center; }
.inbox-name { font-weight: 600; font-size: .9375rem; }
.inbox-meta { display: flex; align-items: center; gap: .5rem; }
.inbox-time { font-size: .7rem; color: var(--c-muted); }
.inbox-unread-badge { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); flex-shrink: 0; }
.inbox-preview { font-size: .8125rem; color: var(--c-muted); margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ════════════════════════════════════════
   PAGE HEADER
════════════════════════════════════════ */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.page-header h1 { font-size: 1.875rem; font-weight: 800; letter-spacing: -.025em; color: var(--c-text); }
.success { color: var(--c-green); font-weight: 500; }
.review { background: var(--c-surface); border: 1.5px solid var(--c-border); border-radius: var(--r2); padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow-xs); }

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
footer {
  padding: 4rem 2.5rem 2rem;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  margin-top: 6rem;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-logo { font-size: 1.3rem; font-weight: 900; letter-spacing: -.03em; margin-bottom: .5rem; }
.footer-logo-text { color: var(--c-text); }
.footer-logo-text span { color: var(--c-primary); }
footer a { color: var(--c-muted); transition: color .18s; }
footer a:hover { color: var(--c-text2); }
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2.5rem; margin-bottom: 2.5rem;
}
.footer-col h4, .footer-col-title {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--c-text2);
  margin-bottom: .875rem;
}
.footer-col a { display: block; font-size: .8125rem; color: var(--c-muted); padding: .25rem 0; }
.footer-col a:hover { color: var(--c-text2); }
.footer-bottom {
  border-top: 1px solid var(--c-border); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem;
  justify-content: space-between; align-items: center;
}
.footer-trust {
  display: flex; flex-wrap: wrap; gap: 1rem;
  font-size: .72rem; color: var(--c-muted);
}
.footer-trust-item { display: flex; align-items: center; gap: .3rem; }
.footer-copy { font-size: .72rem; color: var(--c-muted); }
@media (max-width: 600px) {
  footer { padding: 3rem 1.25rem 2rem; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ════════════════════════════════════════
   SCROLLBAR
════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-border2); border-radius: 3px; }

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none !important; }
}
@media (max-width: 900px) {
  .hero-numbers { grid-template-columns: repeat(2, 1fr); gap: 1rem 0; }
  .hero-numbers > div { padding: .875rem; border-right: none !important; }
  .hero-numbers > div:nth-child(odd) { border-right: 1px solid rgba(10,8,20,.08) !important; }
  .steps::before { left: 15px; }
}
@media (max-width: 768px) {
  nav { padding: 0 1.25rem; gap: .5rem; }
  .hero { padding: 5.5rem 1.25rem 3.5rem; }
  .wrap { padding: 0 1.25rem; }
  .section { padding: 4rem 0; }
  .form-card { padding: 1.75rem; }
  main { padding: 2rem 1rem 4rem; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 2.6rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta > * { width: 100%; text-align: center; }
  .card-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: repeat(2, 1fr); }
  .sm-hide { display: none; }
}

/* Hamburger — mobile only */
.nav-hamburger { display: none; }
@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr !important; }
  .nav-hamburger {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 40px; height: 40px; cursor: pointer; background: none; border: none;
    padding: 6px; border-radius: var(--r); transition: background .15s;
  }
  .nav-hamburger:hover { background: var(--c-bg1); }
  .nav-hamburger span {
    display: block; width: 20px; height: 2px; background: var(--c-text); border-radius: 2px;
    transition: transform .25s, opacity .25s;
  }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    display: none; position: fixed; inset: 60px 0 auto 0; z-index: 190;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--c-surface); border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow); padding: .5rem 1.25rem 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links > a, .nav-links > form { padding: .65rem 0; border-bottom: 1px solid var(--c-border); }
  .nav-links > a:last-child, .nav-links > form:last-child { border-bottom: none; }
  .nav-links > a:not(.btn-primary) { font-size: .9375rem; color: var(--c-text); }
  .nav-links > a.btn-primary { display: block; text-align: center; margin-top: .5rem; border-radius: var(--r); padding: .65rem 1rem; }
  form { max-width: 100% !important; }
  .form-card { padding: 1.25rem; }
  .page-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .page-header h1 { font-size: 1.5rem; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 540px; }
  .bubble { max-width: 88%; }
  .section { padding: 3rem 0; }
  main { padding: 1.5rem .875rem 3rem; }
  .chat-container { height: calc(100vh - 180px); min-height: 350px; }
  .msg-row { max-width: 85%; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
}
/* Tablet: card-grid 2 columns */
@media (min-width: 641px) and (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════
   DASHBOARD / QUICK ACTIONS
════════════════════════════════════════ */
.dash-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.dash-card {
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r2); padding: 1.375rem;
  box-shadow: var(--shadow-xs);
}
.dash-card-label { font-size: .68rem; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: .5rem; }
.dash-card-val   { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; color: var(--c-text); }
.dash-card-sub   { font-size: .72rem; color: var(--c-muted); margin-top: .2rem; }

.quick-actions {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.quick-action {
  display: flex; align-items: center; gap: .875rem;
  background: var(--c-surface); border: 1.5px solid var(--c-border);
  border-radius: var(--r2); padding: 1rem 1.25rem;
  text-decoration: none; color: var(--c-text);
  transition: border-color .18s, box-shadow .18s;
}
.quick-action:hover { border-color: rgba(124,58,237,.3); box-shadow: var(--shadow-sm); color: var(--c-text); }
.quick-action-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--grad-soft); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.quick-action-label { font-weight: 600; font-size: .875rem; }
.quick-action-sub   { font-size: .72rem; color: var(--c-muted); margin-top: .05rem; }

/* ════════════════════════════════════════
   CASTING DETAIL LAYOUT
════════════════════════════════════════ */
.casting-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.casting-sticky { position: sticky; top: 74px; }
@media (max-width: 860px) { .casting-layout { grid-template-columns: 1fr; } .casting-sticky { position: static; } }
@media (max-width: 640px) { .casting-layout { gap: 1.5rem; } }

/* ════════════════════════════════════════
   APPLICATION FLOW / TIMELINE
════════════════════════════════════════ */
.flow-timeline {
  margin-bottom: 2rem; padding: 1.25rem;
  background: var(--c-surface);
  border: 1.5px solid var(--c-border); border-radius: var(--r2);
}
.flow-step-active { font-weight: 700; color: var(--c-primary); }

/* ════════════════════════════════════════
   TAGS / PILLS
════════════════════════════════════════ */
.tag-pill {
  display: inline-flex; align-items: center;
  padding: .2rem .65rem; border-radius: 100px;
  font-size: .72rem; font-weight: 600;
  background: var(--c-bg2); color: var(--c-text2);
  border: 1px solid var(--c-border); white-space: nowrap;
}
.tag-pill.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.unread-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--c-primary); color: #fff;
  border-radius: 100px; font-size: .65rem; font-weight: 700; margin-left: .4rem;
}

/* ════════════════════════════════════════
   LEGAL PAGE STYLES
════════════════════════════════════════ */
.legal-updated {
  margin-top: 3rem; padding-top: 1rem;
  border-top: 1px solid var(--c-border);
  font-size: .75rem; color: var(--c-muted);
}
.legal-note {
  background: var(--c-bg1);
  border-left: 3px solid var(--c-primary);
  padding: .875rem 1.125rem;
  border-radius: 0 var(--r) var(--r) 0;
  font-size: .8125rem; line-height: 1.72;
  margin: 1rem 0; color: var(--c-text2);
}

/* ════════════════════════════════════════
   EMPTY STATES
════════════════════════════════════════ */
.empty-state { text-align: center; padding: 4rem 1.5rem; color: var(--c-muted); }
.empty-state-icon  { font-size: 3rem; margin-bottom: 1rem; display: block; }
.empty-state-title { font-size: 1.125rem; font-weight: 700; color: var(--c-text2); margin-bottom: .5rem; }
.empty-state-desc  { font-size: .875rem; line-height: 1.72; margin-bottom: 1.75rem; }

/* ════════════════════════════════════════
   MISC UTILITIES
════════════════════════════════════════ */
.divider { border: none; border-top: 1px solid var(--c-border); margin: 1.5rem 0; }
.skeleton {
  background: linear-gradient(90deg, var(--c-bg1) 25%, var(--c-bg2) 50%, var(--c-bg1) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--r);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Focus visible */
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* Word break */
.bubble, p, h1, h2, h3 { word-break: break-word; overflow-wrap: break-word; }

/* Section CTA center block */
.section-cta { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: .875rem; }
.section-cta.center { justify-content: center; }
