/* ─────────────────────── miharii.quinas.jp ─────────────────────── */
:root {
  --c-teal-50: #ECF6F9;
  --c-teal-100: #D7EDF2;
  --c-teal-200: #B0DAE3;
  --c-teal-300: #80C2D1;
  --c-teal-400: #4FA8BB;
  --c-teal-500: #16768D;
  --c-teal-600: #115E72;
  --c-teal-700: #0B4858;

  --c-bg: #EDF5F8;
  --c-surface-0: #FFFFFF;
  --c-surface-1: #F4FAFC;
  --c-border: #C9DDE5;
  --c-border-strong: #8AB1BF;
  --c-text: #08222B;
  --c-text-muted: #486877;

  --r-md: 8px;
  --r-lg: 14px;

  font-family: ui-sans-serif, system-ui, -apple-system, "Hiragino Sans",
    "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--c-teal-500); }
a:hover { color: var(--c-teal-600); }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─────────────────────── header ─────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--c-border);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--c-text);
  text-decoration: none;
}
.site-brand img { height: 26px; }
.site-nav {
  display: flex;
  gap: 22px;
}
.site-nav a {
  color: var(--c-text-muted);
  text-decoration: none;
  font-size: 14px;
}
.site-nav a:hover { color: var(--c-text); }

/* ─────────────────────── hero ─────────────────────── */
.hero {
  position: relative;
  padding: 88px 0 72px;
  background:
    radial-gradient(1100px circle at 70% -20%, rgba(22,118,141,0.16), transparent 62%),
    radial-gradient(900px circle at 10% 110%, rgba(79,168,187,0.12), transparent 60%);
  text-align: center;
  overflow: hidden;
}
.hero-inner {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-surface-0);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-teal-500);
  animation: pulse-dot 1.6s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.55); }
}
.hero-logo {
  display: block;
  height: 72px;
  width: auto;
  margin: 0 auto 22px;
  filter: drop-shadow(0 8px 28px rgba(22, 118, 141, 0.18));
}
@media (max-width: 760px) { .hero { padding: 56px 0 32px; } }
.hero h1 {
  font-size: clamp(34px, 5.6vw, 60px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--c-teal-500), var(--c-teal-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 17px;
  color: var(--c-text-muted);
  margin: 0 auto 32px;
  max-width: 640px;
  line-height: 1.75;
}
.hero .cta-row { justify-content: center; }
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-md);
  text-decoration: none;
  border: 1px solid var(--c-border-strong);
  background: var(--c-surface-0);
  color: var(--c-text);
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.btn:hover {
  transform: translateY(-1px);
  border-color: var(--c-teal-500);
}
.btn-primary {
  background: linear-gradient(135deg, var(--c-teal-500), var(--c-teal-400));
  border-color: var(--c-teal-500);
  color: #fff;
  box-shadow: 0 6px 22px rgba(22,118,141,0.32);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--c-teal-400), var(--c-teal-300));
  border-color: var(--c-teal-400);
}
.btn.big {
  padding: 16px 28px;
  font-size: 16px;
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--c-text);
}
.btn.ghost:hover {
  background: var(--c-surface-1);
  border-color: var(--c-border);
}
.dl-meta {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 8px;
}
.hero-art {
  background: var(--c-surface-0);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: 0 20px 60px rgba(8, 34, 43, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art img { max-height: 360px; }

/* ─────────────────────── features ─────────────────────── */
.section {
  padding: 88px 0;
}
.section-heading {
  text-align: center;
  margin: 0 auto 48px;
  max-width: 720px;
}
.section-title {
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.section-sub {
  font-size: 16px;
  color: var(--c-text-muted);
  margin: 0;
  line-height: 1.7;
}
.demo-section {
  background:
    radial-gradient(800px circle at 50% -10%, rgba(22,118,141,0.06), transparent 70%);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--c-surface-0);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.feature h3 {
  margin: 12px 0 8px;
  font-size: 17px;
}
.feature p {
  margin: 0;
  color: var(--c-text-muted);
  font-size: 14px;
}
.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--c-teal-500), var(--c-teal-400));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ─────────────────────── system requirements ─────────────────────── */
.reqs {
  background: var(--c-surface-1);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.reqs ul {
  margin: 0;
  padding-left: 18px;
  color: var(--c-text-muted);
}
.reqs li + li { margin-top: 6px; }

/* ─────────────────────── footer ─────────────────────── */
.site-footer {
  padding: 32px 0;
  font-size: 13px;
  color: var(--c-text-muted);
}
.site-footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: var(--c-text-muted); text-decoration: none; margin-right: 16px; }
.site-footer a:hover { color: var(--c-text); }

/* ─────────────────────── doc pages ─────────────────────── */
.doc {
  padding: 56px 0;
}
.doc h1 {
  font-size: 32px;
  margin: 0 0 24px;
}
.doc h2 {
  font-size: 20px;
  margin: 32px 0 10px;
}
.doc p, .doc li { color: var(--c-text); font-size: 15px; }
.doc ul { padding-left: 20px; }

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #0A171B;
    --c-surface-0: #11252C;
    --c-surface-1: #163039;
    --c-border: #2C4A57;
    --c-border-strong: #426373;
    --c-text: #E5F0F4;
    --c-text-muted: #9DB7C2;
  }
  .site-header { background: rgba(10, 23, 27, 0.85); }
  .hero-art img { filter: brightness(0.95); }
}

/* ─ hero chaos: floating mini-terminals ─ */
.hero-chaos {
  position: relative;
  margin: 56px auto 0;
  width: 100%;
  max-width: 1100px;
  height: 360px;
  pointer-events: none;
  perspective: 800px;
}
.hero-term {
  position: absolute;
  width: 250px;
  background: #0B1B20;
  border: 1px solid #1E3640;
  border-radius: 10px;
  box-shadow: 0 16px 44px rgba(8, 34, 43, 0.32),
              0 2px 6px rgba(8, 34, 43, 0.18);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  line-height: 1.55;
  color: #D7E6EB;
  text-align: left;
  overflow: hidden;
  transform: rotate(var(--rot, 0deg));
  animation: hero-float 12s ease-in-out infinite;
  animation-play-state: paused;
}
.hero-chaos.in-view .hero-term {
  animation-play-state: running;
}
.hero-term-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid #1E3640;
}
.hero-term-label {
  color: #95B5BF;
  font-size: 11px;
}
.hero-term-body {
  padding: 10px 12px 14px;
  white-space: pre;
  min-height: 64px;
}
.hero-term-body .dim   { color: #6F8C95; }
.hero-term-body .ok    { color: #5DC4DC; }
.hero-term-body .prompt { color: #5DC4DC; font-weight: 700; }
.hero-term-body .accent { color: #F5B23A; font-weight: 700; }
.hero-term-body .cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: #5DC4DC;
  vertical-align: text-bottom;
  animation: term-blink 1.1s steps(1) infinite;
}
@keyframes term-blink {
  50% { opacity: 0; }
}

/* Status pill (shared with terminal headers) */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.02em;
}
.hero-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}
.hero-pill.running  { color: #5DC4DC; }
.hero-pill.awaiting { color: #B5A1F0; }
.hero-pill.approval { color: #F5B23A; animation: pulse-approval 1.4s infinite; }
@keyframes pulse-approval {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Individual terminal placements (rough chaotic grid). */
.hero-term[data-pos="1"] { top:   0px; left:   4%; animation-delay: -0.0s; }
.hero-term[data-pos="2"] { top:  14px; right:  3%; animation-delay: -2.2s; }
.hero-term[data-pos="3"] { top: 130px; left:  20%; animation-delay: -4.5s; z-index: 2; }
.hero-term[data-pos="4"] { top: 140px; right: 18%; animation-delay: -1.5s; z-index: 2; }
.hero-term[data-pos="5"] { top: 240px; left:  34%; animation-delay: -3.4s; z-index: 3; }
.hero-term[data-pos="6"] { top: 230px; right: 32%; animation-delay: -6.0s; z-index: 3; }

@keyframes hero-float {
  0%, 100% {
    transform: rotate(var(--rot, 0deg)) translate(0, 0);
  }
  33% {
    transform: rotate(calc(var(--rot, 0deg) + 0.6deg)) translate(-3px, -8px);
  }
  66% {
    transform: rotate(calc(var(--rot, 0deg) - 0.4deg)) translate(4px, 6px);
  }
}

/* On smaller screens, hide the outer terminals so the layout doesn't overflow. */
@media (max-width: 900px) {
  .hero-chaos { height: 280px; max-width: 540px; }
  .hero-term { width: 210px; font-size: 10px; }
  .hero-term[data-pos="1"] { left: 0; top: 0; }
  .hero-term[data-pos="2"] { right: 0; top: 8px; }
  .hero-term[data-pos="3"] { display: none; }
  .hero-term[data-pos="4"] { display: none; }
  .hero-term[data-pos="5"] { top: 150px; left: 8%; }
  .hero-term[data-pos="6"] { top: 160px; right: 8%; }
}

@media (max-width: 560px) {
  .hero-chaos { height: 240px; }
  .hero-term[data-pos="5"] { display: none; }
  .hero-term[data-pos="6"] { display: none; }
}

@media (prefers-color-scheme: dark) {
  .hero-term { background: #050E12; border-color: #1A2F38; }
}

.site-disclaimer {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--c-text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--c-border);
  padding-top: 14px;
}

@media (prefers-color-scheme: dark) {
  .hero-pill.running  { color: #5DC4DC; }
  .hero-pill.awaiting { color: #B5A1F0; }
  .hero-pill.approval { color: #F5B23A; }
}
