/* ============================================================
   SUDONE landing — "Tactile Scanner / Friendly Fintech"
   Aesthetic thesis: the whole page reads like SUDONE's scan
   viewport — teal scan-brackets, a slow scan-line sweep, and a
   barcode motif recur so the brand gesture (scanning) is felt,
   not just described. Blue dominant · teal = the "scan" signal.
   ============================================================ */
:root {
  --blue: #1f5cff;
  --blue-dark: #1746c8;
  --teal: #18c39a;
  --teal-dark: #0c7d5f;

  --ink: #161f33;
  --muted: #5a6678;
  --bg: #ffffff;
  --bg-soft: #f3f7fd;
  --bg-tint: #eaf1fe;
  --border: #e4eaf3;

  /* Dark "scanner" stage for the video section */
  --scanner-1: #0e1c3c;
  --scanner-2: #0a1226;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 2px 10px rgba(20, 31, 51, 0.05);
  --shadow: 0 16px 44px rgba(31, 92, 255, 0.13);
  --shadow-lg: 0 30px 80px rgba(17, 39, 125, 0.20);

  --maxw: 1140px;
  --font: "Plus Jakarta Sans", "Noto Sans JP", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--font); }

a { color: inherit; }

/* Page-wide film grain — tactile depth without weight (pure CSS, ~1KB) */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  mix-blend-mode: multiply;
  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");
}

/* ---------- Nav ---------- */
.nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px clamp(18px, 5vw, 32px);
}
.brand { display: inline-flex; }
.brand-mark { height: 38px; display: block; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-dark);
  background: rgba(31, 92, 255, 0.10);
  border: 1px solid rgba(31, 92, 255, 0.16);
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Sliding language toggle ---------- */
.lang-toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  background: #e9eff9;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.lang-toggle__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 2);
  background: var(--blue);
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(31, 92, 255, 0.36);
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.5, 1);
}
.lang-toggle[data-active="en"] .lang-toggle__thumb { transform: translateX(100%); }
.lang-toggle__btn {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.25s ease;
}
.lang-toggle__btn[aria-pressed="true"] { color: #fff; }

/* Shared focus ring */
.lang-toggle__btn:focus-visible,
.btn:focus-visible,
.brand:focus-visible,
.provided a:focus-visible {
  outline: 3px solid rgba(31, 92, 255, 0.45);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 32px) clamp(64px, 8vw, 100px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-areas:
    "head demo"
    "pitch demo";
  column-gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
.hero-head { grid-area: head; align-self: end; }
.hero-pitch { grid-area: pitch; align-self: start; padding-top: 26px; }
.demo { grid-area: demo; align-self: center; }

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(72px); }
.hero-glow--blue {
  width: 520px; height: 520px; top: -140px; left: -120px;
  background: radial-gradient(circle, rgba(31, 92, 255, 0.28), transparent 70%);
}
.hero-glow--teal {
  width: 440px; height: 440px; bottom: -160px; right: -80px;
  background: radial-gradient(circle, rgba(24, 195, 154, 0.24), transparent 70%);
}
.hero-head, .hero-pitch, .demo { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-dark);
  background: var(--bg-tint);
  border: 1px solid rgba(31, 92, 255, 0.14);
  padding: 7px 15px 7px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(24, 195, 154, 0.18);
}

.hero-title {
  font-size: clamp(2.5rem, 5.4vw, 3.9rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.accent-blue {
  color: var(--blue);
  background: linear-gradient(180deg, transparent 62%, rgba(31, 92, 255, 0.16) 0);
}

.lede {
  font-size: 1.18rem;
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 30em;
}

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 14px;
  min-height: 52px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 50px rgba(31, 92, 255, 0.34); }
.btn-arrow { transition: transform 0.2s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }
.cta-note { color: var(--muted); font-size: 0.92rem; }

/* ---------- Verdict demo card + scan-frame ---------- */
.demo { display: flex; justify-content: center; }
.scan-frame { position: relative; padding: 26px; width: 100%; max-width: 410px; }
.corner {
  position: absolute; width: 30px; height: 30px;
  border: 3px solid var(--teal); border-radius: 5px;
  z-index: 2;
}
.corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.demo-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}
/* Signature scan-line sweeping the card */
.scanline {
  position: absolute;
  left: 0; right: 0;
  top: 0;
  height: 44px;
  background: linear-gradient(180deg, transparent, rgba(24, 195, 154, 0.10) 60%, rgba(24, 195, 154, 0.34));
  border-bottom: 2px solid rgba(24, 195, 154, 0.65);
  pointer-events: none;
  z-index: 1;
}
.demo-product { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.demo-thumb {
  width: 50px; height: 50px; border-radius: 14px; flex: none;
  background: linear-gradient(135deg, var(--blue), #4f7dff);
  color: #fff; font-weight: 700; font-size: 1.4rem;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(31, 92, 255, 0.28);
}
.demo-name { font-weight: 700; font-size: 1.05rem; }
.demo-jan { color: var(--muted); font-size: 0.84rem; font-variant-numeric: tabular-nums; }

.price-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-top: 1px solid var(--border);
}
.price-label { color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.price-val { font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.price-row.best .price-val { color: var(--teal-dark); }
.src-dot { width: 9px; height: 9px; border-radius: 50%; background: #bf0000; display: inline-block; }

.verdict {
  margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.verdict-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(24, 195, 154, 0.14); color: var(--teal-dark);
  font-weight: 700; font-size: 0.92rem; padding: 7px 14px; border-radius: 999px;
}
.verdict-sub { color: var(--muted); font-size: 0.84rem; font-variant-numeric: tabular-nums; }

/* ---------- Section scaffolding ---------- */
.section-inner, .video-inner { max-width: var(--maxw); margin: 0 auto; }
.section-title {
  text-align: center; font-size: clamp(1.55rem, 3vw, 1.95rem);
  font-weight: 800; letter-spacing: -0.01em; margin: 0 0 44px;
}
.section-title--invert { color: #fff; }

/* ---------- Video section: dark scanner stage ---------- */
.video-section {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 8vw, 88px) clamp(18px, 5vw, 32px);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(31, 92, 255, 0.30), transparent 60%),
    linear-gradient(180deg, var(--scanner-1), var(--scanner-2));
  overflow: hidden;
}
/* Faint barcode haze behind the video, masked to a soft vignette */
.video-section::before {
  content: "";
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 7px);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 50%, #000, transparent 75%);
  mask-image: radial-gradient(80% 70% at 50% 50%, #000, transparent 75%);
}
.video-inner { position: relative; z-index: 1; }

.video-stage {
  position: relative;
  margin: 0 auto;
  padding: 14px;
  border-radius: var(--radius);
}
.video-stage .corner {
  width: 26px; height: 26px;
  border-color: rgba(24, 195, 154, 0.9);
}
.video-stage.is-horizontal { width: min(100%, 760px); }
.video-stage.is-vertical { width: min(100%, 348px); }

#promo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}
.video-stage.is-horizontal #promo { aspect-ratio: 16 / 9; }
.video-stage.is-vertical #promo { aspect-ratio: 9 / 16; }

/* ---------- Steps ---------- */
.steps {
  padding: clamp(56px, 8vw, 88px) clamp(18px, 5vw, 32px);
  background: var(--bg-soft);
}
.step-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  position: relative;
}
/* Dashed "scan path" connecting the three steps on desktop */
.step-grid::before {
  content: "";
  position: absolute; top: 60px; left: 16%; right: 16%;
  border-top: 2px dashed rgba(31, 92, 255, 0.22);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 26px 30px; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step-num {
  position: absolute; top: 16px; right: 18px;
  font-size: 0.78rem; font-weight: 800; color: var(--blue);
  background: var(--bg-tint); border-radius: 999px;
  width: 26px; height: 26px; display: grid; place-items: center;
}
.step-icon {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: 18px;
  border-radius: 20px;
  color: var(--blue);
  background: linear-gradient(160deg, var(--bg-tint), #fff);
  border: 1px solid rgba(31, 92, 255, 0.14);
}
.step-icon svg { width: 30px; height: 30px; }
.step h3 { margin: 0 0 10px; font-size: 1.12rem; font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 1rem; }

/* ---------- Trust ---------- */
.trust { padding: clamp(56px, 8vw, 88px) clamp(18px, 5vw, 32px); }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.trust-item {
  display: flex; flex-direction: column; gap: 10px;
  padding: 26px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.trust-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.trust-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 13px;
  color: var(--teal-dark);
  background: rgba(24, 195, 154, 0.12);
}
.trust-icon svg { width: 24px; height: 24px; }
.trust-item strong { font-size: 1.06rem; }
.trust-item span:not(.trust-icon) { color: var(--muted); font-size: 0.96rem; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  border-top: 1px solid var(--border);
  max-width: var(--maxw); margin: 0 auto;
  padding: 52px clamp(18px, 5vw, 32px) 64px;
  text-align: center;
}
/* Subtle barcode strip — the scan motif as a quiet sign-off */
.footer-barcode {
  height: 30px; width: min(220px, 60%); margin: 0 auto 28px;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px, transparent 2px 4px,
    var(--ink) 4px 7px, transparent 7px 10px,
    var(--ink) 10px 11px, transparent 11px 15px
  );
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  font-weight: 700; font-size: 1.05rem; margin-bottom: 18px;
}
.footer-icon { width: 30px; height: 30px; border-radius: 9px; }
.disclosure { color: var(--muted); font-size: 0.84rem; max-width: 52em; margin: 0 auto 16px; line-height: 1.7; }
.copyright { color: var(--muted); font-size: 0.86rem; margin: 0; }
.provided { color: var(--muted); font-size: 0.84rem; margin: 8px 0 0; }
.provided a { color: var(--blue-dark); font-weight: 700; text-decoration: none; }
.provided a:hover { text-decoration: underline; }

/* ============================================================
   Motion — one entrance, the scan-line, hover. Reduced-motion safe.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .hero-head, .demo, .hero-pitch {
    opacity: 0;
    animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  }
  .hero-head { animation-delay: 0.05s; }
  .demo { animation-delay: 0.18s; }
  .hero-pitch { animation-delay: 0.28s; }

  .scanline { animation: scan 3.4s cubic-bezier(0.5, 0, 0.5, 1) infinite; }
  .eyebrow-dot { animation: pulse 2.4s ease-in-out infinite; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes scan {
  0% { top: -42px; opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(24, 195, 154, 0.30); }
  50% { box-shadow: 0 0 0 6px rgba(24, 195, 154, 0); }
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet + small laptop */
@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  html { font-size: 17px; }

  /* Hero stacks: headline → demo → pitch (clear hierarchy on mobile) */
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "demo"
      "pitch";
    row-gap: 36px;
    text-align: center;
    padding-top: 24px;
  }
  .hero-head, .hero-pitch { align-self: auto; padding-top: 0; }
  .eyebrow { margin-bottom: 18px; }
  .lede { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }

  .step-grid { grid-template-columns: 1fr; gap: 18px; }
  .step-grid::before { display: none; }
  .step { padding: 28px 24px; }
}

/* Phone */
@media (max-width: 520px) {
  html { font-size: 16px; }
  .nav { padding: 16px 16px; gap: 10px; }
  .brand-mark { height: 32px; }
  .nav-right { gap: 9px; }
  .pill { padding: 6px 11px; font-size: 0.74rem; }
  .lang-toggle__btn { min-width: 46px; padding: 7px 11px; font-size: 0.78rem; }

  .hero { padding: 16px 18px 56px; row-gap: 30px; }
  .hero-title { font-size: clamp(1.85rem, 7.8vw, 2.4rem); }
  /* Let the browser balance JA lines instead of the desktop hard break */
  .hero-title br { display: none; }
  .lede { font-size: 1.06rem; }
  .btn { width: 100%; justify-content: center; }
  .cta-row { gap: 12px; }
  .cta-note { width: 100%; text-align: center; }

  .scan-frame { padding: 22px; }
  .demo-card { padding: 20px; }

  .trust-grid { grid-template-columns: 1fr; gap: 14px; }
  .video-stage.is-vertical { width: min(100%, 300px); }
}

/* Very narrow — keep the nav on one tidy row */
@media (max-width: 360px) {
  .pill { display: none; }
  .brand-mark { height: 30px; }
}
