/* 雛象株式会社 — compact homepage
   Brand accent: champagne gold #B39B78 on white / charcoal #2B2B2B.
*/

:root {
  --gold: #b39b78;
  --gold-hover: #c4ad8c;
  --gold-deep: #8f7a5c;
  --charcoal: #2b2b2b;
  --charcoal-deep: #1f1f1f;
  --ink: #2b2b2b;
  --muted: #66605a;
  --line: #e4e0da;
  --cream: #f6f4f0;
  --white: #ffffff;
  --header-h: 3.5rem;
  --max: 1080px;
  --pad: 24px;
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  word-break: auto-phrase;
  line-break: strict;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.45;
  margin: 0;
}

p {
  margin: 0;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.nowrap {
  white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.4rem 0.75rem;
  background: var(--charcoal);
  color: var(--white);
  text-decoration: none;
  font-size: 0.85rem;
}

.skip-link:focus {
  top: 0.75rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--gold);
  flex-shrink: 0;
}

.brand-mark {
  width: 1.85rem;
  height: 1.85rem;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-jp {
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: var(--gold);
}

.brand-en {
  font-weight: 600;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  color: var(--gold);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
}

.menu-button {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.menu-button span,
.menu-button span::before,
.menu-button span::after {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: var(--charcoal);
  position: absolute;
  left: 50%;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-button span {
  top: 50%;
  transform: translate(-50%, -50%);
}

.menu-button span::before,
.menu-button span::after {
  content: "";
  left: 0;
}

.menu-button span::before {
  top: -5px;
}

.menu-button span::after {
  top: 5px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0 1.15rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  padding: 0.25rem 0;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold-deep);
}

/* Hero — modest two-column banner, not full-viewport */
.hero {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 2rem;
  align-items: center;
  min-height: 380px;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
}

.hero h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1.15rem;
}

.hero-media {
  border: 1px solid var(--line);
  background: #111;
  overflow: hidden;
}

.hero-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  max-width: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55em 1.2em;
  background: var(--gold);
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--gold);
  border-radius: 2px;
}

.btn:hover,
.btn:focus-visible {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}

.btn--ghost {
  background: transparent;
  color: #f4efe8;
  border-color: var(--gold);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--gold);
  color: var(--charcoal);
}

/* Sections */
.section {
  padding: 56px 0;
}

.section--cream {
  background: var(--cream);
}

.section--charcoal {
  background: var(--charcoal);
  color: #f4efe8;
}

.section-head {
  margin: 0 0 1.25rem;
}

.section-head h2 {
  font-size: 1.25rem;
  color: var(--charcoal);
  margin-bottom: 0.25rem;
}

.section-head .lead {
  color: var(--muted);
  font-size: 0.9rem;
}

.section--charcoal .section-head h2 {
  color: #f4efe8;
}

.section--charcoal .section-head .lead {
  color: rgba(244, 239, 232, 0.78);
}

/* Services */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1rem 1rem 1.1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-num {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.card p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* Case videos — compact 4-col thumbnails */
.case-video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.case-video-card,
.game-video-card {
  min-width: 0;
}

.case-video-wrap,
.game-video-wrap {
  position: relative;
  aspect-ratio: 9 / 16;
  background: var(--charcoal-deep);
  overflow: hidden;
  border: 1px solid var(--line);
}

.case-video-wrap video,
.game-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--charcoal-deep);
}

.case-video-title,
.game-video-caption {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  margin: 0.5rem 0 0;
  line-height: 1.45;
}

.case-video-title {
  min-height: 2.4em;
}

/* Game */
.game-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 28rem);
  gap: 1.25rem;
  align-items: start;
}

.game-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 1.15rem 1.25rem;
}

.game-badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.game-title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
}

.game-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1.25rem;
  align-items: center;
}

.about-logo {
  width: 96px;
  height: auto;
  object-fit: contain;
}

.about-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.about-en {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--gold-deep);
  margin-bottom: 0.55rem;
}

.about-body {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

/* Contact */
.contact-body {
  max-width: 36rem;
  margin: 0 0 1rem;
  color: rgba(244, 239, 232, 0.85);
  font-size: 0.9rem;
}

.contact-panel {
  margin: 0 0 1.1rem;
  border-top: 1px solid rgba(179, 155, 120, 0.4);
  border-bottom: 1px solid rgba(179, 155, 120, 0.4);
  padding: 0.9rem 0;
}

.contact-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
  color: #f4efe8;
}

.contact-en {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.85;
  color: rgba(244, 239, 232, 0.9);
}

.contact-list a {
  color: #f4efe8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-actions {
  margin: 0;
}

/* Footer */
.site-footer {
  background: var(--charcoal-deep);
  color: rgba(244, 239, 232, 0.62);
  padding: 0.85rem 0;
  font-size: 0.75rem;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

::selection {
  background: rgba(179, 155, 120, 0.35);
  color: var(--charcoal);
}

#top,
#services,
#cases,
#game,
#about,
#contact {
  scroll-margin-top: calc(var(--header-h) + 0.5rem);
}

/* Responsive */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 1.1rem;
    min-height: 0;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .hero-media {
    max-width: 28rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .case-video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .case-video-title {
    min-height: 0;
  }

  .game-row {
    grid-template-columns: 200px 1fr;
  }

  .menu-button {
    display: block;
    z-index: 120;
  }

  .nav-layer {
    position: fixed;
    inset: 0;
    z-index: 110;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
  }

  .site-nav {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(18rem, 84vw);
    background: var(--white);
    border-left: 1px solid var(--line);
    padding: calc(var(--header-h) + 0.75rem) 1.25rem 1.25rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .site-nav a {
    font-size: 0.95rem;
    padding: 0.55rem 0;
    display: inline-block;
  }

  #nav-toggle:checked ~ .nav-layer {
    visibility: visible;
    pointer-events: auto;
  }

  #nav-toggle:checked ~ .nav-layer .site-nav {
    transform: translateX(0);
  }

  #nav-toggle:checked + .menu-button span {
    background: transparent;
  }

  #nav-toggle:checked + .menu-button span::before {
    top: 0;
    transform: rotate(45deg);
  }

  #nav-toggle:checked + .menu-button span::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(43, 43, 43, 0.35);
    z-index: 90;
  }

  #nav-toggle:checked ~ .menu-backdrop {
    display: block;
  }
}

@media (max-width: 600px) {
  :root {
    --pad: 16px;
  }

  body {
    font-size: 15px;
  }

  .section {
    padding: 36px 0;
  }

  .hero h1 {
    font-size: 1.3rem;
  }

  .hero-inner {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .hero-sub {
    margin-bottom: 0.9rem;
  }

  .hero-media {
    max-width: 17rem;
  }

  .game-row {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .game-video-card {
    max-width: 200px;
  }

  .case-video-grid {
    gap: 10px 12px;
  }

  .about-grid {
    grid-template-columns: 80px 1fr;
    gap: 0.9rem;
  }

  .about-logo {
    width: 80px;
  }
}

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

  .btn,
  .site-nav,
  .menu-button span,
  .menu-button span::before,
  .menu-button span::after {
    transition: none;
  }
}

h1, h2, h3, .lead, .hero-sub, .contact-body, .about-body, .case-video-title {
  text-wrap: pretty;
}
