/* =========================================================
   AKITOMO GARAGE — 深夜の開発ガレージ / terminal x pixel
   ========================================================= */

:root {
  --bg:      #0D0E12;
  --bg-alt:  #101218;
  --ink:     #E6E4DD;
  --muted:   #8A8A82;
  --line:    #1B1C22;
  --line-2:  #24262F;
  --accent:  #E8B75A;   /* amber — 作業灯 */
  --accent-d:#C99742;
  --status:  #7CF29C;   /* 状態表示のみ */

  --maxw: 1080px;
  --pad: clamp(20px, 5vw, 64px);

  --f-disp: "DotGothic16", "Zen Kaku Gothic New", sans-serif;
  --f-body: "Zen Kaku Gothic New", sans-serif;
  --f-pix:  "Silkscreen", monospace;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* blueprint pixel grid */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  background-position: -1px -1px;
  overflow-x: hidden;
}
/* vignette so the grid reads as atmosphere, not noise */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, transparent 35%, rgba(13,14,18,0.85) 100%);
}

img, svg { max-width: 100%; }

.mono { font-family: var(--f-mono); letter-spacing: 0; }
.ok   { color: var(--status); }

/* ---------- accessibility helpers ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #17140A; padding: 10px 16px;
  font-family: var(--f-mono); font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- crop marks frame ---------- */
.frame { position: fixed; inset: 14px; z-index: 40; pointer-events: none; }
.crop { position: absolute; width: 12px; height: 12px; }
.crop::before, .crop::after {
  content: ""; position: absolute; background: var(--line-2);
}
.crop::before { width: 12px; height: 1px; top: 0; }
.crop::after  { width: 1px; height: 12px; left: 0; }
.crop--tl { top: 0; left: 0; }
.crop--tr { top: 0; right: 0; }
.crop--tr::before { right: 0; } .crop--tr::after { left: auto; right: 0; }
.crop--bl { bottom: 0; left: 0; }
.crop--bl::before { bottom: 0; top: auto; } .crop--bl::after { bottom: 0; }
.crop--br { bottom: 0; right: 0; }
.crop--br::before { bottom: 0; top: auto; right: 0; }
.crop--br::after  { bottom: 0; left: auto; right: 0; }
@media (max-width: 640px) { .frame { display: none; } }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 14px var(--pad);
  background: rgba(13,14,18,0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { color: var(--accent); image-rendering: pixelated; }
.brand__word { font-family: var(--f-pix); font-size: 13px; letter-spacing: 0.02em; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  font-family: var(--f-mono); font-size: 12.5px; text-decoration: none;
  color: var(--muted); padding: 8px 10px; letter-spacing: 0;
  transition: color .18s ease;
}
.site-nav a:hover { color: var(--ink); }
.site-nav__cta {
  color: var(--bg) !important; background: var(--accent);
  border: 1px solid var(--accent);
}
.site-nav__cta:hover { background: var(--accent-d); }
@media (max-width: 760px) {
  .site-nav a:not(.site-nav__cta) { display: none; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(60px, 12vh, 140px) var(--pad) clamp(50px, 9vh, 110px);
}
.hero__terminal {
  position: relative; z-index: 2;
  border-left: 1px solid var(--line-2);
  padding-left: clamp(16px, 3vw, 34px);
}
.termline { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.termline .prompt { color: var(--status); }
.termline .path { color: var(--accent); }
.termline .cmd { color: var(--ink); }
.prompt { color: var(--status); }

.hero__title {
  font-family: var(--f-disp);
  font-weight: 400;
  font-size: clamp(38px, 8vw, 82px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin: 0 0 26px;
  color: var(--ink);
}
.hero__type { display: inline; }

.hero__lede {
  max-width: 42ch; font-size: clamp(15px, 1.5vw, 17px);
  color: var(--muted); line-height: 2; margin: 0 0 30px;
}

.caret {
  display: inline-block; width: 0.62em; height: 1.05em;
  background: var(--accent); margin-left: 4px;
  transform: translateY(0.16em);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }

.statusline {
  list-style: none; margin: 0 0 34px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-size: 12.5px; color: var(--muted);
}
.statusline b { color: var(--ink); font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; transform: translateY(-1px); image-rendering: pixelated; }
.dot--on { background: var(--status); box-shadow: 0 0 0 2px rgba(124,242,156,0.15); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__grid { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 13.5px; letter-spacing: 0;
  text-decoration: none; padding: 13px 22px; border: 1px solid var(--line-2);
  color: var(--ink); background: transparent;
  transition: transform .12s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.btn--solid { background: var(--accent); color: #17140A; border-color: var(--accent); font-weight: 500; }
.btn--solid:hover { background: var(--accent-d); border-color: var(--accent-d); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 16px 30px; font-size: 15px; }

/* ---------- generic block ---------- */
.block {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(56px, 10vh, 110px) var(--pad);
  border-top: 1px solid var(--line);
}
.block--alt { background: var(--bg-alt); max-width: none; }
.block--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.block__label {
  color: var(--accent); font-size: 12.5px; letter-spacing: 0.06em;
  margin: 0 0 14px;
}
.block__title {
  font-family: var(--f-disp); font-weight: 400;
  font-size: clamp(26px, 4vw, 40px); line-height: 1.35;
  margin: 0 0 20px; letter-spacing: 0.02em;
}
.block__intro { max-width: 56ch; color: var(--muted); margin: 0 0 40px; }

/* ---------- services cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: 1fr 1fr; }
.card { background: var(--bg); padding: clamp(24px, 3.5vw, 40px); position: relative; }
.block--alt .card { background: var(--bg-alt); }
.card__no { position: absolute; top: 20px; right: 22px; color: var(--line-2); font-size: 26px; font-weight: 700; }
.card__title { font-size: 18px; font-weight: 700; margin: 0 0 12px; letter-spacing: 0.01em; }
.card__body { color: var(--muted); font-size: 14.5px; margin: 0; line-height: 1.95; }
.card { transition: background .2s ease; }
.card:hover { background: var(--bg-alt); }
.card:hover .card__no { color: var(--accent); transition: color .2s ease; }
@media (max-width: 680px) { .cards { grid-template-columns: 1fr; } }

/* ---------- approach ---------- */
.approach { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(20px, 3vw, 40px); }
.approach__item { border-top: 2px solid var(--line-2); padding-top: 20px; }
.approach__k {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid var(--accent); color: var(--accent);
  font-size: 15px; margin-bottom: 16px;
}
.approach__item h3 { font-size: 17px; margin: 0 0 10px; }
.approach__item p { color: var(--muted); font-size: 14.5px; margin: 0; line-height: 1.95; }
@media (max-width: 720px) { .approach { grid-template-columns: 1fr; } }

/* ---------- build log ---------- */
.log { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--line); }
.log__row {
  display: grid; grid-template-columns: 92px minmax(0,1fr) auto; align-items: baseline; gap: 18px;
  padding: 20px 6px; border-bottom: 1px solid var(--line);
}
.log__meta { color: var(--accent); font-size: 11.5px; letter-spacing: 0.08em; }
.log__link { color: var(--ink); text-decoration: none; font-family: var(--f-mono); font-size: 15px; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: border-color .18s ease, color .18s ease; }
.log__link:hover { color: var(--accent); border-color: var(--accent); }
.log__note { color: var(--muted); font-size: 13px; }
.log__todo { color: var(--line-2); font-size: 12px; }
@media (max-width: 640px) {
  .log__row { grid-template-columns: 74px 1fr; }
  .log__note { grid-column: 2; }
}

/* ---------- about ---------- */
.about__name { font-family: var(--f-disp); font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; }
.about__romaji { color: var(--muted); font-size: 14px; }
.about__lead { font-size: 16px; margin: 0 0 16px; max-width: 60ch; }
.about__body { color: var(--muted); max-width: 66ch; margin: 0 0 26px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips li { border: 1px solid var(--line-2); color: var(--muted); font-size: 12px; padding: 6px 12px; }

/* ---------- company spec sheet ---------- */
.spec { margin: 0; border: 1px solid var(--line); }
.spec__row { display: grid; grid-template-columns: 150px 1fr; border-bottom: 1px solid var(--line); }
.spec__row:last-child { border-bottom: 0; }
.spec dt {
  font-family: var(--f-mono); font-size: 12.5px; color: var(--muted);
  padding: 18px 20px; background: var(--bg-alt); border-right: 1px solid var(--line);
  letter-spacing: 0;
}
.block--alt .spec dt { background: var(--bg); }
.spec dd { margin: 0; padding: 18px 22px; font-size: 15px; line-height: 1.7; }
.spec dd a { color: var(--accent); text-decoration: none; }
.spec dd a:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .spec__row { grid-template-columns: 1fr; }
  .spec dt { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- contact ---------- */
.contact { text-align: left; }
.prompt-box {
  border: 1px solid var(--line-2); background: var(--bg);
  padding: 20px 22px; margin: 0 0 28px; font-size: 14px; overflow-x: auto;
}
.block--alt .prompt-box { background: var(--bg); }
.prompt-box__line { white-space: nowrap; }
.prompt-box .caret { transform: translateY(0.14em); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 30px var(--pad); }
.site-foot__row {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: var(--muted);
}
.site-foot__row a { color: var(--muted); text-decoration: none; }
.site-foot__row a:hover { color: var(--accent); }

/* ---------- scroll reveal (JS-gated) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .caret, .dot--on { animation: none; }
}
