/* sekisho.rmthreat.com — 関所 Sekisho official site
   Design language shared with the browser extension (popup/welcome):
   warm "washi paper" surfaces, Trust Blue #1366E0, coral #DD5238,
   Fraunces display + Hanken Grotesk body, soft warm shadows, pill CTAs. */

:root {
  /* washi paper surfaces */
  --paper: #FAF5EC;
  --paper2: #F3ECDD;
  --bg: #FFFFFF;
  --surface: #FAF5EC;
  --surface2: #F3ECDD;
  --surface-warm: #FFFDF8;

  /* ink */
  --ink: #23252E;
  --grey: #5E6170;
  --ink3: #8E909B;

  /* blue */
  --primary: #1366E0;
  --primary-ink: #0B3D8C;
  --primary-soft: #E8F0FC;

  /* green / coral / warn */
  --safe: #1C9C68;
  --safe-ink: #0E5C3D;
  --safe-soft: #E4F4EC;
  --warn: #C77A1A;
  --danger: #DD5238;
  --danger-ink: #8C2C19;
  --danger-soft: #FBEAE4;

  /* lines */
  --border: #ECE3D2;
  --border2: #E0D5BF;

  /* dark "sumi ink" anchor (final CTA + footer) */
  --dark: #21242E;
  --dark2: #191B23;
  --on-dark: #EFE9DC;
  --on-dark-mute: #A7A498;
  --on-dark-border: rgba(255, 255, 255, 0.10);

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 6px 18px -12px rgba(74, 54, 28, 0.40);
  --shadow: 0 16px 40px -22px rgba(74, 54, 28, 0.45), 0 2px 6px -3px rgba(74, 54, 28, 0.16);
  --shadow-lg: 0 36px 70px -30px rgba(74, 54, 28, 0.50), 0 6px 16px -10px rgba(74, 54, 28, 0.20);
  --maxw: 1080px;

  --serif: "Fraunces", Georgia, "Songti TC", "Noto Serif CJK TC", serif;
  --font: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Hiragino Sans", "Yu Gothic UI", Meiryo, "PingFang TC", "Microsoft JhengHei",
    "Noto Sans", "Noto Sans CJK TC", "Noto Sans CJK JP", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 640px at 86% -8%, #FFF6E4 0%, transparent 60%),
    radial-gradient(900px 520px at -6% 4%, #FCF8F0 0%, transparent 55%),
    var(--paper);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.hide-sm { }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 236, 0.78);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-name .jp { font-weight: 500; margin-right: 6px; }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { color: var(--grey); font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--ink); text-decoration: none; }

/* Language selector */
.langsel { position: relative; }
.langsel-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--grey);
  background: var(--surface-warm);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.langsel-trigger:hover { color: var(--ink); border-color: var(--ink3); }
.langsel-trigger .globe { opacity: 0.7; }
.langsel-trigger .chev { transition: transform 0.18s ease; opacity: 0.8; }
.langsel-trigger[aria-expanded="true"] { color: var(--ink); border-color: var(--primary); background: var(--primary-soft); }
.langsel-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.langsel-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 60;
  animation: lang-pop 0.16s ease-out;
}
.langsel-menu[hidden] { display: none; }
.langsel-menu li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
}
.langsel-menu li:hover { background: var(--surface2); }
.langsel-menu li.active { color: var(--primary); font-weight: 600; }
.langsel-menu li.active::after { content: "✓"; font-size: 13px; color: var(--primary); }
@keyframes lang-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(19, 102, 224, 0.7);
}
.btn-primary:hover { background: var(--primary-ink); transform: translateY(-1px); }
.btn-ghost {
  background: var(--surface-warm);
  color: var(--ink);
  border-color: var(--border2);
}
.btn-ghost:hover { background: var(--bg); border-color: var(--ink3); }

/* ---------- Hero ---------- */
.hero {
  padding: 92px 0 84px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--primary-ink);
  background: var(--primary-soft);
  border: 1px solid #CFE2FB;
  padding: 6px 13px;
  border-radius: 999px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--danger);
}
.hero h1 {
  font-family: var(--serif);
  font-size: 52px;
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 20px 0 18px;
  color: var(--ink);
}
.hero p.lead {
  font-size: 18.5px;
  color: var(--grey);
  margin: 0 0 30px;
  max-width: 33ch;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note {
  margin-top: 22px;
  font-size: 14px;
  color: var(--grey);
}
.hero-visual {
  position: relative;
}
.hero-visual img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--bg);
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -22px -18px -26px -14px;
  background: radial-gradient(60% 60% at 70% 30%, rgba(19, 102, 224, 0.10), transparent 70%);
  z-index: -1;
}

/* ---------- Trust bar ---------- */
.trustbar {
  margin: -28px 0 0;
}
.trustbar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px 28px;
}
.trustbar-grid > div { text-align: center; }
.trustbar .stat {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.trustbar .label { font-size: 13px; color: var(--grey); margin-top: 3px; }

/* ---------- Section scaffolding ---------- */
section.block { padding: 92px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 56px; }
.section-head h2 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}
.section-head p { font-size: 17px; color: var(--grey); margin: 0; }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 22px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card .ico {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 16px;
}
.card h3 { font-family: var(--serif); font-size: 18px; margin: 0 0 8px; font-weight: 600; }
.card p { font-size: 14.5px; color: var(--grey); margin: 0; }
.card code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--surface2);
  color: var(--danger-ink);
  padding: 1px 5px;
  border-radius: 5px;
}

/* ---------- Showcase ---------- */
.showcase { background: var(--paper2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gallery figure { margin: 0; }
.shot-img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 16 / 10;
}
.shot-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.gallery figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 14.5px;
  color: var(--grey);
  font-weight: 500;
}
img.zoomable { cursor: zoom-in; }
.shot-img:has(img.zoomable) { cursor: zoom-in; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(28, 22, 12, 0.62);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lightbox[hidden] { display: none; }
.lightbox.shown { opacity: 1; }
.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}
.lightbox.shown .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 22px; right: 26px;
  width: 42px; height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }
@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox-img { transition: none; }
}

/* ---------- Privacy band ---------- */
.privacy-band { background: var(--surface-warm); }
.priv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 28px;
  max-width: 880px;
  margin: 0 auto;
}
.priv-item {
  display: flex;
  gap: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.priv-item .check {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--safe-soft);
  color: var(--safe-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.priv-item h4 { margin: 0 0 5px; font-size: 16px; font-weight: 700; color: var(--ink); }
.priv-item p { margin: 0; font-size: 14px; color: var(--grey); }
.priv-cta { text-align: center; margin-top: 40px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  list-style: none;
  cursor: pointer;
  padding: 20px 0;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 24px; font-weight: 400; line-height: 1; flex: 0 0 auto; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 20px; color: var(--grey); font-size: 15px; line-height: 1.7; }

/* ---------- Final CTA (sumi-ink anchor) ---------- */
.cta-final {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--dark) 0%, var(--dark2) 100%);
  color: var(--on-dark);
  text-align: center;
  padding: 96px 0;
}
.cta-final::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 120% at 50% -10%, rgba(19, 102, 224, 0.22), transparent 60%);
}
.cta-final::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 220px; height: 4px;
  background: var(--danger);
  border-radius: 999px 999px 0 0;
}
.cta-final .container { position: relative; z-index: 1; }
.cta-final h2 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  color: #fff;
}
.cta-final p { font-size: 18px; color: var(--on-dark-mute); margin: 0 0 30px; }
.cta-final .btn-primary { box-shadow: 0 18px 36px -14px rgba(19, 102, 224, 0.8); }
.cta-final .cta-fine { margin-top: 20px; margin-bottom: 0; font-size: 13px; color: var(--on-dark-mute); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--dark2);
  color: var(--on-dark-mute);
  padding: 64px 0 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 56px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--on-dark-border);
}
.footer-brand { max-width: 300px; }
.footer-brand .brand { color: #fff; margin-bottom: 14px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin: 0; color: var(--on-dark-mute); font-size: 14px; line-height: 1.65; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h5 {
  margin: 0 0 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-dark);
}
.footer-col a { display: block; color: var(--on-dark-mute); margin-bottom: 11px; font-size: 14.5px; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 26px;
  font-size: 13px;
  color: var(--on-dark-mute);
}

/* ---------- Legal pages ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.legal .updated { color: var(--grey); font-size: 14px; margin-bottom: 8px; }
.legal h1 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--ink);
}
.legal .intro { font-size: 18px; color: var(--grey); margin: 0 0 14px; }
.legal h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
  color: var(--ink);
}
.legal h3 { font-size: 17px; font-weight: 700; margin: 28px 0 8px; }
.legal p, .legal li { font-size: 16px; color: #3a3d48; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal code {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface2);
  color: var(--danger-ink);
  padding: 1px 6px;
  border-radius: 5px;
}
/* soft gradient frame — no single-side bar (see docs/design.md §5) */
.legal .callout {
  background:
    linear-gradient(var(--primary-soft), var(--primary-soft)) padding-box,
    linear-gradient(150deg, var(--primary), var(--border) 60%) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 18px 0;
  font-size: 15px;
  color: #234;
}
.legal .callout.warn {
  background:
    linear-gradient(rgba(199, 122, 26, 0.08), rgba(199, 122, 26, 0.08)) padding-box,
    linear-gradient(150deg, var(--warn), var(--border) 60%) border-box;
  color: #4a3414;
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14.5px;
}
.legal th, .legal td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.legal th { background: var(--surface2); font-weight: 600; }
.legal .back { display: inline-block; margin-bottom: 24px; font-size: 14px; font-weight: 500; }
.legal .legal-foot { margin-top: 48px; }
.legal .legal-foot .back { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 60px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .hero p.lead { max-width: none; }
  .trustbar { margin-top: 8px; }
  .trustbar-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: 1fr; gap: 30px; max-width: 460px; margin: 0 auto; }
  .priv-grid { grid-template-columns: 1fr; }
  .footer-grid { gap: 36px; }
  .nav-links { gap: 14px; }
  .nav-links a.hide-sm { display: none; }
  .section-head h2 { font-size: 28px; }
  .cta-final h2 { font-size: 30px; }
}
@media (max-width: 520px) {
  .nav { height: auto; flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .brand-name { font-size: 17px; }
}
