:root {
  --bg: #fbf8ef;
  --bg-soft: #f3ead9;
  --panel: #fffdf8;
  --panel-strong: #fff8e9;
  --line: rgba(151, 113, 41, 0.24);
  --gold: #b8892f;
  --gold-strong: #7d5518;
  --white: #17130c;
  --muted: rgba(23, 19, 12, 0.72);
  --quiet: rgba(23, 19, 12, 0.54);
  --card-ink: #fffaf0;
  --card-muted: rgba(255, 250, 240, 0.76);
  --shadow: 0 20px 54px rgba(71, 49, 16, 0.14);
  color-scheme: light;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% -8%, rgba(184, 137, 47, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(251, 248, 239, 0.98) 56%, var(--bg)),
    var(--bg);
  color: var(--white);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent 0,
      transparent 22px,
      rgba(184, 137, 47, 0.12) 23px,
      transparent 24px,
      transparent 48px
    );
  background-size: 72px 72px;
  opacity: 0.72;
  animation: diagonal-lines-in 1100ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body::after {
  position: fixed;
  inset: -25% -10%;
  z-index: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(115deg, transparent 34%, rgba(255, 255, 255, 0.78) 45%, rgba(184, 137, 47, 0.14) 50%, transparent 62%);
  opacity: 0;
  transform: translateX(-30%) skewX(-12deg);
  animation: page-sheen 980ms ease-out 120ms both;
}

@keyframes diagonal-lines-in {
  from {
    opacity: 0;
    background-position: -88px -88px;
  }

  to {
    opacity: 0.72;
    background-position: 0 0;
  }
}

@keyframes page-sheen {
  0% {
    opacity: 0;
    transform: translateX(-38%) skewX(-12deg);
  }

  26% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateX(42%) skewX(-12deg);
  }
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

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

/* ── Skip Link ──────────────────────────────── */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  color: var(--bg);
  background: var(--gold-strong);
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ── Layout containers ──────────────────────── */

.site-header,
.hero,
.section-head,
.sample-grid,
.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* ── Header ──────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: #1d160b;
  font-family: Georgia, serif;
  font-size: 22px;
  font-style: italic;
  background: var(--gold);
  border-radius: 6px;
  letter-spacing: 0;
}

.brand-name,
.brand-label {
  display: block;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-label {
  margin-top: 2px;
  color: var(--quiet);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-nav a {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--gold-strong);
  background: rgba(217, 181, 101, 0.08);
  border-color: var(--line);
}

/* ── Hero ──────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  gap: 20px;
  align-items: end;
  padding: 26px 0 22px;
}

.eyebrow,
.panel-kicker,
.card-meta {
  margin: 0;
  color: var(--gold-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 10px 0 12px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.hero-text {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-panel {
  padding: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 233, 0.78));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(80, 55, 16, 0.08);
}

.hero-panel p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

/* ── Section Head ────────────────────────────── */

.section-head {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 18px 0 16px;
  border-top: 1px solid rgba(217, 181, 101, 0.18);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.02em;
}

.section-head p:last-child {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

/* ── Sample Grid ─────────────────────────────── */

.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 44px;
  counter-reset: card-counter;
}

/* ── Sample Cards ────────────────────────────── */

.sample-card {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  color: var(--card-ink);
  text-decoration: none;
  isolation: isolate;
  background: #17130c;
  border: 1px solid rgba(93, 62, 12, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
  counter-increment: card-counter;
}

.sample-card .card-meta {
  color: #f0cf86;
}

/* Card number — top right, CSS counter */
.sample-card::before {
  content: "0" counter(card-counter);
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  color: rgba(240, 207, 134, 0.65);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

/* Bottom gold line — expands on hover */
.sample-card::after {
  position: absolute;
  inset: auto 18px 18px 18px;
  height: 1px;
  content: "";
  background: rgba(217, 181, 101, 0.36);
  transform: scaleX(0.28);
  transform-origin: left;
  transition: transform 220ms ease, background 220ms ease;
}

.sample-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease, filter 220ms ease;
}

.card-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 7, 6, 0.04), rgba(8, 7, 6, 0.72) 55%, rgba(8, 7, 6, 0.94)),
    linear-gradient(90deg, rgba(8, 7, 6, 0.65), transparent 58%);
  transition: background 220ms ease;
}

.card-content {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 18px 30px;
}

.card-title,
.card-copy,
.card-action {
  display: block;
}

.card-title {
  margin-top: 8px;
  font-size: clamp(20px, 2.1vw, 27px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.card-copy {
  margin-top: 10px;
  color: var(--card-muted);
  font-size: 13px;
  line-height: 1.7;
}

.card-action {
  width: fit-content;
  margin-top: 16px;
  padding: 8px 12px;
  color: #f0cf86;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(8, 7, 6, 0.66);
  border: 1px solid rgba(217, 181, 101, 0.32);
  border-radius: 8px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

/* Hover & focus states */

.sample-card:hover,
.sample-card:focus-visible {
  transform: translateY(-4px);
  background: #201810;
  border-color: rgba(240, 207, 134, 0.62);
}

.sample-card:hover::after,
.sample-card:focus-visible::after {
  background: #f0cf86;
  transform: scaleX(1);
}

.sample-card:hover img,
.sample-card:focus-visible img {
  filter: saturate(1.05) contrast(1.03);
  transform: scale(1.045);
}

.sample-card:hover .card-action,
.sample-card:focus-visible .card-action {
  color: #17130c;
  background: #f0cf86;
  border-color: #f0cf86;
}

/* ── Toast ──────────────────────────────────── */

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(360px, calc(100% - 40px));
  padding: 14px 16px;
  color: var(--card-ink);
  background: rgba(23, 19, 12, 0.94);
  border: 1px solid rgba(240, 207, 134, 0.5);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Footer ──────────────────────────────────── */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 34px;
  color: var(--quiet);
  font-size: 13px;
  border-top: 1px solid rgba(217, 181, 101, 0.18);
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.site-footer a {
  color: var(--gold-strong);
  text-decoration: none;
}

/* ── Scroll Reveal ──────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Focus ──────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 4px;
}

/* ── Responsive ─────────────────────────────── */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .sample-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sample-card,
  .card-content {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero,
  .section-head,
  .sample-grid,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    align-items: flex-start;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .header-nav a {
    padding: 9px 8px;
    font-size: 12px;
  }

  .hero h1 {
    font-size: clamp(36px, 13vw, 52px);
  }

  .hero-text,
  .section-head p:last-child {
    font-size: 14px;
    line-height: 1.75;
  }

  .hero-panel {
    padding: 14px;
  }

  .sample-grid {
    gap: 10px;
  }

  .sample-card,
  .card-content {
    min-height: 244px;
  }

  .card-content {
    padding: 16px 12px 24px;
  }

  .card-meta {
    font-size: 10px;
  }

  .card-title {
    font-size: 17px;
  }

  .card-copy {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
  }

  .card-action {
    margin-top: 12px;
    padding: 7px 9px;
    font-size: 11px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer div {
    justify-content: flex-start;
  }
}

/* ── Reduced Motion ─────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  body::before,
  body::after {
    animation: none !important;
  }

  .sample-card:hover,
  .sample-card:focus-visible,
  .sample-card:hover img,
  .sample-card:focus-visible img {
    transform: none;
  }
}
