/* Base styles: black & white minimal theme for 壱神株式会社 */
/* Typography & variables */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f6f6;
  --line: #eaeaea;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --brand: #000000;
  --brand-contrast: #ffffff;
  --header-h: clamp(56px, 9vw, 64px);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 28px);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  --fs-12: clamp(12px, 0.74rem + 0.15vw, 13px);
  --fs-14: clamp(13px, 0.86rem + 0.1vw, 14px);
  --fs-16: clamp(15px, 1rem, 16px);
  --fs-18: clamp(16px, 1.05rem + 0.2vw, 18px);
  --fs-20: clamp(18px, 1.1rem + 0.6vw, 20px);
  --fs-24: clamp(20px, 1.2rem + 1vw, 24px);
  --fs-32: clamp(24px, 1.8rem + 1vw, 32px);
  --fs-48: clamp(30px, 3.2vw, 48px);
  --fs-64: clamp(36px, 5vw, 64px);
}

/* Reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs-16);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

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

h1, h2, h3, h4, h5, h6 { margin: 0 0 var(--space-6); line-height: 1.2; }
h1 { font-size: var(--fs-64); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-32); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-24); }

p { margin: 0 0 var(--space-6); }
ol, ul { margin: 0 0 var(--space-6); padding-left: 1.1em; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Layout */
.container {
  max-width: calc(var(--container) + var(--gutter) * 2);
  padding-inline: var(--gutter);
  margin-inline: auto;
}

.section { padding: clamp(56px, 8vw, 120px) 0; scroll-margin-top: calc(var(--header-h) + 12px); }
.section--tight { padding: clamp(40px, 6vw, 96px) 0; }
.section--invert { background: var(--brand); color: var(--brand-contrast); }
.section--split { background: var(--surface); }

.section-head { margin-bottom: var(--space-12); }
.section-head .muted { color: var(--muted); }
.section--invert .muted { color: #cfcfcf; }

.lead { font-size: var(--fs-20); color: var(--muted); }
.strong { font-weight: 700; }
.muted { color: var(--muted); }

.hide-sm { display: none; }
@media (min-width: 720px) { .hide-sm { display: inline; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
.btn--primary:hover { background: #111; border-color: #111; }
.section--invert .btn--primary { background: #ffffff; color: #000; border-color: #fff; }
.section--invert .btn--primary:hover { background: #e9e9e9; border-color: #e9e9e9; }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.section--invert .btn--ghost { color: #fff; border-color: #444; }
.btn--dark { background: #000; color: #fff; border-color: #000; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22); }
.btn--dark:hover { background: #111; border-color: #111; }

/* Lists */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 1.3em; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px; border-radius: 2px; background: currentColor; opacity: 0.9; }

.list-ordered { padding-left: 1.2em; }

/* Header & nav */
.site-header { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 200; backdrop-filter: saturate(1.2) blur(8px); background: color-mix(in lab, var(--bg) 88%, transparent); border-bottom: 1px solid var(--line); }
.site-header.is-compact { box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: flex-start; gap: var(--space-4); height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.02em; flex-shrink: 0; font-size: var(--fs-18); line-height: 1; }
.brand:hover,
.brand:focus-visible { text-decoration: none; }
.brand-logo { width: 32px; height: 32px; display: block; object-fit: contain; }
.brand-text { white-space: nowrap; }

.nav { display: flex; align-items: center; gap: var(--space-4); }
.nav a { display: inline-flex; align-items: center; font-weight: 600; color: var(--text); border-bottom: 2px solid transparent; padding: 10px 0; line-height: 1; font-size: var(--fs-14); letter-spacing: 0.02em; }
.nav a:hover { text-decoration: none; border-color: var(--line); }
.nav .btn { margin-left: 0; padding: 12px 20px; height: auto; line-height: 1; font-size: var(--fs-14); letter-spacing: 0.02em; border-width: 1.5px; }
.site-header .btn--ghost { border-color: #1a1a1a; }
.site-header .btn--ghost:hover { background: #f3f3f3; }

.nav-toggle { display: inline-flex; flex-direction: column; gap: 6px; background: transparent; border: 0; padding: 8px; cursor: pointer; margin-left: auto; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; display: block; }
@media (min-width: 960px) { .nav-toggle { display: none; } }

/* Mobile: full-width dropdown below header (no slide) */
[data-nav] {
  position: fixed;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  padding: 16px var(--gutter);
  display: none;
  gap: 16px;
  z-index: 150;
  max-height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
[data-nav][data-open="true"] { display: grid; }
@media (min-width: 960px) {
  [data-nav] { position: static; transform: none; display: flex; border: 0; padding: 0; background: transparent; overflow: visible; }
  .header-inner { flex-wrap: nowrap; }
  .nav { flex-wrap: wrap; white-space: normal; margin-left: auto; transform: translateY(2px); }
  
  .nav .btn { margin-left: auto; }
  .nav a, .nav .btn { white-space: nowrap; }
  .nav-backdrop { display: none !important; }
  .site-header .container { max-width: calc(var(--container) + var(--gutter) * 2); width: auto; }
}

/* Mobile-first nav overlay tweaks */
@media (max-width: 959px) {
  [data-nav] a { font-size: var(--fs-18); padding: 12px 0; }
  [data-nav] .btn { justify-self: start; margin-top: 4px; }
}

/* Backdrop for drawer */
.nav-backdrop { position: fixed; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 140; }
.nav-backdrop[data-open="true"] { opacity: 1; pointer-events: auto; }

/* Lock scroll when drawer open */
body.is-nav-open { overflow: hidden; }

/* Cards & grid */
.cards { display: grid; gap: var(--space-8); }
.cards--3 { grid-template-columns: 1fr; }
@media (min-width: 840px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-8); box-shadow: var(--shadow-sm); }
.section--invert .card { background: #0a0a0a; border-color: #1a1a1a; box-shadow: none; }
.card h3 { margin-bottom: var(--space-4); }
.card--line { background: transparent; box-shadow: none; border: 1px solid #2a2a2a; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding: var(--space-12) 0; }
.footer-inner { display: grid; gap: 16px; align-items: center; grid-template-columns: 1fr; }
.footer-links { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; flex-wrap: wrap; align-items: center; }
.footer-links a { display: inline-flex; align-items: center; line-height: 1.2; }
.copyright { display: inline-flex; align-items: center; line-height: 1.4; transform: translateY(13px); }
@media (min-width: 720px) { .footer-inner { grid-template-columns: 1fr auto auto; } }

/* Helpers */
.note { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: var(--space-8); box-shadow: var(--shadow-sm); }
.section--invert .note { background: #0a0a0a; border-color: #2a2a2a; }

/* Accessibility */
:where(button, a, input, textarea, select) { outline: none; }
:where(button, a, input, textarea, select):focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.section--invert :where(button, a, input, textarea, select):focus-visible { outline-color: #fff; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}


