/* ============================================================
   デジスタ (Degista) — Design System
   深緑 × ゴールド / 金印の威厳をクラウドに
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700;900&family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

:root {
  /* Deep green base */
  --green-950: #0A180C;
  --green-900: #0D1F0F;
  --green-800: #14291A;
  --green-700: #1A3320;
  --green-600: #244A30;

  /* Gold */
  --gold: #C9A84C;
  --gold-light: #E8C97A;
  --gold-deep: #A8862F;
  --gold-pale: #F0E2BB;

  /* Neutrals */
  --navy: #1A2B4C;
  --white: #FFFFFF;
  --paper: #FAF7F0;        /* warm washi white for body */
  --paper-2: #F3EEE2;      /* slightly deeper paper */
  --ink: #1C1B16;          /* near-black warm text */
  --ink-soft: #57534A;     /* muted body text */
  --line: #E4DCCB;         /* hairline on paper */
  --line-green: rgba(201, 168, 76, 0.18);

  /* Fonts */
  --serif: 'Noto Serif JP', serif;
  --sans: 'Noto Sans JP', sans-serif;

  /* Foil gradient */
  --foil: linear-gradient(135deg, #B8923A 0%, #E8C97A 28%, #F4E4B0 46%, #C9A84C 62%, #9C7A2C 100%);
  --foil-soft: linear-gradient(135deg, #C9A84C 0%, #E8C97A 55%, #B8923A 100%);

  --shadow-soft: 0 1px 2px rgba(28,27,22,0.04), 0 8px 30px rgba(28,27,22,0.06);
  --shadow-card: 0 2px 4px rgba(28,27,22,0.04), 0 18px 48px rgba(28,27,22,0.10);
  --shadow-deep: 0 30px 80px rgba(10,24,12,0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

::selection { background: var(--gold); color: var(--green-900); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }

/* ---------- Typography helpers ---------- */
.serif { font-family: var(--serif); }
.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: none;
}
.text-foil {
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 920px; margin: 0 auto; padding: 0 32px; }
section { position: relative; }

/* Vertical seal-script tick texture divider */
.rule-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  opacity: 0.5;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 15px; letter-spacing: 0.04em;
  padding: 15px 28px; border-radius: 2px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, color .25s;
  white-space: nowrap;
}
.btn-gold {
  background: var(--foil-soft);
  color: var(--green-900);
  box-shadow: 0 1px 0 rgba(255,255,255,0.35) inset, 0 10px 26px rgba(168,134,47,0.35);
  position: relative;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 16px 36px rgba(168,134,47,0.45); }
.btn-gold:active { transform: translateY(0); }
.btn-outline-gold {
  border: 1px solid var(--gold); color: var(--gold); background: transparent;
}
.btn-outline-gold:hover { background: rgba(201,168,76,0.10); transform: translateY(-2px); }
.btn-dark {
  background: var(--green-800); color: var(--gold-light);
  border: 1px solid var(--line-green);
}
.btn-dark:hover { background: var(--green-700); transform: translateY(-2px); }
.btn-lg { padding: 18px 36px; font-size: 16px; }

/* ============================================================
   Badge — 近日提供予定
   ============================================================ */
.badge-soon {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em;
  padding: 8px 16px 8px 13px; border-radius: 100px;
  border: 1px solid var(--line-green);
  background: rgba(201,168,76,0.08);
  color: var(--gold-light);
  white-space: nowrap;
}
.badge-soon .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 0 0 rgba(232,201,122,0.7);
  animation: pulse 2.4s infinite;
}
.badge-soon.on-light {
  border-color: rgba(168,134,47,0.4);
  background: rgba(201,168,76,0.10);
  color: var(--gold-deep);
}
.badge-soon.on-light .dot { background: var(--gold-deep); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(232,201,122,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(232,201,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,201,122,0); }
}

/* ============================================================
   Reveal-on-scroll
   Content is visible by DEFAULT. The hidden/animated "from" state is
   only armed (body.reveal-armed) by JS once requestAnimationFrame
   confirms the animation clock is alive — so content can never get
   stuck invisible if transitions don't run.
   ============================================================ */
.reveal, .reveal-scale { opacity: 1; transform: none; }

body.reveal-armed .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0ms);
}
body.reveal-armed .reveal.in-view { opacity: 1; transform: none; }
body.reveal-armed .reveal-scale {
  opacity: 0; transform: scale(.94);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0ms);
}
body.reveal-armed .reveal-scale.in-view { opacity: 1; transform: none; }

/* ============================================================
   Seal / 印鑑 motif
   ============================================================ */
.seal {
  position: relative;
  display: grid;
  place-items: center;
}
.seal svg { display: block; overflow: visible; }
.seal .ring-rotate { transform-origin: center; animation: spin 60s linear infinite; }
.seal .ring-rotate-rev { transform-origin: center; animation: spin 90s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
body.no-anim .ring-rotate, body.no-anim .ring-rotate-rev { animation: none; }

.seal-glow {
  position: absolute; inset: -12%;
  background: radial-gradient(circle at center, rgba(232,201,122,0.30), rgba(201,168,76,0.10) 42%, transparent 66%);
  filter: blur(8px);
  z-index: -1;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe { 0%,100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
body.no-anim .seal-glow { animation: none; }

/* 捺印 press animation */
@keyframes stampDrop {
  0%   { transform: translateY(-46px) scale(1.28) rotate(-7deg); opacity: 0; }
  55%  { transform: translateY(0) scale(0.93) rotate(0deg); opacity: 1; }
  70%  { transform: translateY(-4px) scale(1.05) rotate(0deg); }
  85%  { transform: translateY(0) scale(0.99); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.stamp-play { animation: stampDrop .72s cubic-bezier(.2,.8,.2,1) both; }

@keyframes inkSpread {
  0%   { transform: scale(.3); opacity: 0; }
  40%  { opacity: .55; }
  100% { transform: scale(1.5); opacity: 0; }
}
.ink-ripple {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--gold);
  pointer-events: none;
}
.ink-ripple.play { animation: inkSpread .8s ease-out forwards; }

/* impression left behind */
.impression {
  opacity: 0;
  transition: opacity .35s ease;
}
.impression.show { opacity: 1; }
