/* EnvHop LP */
:root {
  --lcl: #00b4e7;
  --dev: #ffa800;
  --stg: #e86032;
  --prod: #c00000;

  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --fg: #1f1f1f;
  --muted: #5f6368;
  --border: #dadce0;
  --surface: #ffffff;
  --accent: #1a73e8;
  --on-accent: #ffffff;
  --code-bg: #f1f3f4;
  --shadow: 0 1px 2px rgba(60, 64, 67, .12), 0 4px 12px rgba(60, 64, 67, .08);

  /* hero は常にダーク（プロモタイルと同じトーン） */
  --hero-bg: #0f1115;
  --hero-fg: #ffffff;
  --hero-muted: #c9ced6;
  --pill-bg: #1b1f27;
  --pill-border: #2c3340;

  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #202124;
    --bg-alt: #1b1c1e;
    --fg: #e8eaed;
    --muted: #9aa0a6;
    --border: #3c4043;
    --surface: #292a2d;
    --accent: #8ab4f8;
    --on-accent: #202124;
    --code-bg: #303134;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #202124;
  --bg-alt: #1b1c1e;
  --fg: #e8eaed;
  --muted: #9aa0a6;
  --border: #3c4043;
  --surface: #292a2d;
  --accent: #8ab4f8;
  --on-accent: #202124;
  --code-bg: #303134;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Segoe UI", system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  line-height: 1.7;
  font-size: 16px;
}
:lang(ja) body, body:lang(ja) { line-height: 1.85; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
code, kbd { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  color: var(--hero-fg);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; }
.brand img { width: 28px; height: 28px; }
.lang-switch { display: flex; gap: 4px; font-size: 14px; }
.lang-switch a, .lang-switch span {
  padding: 4px 10px; border-radius: 999px; text-decoration: none; color: var(--hero-muted);
  border: 1px solid transparent;
}
.lang-switch a:hover { color: #fff; border-color: var(--pill-border); }
.lang-switch [aria-current] { color: #fff; border-color: var(--pill-border); background: var(--pill-bg); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, #1d2330 0%, var(--hero-bg) 55%);
  color: var(--hero-fg);
  padding: 120px 0 88px;
}
.glow { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .32; pointer-events: none; }
.glow.g1 { width: 520px; height: 520px; right: -160px; top: -220px; background: var(--stg); }
.glow.g2 { width: 420px; height: 420px; left: 30%; bottom: -300px; background: var(--lcl); }

.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center;
}
.hero h1 {
  margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 18px;
}
.hero h1 img { width: clamp(56px, 7vw, 80px); height: auto; box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 10px 30px rgba(0,0,0,.5); }
.hero .lead { margin: 24px 0 0; font-size: clamp(18px, 2.2vw, 22px); color: var(--hero-muted); line-height: 1.5; }
.hero .cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: #fff; color: #0f1115; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,.45); }
.btn-ghost { color: #fff; border: 1px solid var(--pill-border); }
.btn-ghost:hover { background: var(--pill-bg); }
.btn svg { flex: none; }
.cta-note { width: 100%; font-size: 13px; color: #9aa0a6; margin: 4px 0 0; }

/* URL demo */
.demo { display: flex; flex-direction: column; gap: 14px; }
.url-pill {
  font-family: var(--mono);
  background: var(--pill-bg); border: 1px solid var(--pill-border); border-radius: 999px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; height: 56px; font-size: 15px; white-space: nowrap; min-width: 0;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.url-pill .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.url-pill .txt { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.url-pill .scheme { color: #9aa0a6; }
.url-pill .host { font-weight: 700; color: #fff; }
.url-pill .path { color: #9aa0a6; }
.url-pill.is-active { border-color: #4a5568; box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.url-pill.is-active .path { color: #e8eaed; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Segoe UI", system-ui, sans-serif; font-weight: 800; letter-spacing: .04em;
  font-size: 12px; height: 24px; padding: 0 8px; border-radius: 6px; color: #fff; margin-left: auto; flex: none;
}
.b-lcl { background: var(--lcl); color: #0f1115; }
.b-dev { background: var(--dev); color: #0f1115; }
.b-stg { background: var(--stg); color: #0f1115; }
.b-prod { background: var(--prod); }
.d-lcl { background: var(--lcl); } .d-dev { background: var(--dev); }
.d-stg { background: var(--stg); } .d-prod { background: var(--prod); }

.hop {
  display: flex; align-items: center; gap: 10px; padding-left: 26px;
  color: #9aa0a6; font-size: 14px;
}
.prodbar {
  background: var(--prod); color: #fff; font-weight: 700; text-align: center;
  border-radius: 10px; padding: 10px 12px; font-size: 15px;
  box-shadow: 0 8px 24px rgba(192, 0, 0, .35);
}
.demo-caption { margin: 4px 0 0; font-size: 13px; color: #9aa0a6; text-align: center; }

/* ---------- sections ---------- */
section { padding: 80px 0; }
section.alt { background: var(--bg-alt); }
.section-title { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.25; letter-spacing: -.01em; }
.section-lead { margin: 0 0 40px; color: var(--muted); max-width: 720px; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; box-shadow: var(--shadow);
}
.feature .ico {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, var(--accent)) 16%, transparent);
  color: var(--c, var(--accent));
  margin-bottom: 14px;
}
.feature h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.35; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
kbd {
  display: inline-block; font-size: 12px; line-height: 1; padding: 4px 6px; border-radius: 5px;
  background: var(--code-bg); border: 1px solid var(--border); border-bottom-width: 2px; color: var(--fg);
  white-space: nowrap;
}
.mini-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.mini-badges .badge { margin: 0; font-size: 11px; height: 22px; }

/* ad */
.ad-area { padding: 32px 0; text-align: center; }
.ad-label { display: block; font-size: 11px; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.ad-slot { display: inline-block; width: 320px; height: 100px; }
@media (min-width: 760px) {
  .ad-slot { width: 728px; height: 90px; }
}

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 56px 24px 24px;
}
.steps li::before {
  content: counter(step);
  position: absolute; top: 20px; left: 24px;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px;
}
.steps h3 { margin: 0 0 6px; font-size: 17px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }
.steps code { font-size: 13px; background: var(--code-bg); padding: 1px 6px; border-radius: 4px; }

/* matching patterns */
.patterns { display: grid; gap: 12px; margin-top: 8px; }
.pattern {
  display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px;
}
.pattern .kind { font-weight: 700; font-size: 14px; }
.pattern code { font-size: 14px; overflow-wrap: anywhere; }
.pattern .note { grid-column: 2; color: var(--muted); font-size: 14px; margin-top: -8px; }

/* privacy / langs */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.langs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.langs li { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 14px; }

/* final CTA */
.final-cta { text-align: center; background: var(--hero-bg); color: #fff; }
.final-cta .section-lead { color: var(--hero-muted); margin-left: auto; margin-right: auto; }
.final-cta .cta-row { justify-content: center; display: flex; flex-wrap: wrap; gap: 12px; }

/* footer */
.site-footer { padding: 28px 0; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: inherit; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 600px) {
  section { padding: 56px 0; }
  .hero { padding: 96px 0 64px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .url-pill { height: 48px; font-size: 13px; padding: 0 14px; gap: 8px; }
  .url-pill .scheme { display: none; }
  .pattern { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .pattern .note { grid-column: 1; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .url-pill { transition: none; }
}
