/* ============================================================
   LUXDUM — design tokens & base
   Style: Brutalism / Dark (OLED)
   Palette: near-black #0a0a0b, white #f4f4f5, accent #3b82f6
   ============================================================ */

:root {
  --color-background: #0a0a0b;
  --color-surface: #121214;
  --color-surface-2: #161618;
  --color-foreground: #f4f4f5;
  --color-muted: #a1a1aa;
  --color-border: #27272a;
  --color-accent: #3b82f6;
  --color-accent-ink: #0a0a0b;
  --color-ring: #f4f4f5;
  --color-selection-bg: #3b82f6;

  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --font-display: "Space Grotesk", "Noto Sans JP", sans-serif;

  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --border-width: 2px;
  --shadow-accent: 8px 8px 0 var(--color-accent);
  --shadow-ink: 8px 8px 0 var(--color-foreground);

  --container-max: 72rem;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

::selection {
  background: var(--color-selection-bg);
  color: var(--color-accent-ink);
}

/* フォーカスは必ず見える状態に */
:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 3px;
}

/* クリック可能な要素は cursor-pointer を付ける (.cursor-pointer クラス併用) */
a,
button,
[role="button"],
summary {
  cursor: pointer;
}

/* ---------- scroll snapping helpers ---------- */
[id] {
  scroll-margin-top: 5rem;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--color-foreground);
  color: var(--color-background);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}
@media (min-width: 48rem) {
  .container {
    padding-inline: 1.5rem;
  }
}
@media (min-width: 64rem) {
  .container {
    padding-inline: 2rem;
  }
}

.section {
  padding-block: 4rem;
}
@media (min-width: 48rem) {
  .section {
    padding-block: 6rem;
  }
}

/* ---------- progress bar ---------- */
.progress-bar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--color-border);
  z-index: 60;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--color-accent);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-background);
  border-bottom: var(--border-width) solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
  gap: var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.08em;
  min-height: 44px; /* タップ領域の確保 */
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: var(--border-width) solid var(--color-foreground);
  font-family: var(--font-display);
  font-size: 1.05rem;
  box-shadow: 3px 3px 0 var(--color-accent);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

/* ナビゲーション */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.75rem;
  background: var(--color-background);
  color: var(--color-foreground);
  border: var(--border-width) solid var(--color-foreground);
  font: inherit;
  font-weight: 700;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.nav-toggle:hover {
  box-shadow: 4px 4px 0 var(--color-accent);
  transform: translate(-2px, -2px);
}
.nav-toggle[aria-expanded="true"] {
  box-shadow: 4px 4px 0 var(--color-accent);
  transform: translate(-2px, -2px);
}

/* フルメニュー(モバイル) */
.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  background: var(--color-background);
  border-bottom: var(--border-width) solid var(--color-foreground);
  padding: var(--space-4) 1rem var(--space-8);
}
.site-nav.open {
  display: block;
}
.site-nav a {
  display: block;
  min-height: 44px;
  padding: 0.6rem 0.25rem;
  font-weight: 900;
  font-size: 1.4rem;
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}
.site-nav a:hover {
  color: var(--color-accent);
}

@media (min-width: 48rem) {
  .nav-toggle {
    display: none;
  }
  .site-nav {
    position: static;
    display: block;
    border: 0;
    padding: 0;
  }
  .site-nav ul {
    display: flex;
    gap: var(--space-2);
  }
  .site-nav a {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: var(--border-width) solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
  }
  .site-nav a:hover,
  .site-nav a:focus-visible {
    border-color: var(--color-foreground);
    box-shadow: inset 0 -4px 0 var(--color-accent);
  }
}

/* ---------- hero ---------- */
.hero {
  padding-block: 5rem 4rem;
}
@media (min-width: 48rem) {
  .hero {
    padding-block: 8rem 6rem;
  }
}

.hero-eyeline {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: var(--space-6);
  letter-spacing: 0.12em;
}

.hero-title {
  font-weight: 900;
  font-size: clamp(2.75rem, 9vw, 7rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin-bottom: var(--space-8);
}

.hero-title .accent {
  color: var(--color-accent);
  text-shadow: 5px 5px 0 rgba(59, 130, 246, 0.25);
}

.hero-lede {
  max-width: 34rem;
  font-size: 1.0625rem;
  color: var(--color-foreground);
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: var(--border-width) solid var(--color-foreground);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    color 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn-ghost {
  background: transparent;
  color: var(--color-foreground);
}

.btn-large {
  font-size: 1.125rem;
  padding: 1rem 2rem;
  width: 100%;
}
@media (min-width: 48rem) {
  .btn-large {
    width: auto;
  }
}

.btn:hover,
.btn:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 6px 6px 0 var(--color-foreground);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 6px 6px 0 rgba(59, 130, 246, 0.45);
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
  padding-block: 0.75rem;
  user-select: none;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.2em;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.marquee-track span.accent {
  color: var(--color-accent);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- section headings ---------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-left: 8px solid var(--color-accent);
  padding-left: 1.25rem;
  margin-bottom: var(--space-12);
}
@media (min-width: 48rem) {
  .section-head {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}

.section-head h2 {
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.2;
}

.section-index {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: 0.08em;
  font-size: 0.875rem;
}

/* ---------- cards (works) ---------- */
.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 48rem) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 64rem) {
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  position: relative;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  padding: 1.75rem 1.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.card:hover,
.card:focus-within {
  transform: translate(-4px, -4px);
  border-color: var(--color-foreground);
  box-shadow: var(--shadow-accent);
}

.card-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.15em;
  margin-bottom: var(--space-4);
}

.card h3 {
  font-weight: 900;
  font-size: 1.25rem;
  margin-bottom: var(--space-3);
  line-height: 1.4;
}

.card > p {
  color: var(--color-muted);
  font-size: 0.9375rem;
  margin-bottom: var(--space-4);
  line-height: 1.8;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags li {
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  letter-spacing: 0.05em;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  gap: var(--space-8);
}
@media (min-width: 64rem) {
  .about-grid {
    grid-template-columns: 3fr 2fr;
    gap: var(--space-16);
  }
}

.about-body {
  display: grid;
  gap: var(--space-4);
  max-width: 42rem;
  font-size: 1.0625rem;
}

.about-facts {
  align-self: start;
  border: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
}

.about-facts > div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: var(--space-3);
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.about-facts > div:last-child {
  border-bottom: 0;
}

.about-facts dt {
  font-weight: 700;
  color: var(--color-muted);
  font-size: 0.875rem;
}

.about-facts dd {
  font-weight: 700;
  overflow-wrap: anywhere; /* 長いドメイン名でもレイアウトを壊さない */
}

/* ---------- contact ---------- */
.contact-body {
  display: grid;
  gap: var(--space-8);
}

.contact-lede {
  max-width: 36rem;
  font-size: 1.0625rem;
}

.contact-actions {
  display: grid;
  gap: var(--space-6);
}

.sns-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.sns-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  border: var(--border-width) solid var(--color-foreground);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sns-link:hover,
.sns-link:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-accent);
}

/* ---------- footer ---------- */
.site-footer {
  border-top: var(--border-width) solid var(--color-border);
  margin-top: var(--space-8);
  padding-block: var(--space-8);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-foreground);
  letter-spacing: 0.1em;
}

.footer-domain a {
  text-decoration: none;
  cursor: pointer;
}
.footer-domain a:hover,
.footer-domain a:focus-visible {
  color: var(--color-accent);
}

/* ---------- reveal animation (IntersectionObserver) ----------
   js-reveal は JS が有効なときだけ html に付くクラス。
   JS 無効環境では要素を最初から可視のままにして本文を隠さない。 */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  transition-delay: 0ms;
}
.js-reveal .reveal.d1 {
  transition-delay: 80ms;
}
.reveal.d2 {
  transition-delay: 160ms;
}
.reveal.d3 {
  transition-delay: 240ms;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 動きの抑制 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js-reveal .reveal,
  .js-reveal .reveal.d1,
  .js-reveal .reveal.d2,
  .js-reveal .reveal.d3 {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .marquee-track {
    animation: none;
  }
  .btn,
  .card,
  .sns-link,
  .nav-toggle {
    transition: none;
  }
}

/* ---------- print ---------- */
@media print {
  .site-header,
  .progress-bar,
  .marquee {
    display: none;
  }
}
