/* YadoriLink site styles. System fonts only; no third-party requests. */
:root {
  --bg: #f5f9ff;
  --bg-alt: #eaf2ff;
  --surface: #ffffff;
  --text: #0a1530;
  --muted: #4a5878;
  --line: #d3e0f5;
  --brand: #0a4bff;
  --brand-ink: #0033cc;
  --cyan: #0a8cff;
  --link: #0a3fd6;
  --on-brand: #ffffff;
  --code-bg: #0a1530;
  --code-text: #d8ecff;
  --hero-glow: rgba(45, 226, 255, 0.35);
  --shadow: 0 1px 2px rgba(10, 40, 120, 0.06), 0 8px 24px rgba(10, 40, 120, 0.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060d1f;
    --bg-alt: #0a1530;
    --surface: #0d1b3a;
    --text: #e8f1ff;
    --muted: #9db0d4;
    --line: #1c2f5c;
    --brand: #3d7bff;
    --brand-ink: #2de2ff;
    --cyan: #2de2ff;
    --link: #6fb6ff;
    --on-brand: #04112e;
    --code-bg: #030813;
    --code-text: #cfe6ff;
    --hero-glow: rgba(10, 140, 255, 0.35);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060d1f;
  --bg-alt: #0a1530;
  --surface: #0d1b3a;
  --text: #e8f1ff;
  --muted: #9db0d4;
  --line: #1c2f5c;
  --brand: #3d7bff;
  --brand-ink: #2de2ff;
  --cyan: #2de2ff;
  --link: #6fb6ff;
  --on-brand: #04112e;
  --code-bg: #030813;
  --code-text: #cfe6ff;
  --hero-glow: rgba(10, 140, 255, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Noto Sans CJK JP", sans-serif;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
code, pre, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { font-size: 0.92em; background: var(--bg-alt); padding: 0.1em 0.35em; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--on-brand); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { display: block; width: 36px; height: 36px; }
.site-header nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; font-size: 0.95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-header nav a:hover { color: var(--text); text-decoration: underline; }
.lang { font-size: 0.9rem; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; text-decoration: none; color: var(--text); }
.lang:hover { background: var(--bg-alt); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--brand); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn.primary { background: linear-gradient(135deg, #0a4bff, #0a8cff); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(10, 75, 255, 0.35); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(10, 75, 255, 0.45); }
.btn.ghost { color: var(--text); background: transparent; border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover { transition: none; transform: none; }
}

/* hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(900px 420px at 80% 0%, var(--hero-glow), transparent 70%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center; padding: 40px 0 64px; }
.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--brand-ink); letter-spacing: 0.04em; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 18px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.badge-line { margin: 20px 0 0; font-size: 0.9rem; color: var(--muted); }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img { width: min(340px, 70%); height: auto; filter: drop-shadow(0 18px 40px rgba(10, 75, 255, 0.35)); }

/* sections */
section { padding: 56px 0; }
section.alt { background: var(--bg-alt); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 12px; }
.sub { color: var(--muted); max-width: 44em; margin: 0 0 28px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 1.08rem; line-height: 1.35; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #0a4bff, #2de2ff); color: #04112e; font-weight: 800; margin-bottom: 10px; }
.steps h3 { margin: 0 0 6px; font-size: 1.08rem; }
.steps p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* diagram */
.diagram { margin: 32px 0 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.diagram svg { display: block; width: 100%; height: auto; max-width: 720px; margin: 0 auto; }
.diagram .d-box { fill: var(--bg-alt); stroke: var(--line); stroke-width: 1.5; }
.diagram .d-brand { fill: none; stroke: var(--brand); stroke-width: 3; }
.diagram .d-dash { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.diagram text { fill: var(--text); font: 600 14px system-ui, sans-serif; }
.diagram text.s { fill: var(--muted); font-weight: 400; font-size: 12px; }
.diagram text.b { fill: var(--brand-ink); }
.diagram figcaption { text-align: center; color: var(--muted); font-size: 0.92rem; margin-top: 10px; }

/* code */
pre { background: var(--code-bg); color: var(--code-text); padding: 18px 20px; border-radius: 12px; overflow-x: auto; font-size: 0.9rem; line-height: 1.6; margin: 16px 0; }
pre code { background: none; padding: 0; color: inherit; }

/* platforms */
.plat { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: 20px 0; }
.plat .card h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.plat .card code { word-break: break-all; }
.note { color: var(--muted); font-size: 0.92rem; }
ul.tight { padding-left: 1.2em; margin: 8px 0; }
ul.tight li { margin: 4px 0; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 0.93rem; }
.site-footer .foot-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--text); font-weight: 600; }
.site-footer .foot-top img { width: 28px; height: 28px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* legal pages */
.legal { max-width: 760px; padding: 24px 0 56px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2em; }
.legal h3 { font-size: 1.05rem; margin: 1.4em 0 0.3em; }
.legal .meta { color: var(--muted); }
.legal ul { padding-left: 1.3em; }
.legal li { margin: 4px 0; }

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; padding: 16px 0 40px; }
  .hero-logo { order: -1; }
  .hero-logo img { width: 150px; }
  section { padding: 40px 0; }
  .site-header nav { margin-left: 0; width: 100%; order: 3; }
  .btn { width: 100%; }
}
