/* ============================================================
   Atelier Culling — Shared Stylesheet
   Google Fonts are loaded via <link> in each HTML <head>
   ============================================================ */

/* ---- Custom Properties ------------------------------------ */
:root {
  --bg:      #FAFAF7;
  --fg:      #1A1A1A;
  --accent:  #8B0000;
  --muted:   #6B6B6B;
  --border:  #E5E5E0;
  --code-bg: #F0F0EB;

  --font-serif: "Cormorant Garamond", "Shippori Mincho", "Hiragino Mincho ProN", Georgia, serif;
  --font-sans:  "Inter", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-mono:  "JetBrains Mono", "SF Mono", Consolas, monospace;

  --max-w: 720px;
  --pad-x: 1.5rem;

  /* Dark header palette */
  --header-bg:    rgba(12, 12, 12, 0.88);
  --header-text:  rgba(255, 255, 255, 0.88);
  --header-muted: rgba(255, 255, 255, 0.48);
  --header-hover: #ffffff;
  --header-sep:   rgba(255, 255, 255, 0.13);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
}

/* ---- Base ------------------------------------------------- */
body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---- Japanese font overrides ------------------------------ */
:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3 {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  letter-spacing: 0.03em;
  font-weight: 400;
}

:lang(ja) body {
  font-family: "Inter", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  line-height: 1.85;
}

/* Keep Latin wordmark in Cormorant Garamond even on JA pages */
:lang(ja) .site-hero-wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.04em;
}

/* ---- Accessibility ---------------------------------------- */
.skip-link {
  position: absolute;
  left: -100%;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.875rem;
  text-decoration: none;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

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

/* ---- Typography ------------------------------------------ */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.375rem; }

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.12s ease;
}

a:hover {
  color: var(--accent);
}

/* ---- Header ----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--header-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  /* Center content without an inner wrapper */
  padding-top: 1.0625rem;
  padding-bottom: 1.0625rem;
  padding-left:  clamp(var(--pad-x), 8vw, 8rem);
  padding-right: clamp(var(--pad-x), 8vw, 8rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-header :focus-visible {
  outline-color: rgba(255, 255, 255, 0.75);
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--header-text);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.12s ease;
}

.site-logo:hover {
  color: var(--header-hover);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 0.8125rem;
  text-decoration: none;
  color: var(--header-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.12s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--header-hover);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* Default lang-switcher colors (footer — light background) */
.lang-switcher a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.12s ease;
}

.lang-switcher a:hover {
  color: var(--fg);
}

.lang-switcher a[aria-current="true"] {
  color: var(--fg);
  font-weight: 500;
}

.lang-switcher .sep {
  color: var(--border);
  user-select: none;
}

/* Header lang-switcher overrides (dark background) */
.site-header .lang-switcher a {
  color: var(--header-muted);
}

.site-header .lang-switcher a:hover {
  color: var(--header-hover);
}

.site-header .lang-switcher a[aria-current="true"] {
  color: var(--header-text);
}

.site-header .lang-switcher .sep {
  color: var(--header-sep);
}

/* ---- Main ------------------------------------------------- */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ---- Sections --------------------------------------------- */
.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  margin-bottom: 1.5rem;
}

/* ---- Site Hero (homepage, full-bleed dark) ---------------- */
.site-hero {
  background: #0f0f0f;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(520px, 70vh, 760px);
  overflow: hidden;
}

.site-hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2.5rem 4.5rem max(2rem, 7vw);
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
  text-decoration: none;
}

.site-hero .hero-eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.site-hero-wordmark {
  font-family: var(--font-serif);
  font-size: clamp(3.75rem, 11vw, 8rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: #fff;
  margin-bottom: 2rem;
}

.site-hero-tagline {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.52);
  max-width: 460px;
  line-height: 1.72;
  margin-bottom: 0;
}

.site-hero-cta {
  display: flex;
  gap: 0.875rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Studio photo — right half of hero */
.site-hero-visual {
  position: relative;
  overflow: hidden;
}

.site-hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    #0f0f0f 0%,
    rgba(15, 15, 15, 0.65) 30%,
    rgba(15, 15, 15, 0) 65%);
  z-index: 1;
  pointer-events: none;
}

.site-hero-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: blur(1.5px) brightness(0.62);
  transform: scale(1.06);
  transform-origin: center center;
  border-radius: 0;
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6875rem 1.625rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 9999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
              transform 0.15s ease, box-shadow 0.15s ease;
}

/* Light-background variants */
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139, 0, 0, 0.22);
}

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

.btn-ghost:hover {
  color: var(--fg);
  border-color: var(--fg);
}

/* Dark-background variants (hero) */
.btn-inv {
  background: #fff;
  color: #111;
}

.btn-inv:hover {
  background: rgba(255, 255, 255, 0.88);
  color: #111;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12);
}

.btn-ghost-inv {
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost-inv:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

/* ---- About section ---------------------------------------- */
.about-body {
  max-width: 600px;
}

/* ---- Products --------------------------------------------- */
.product-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .product-grid:has(.product-card ~ .product-card) {
    grid-template-columns: 1fr 1fr;
  }
}

.product-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.10);
}

.product-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #F0F0EB 0%, #E8E8E2 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

.policy-subtitle {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 500;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.product-info {
  padding: 1.5rem;
}

.product-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.product-tagline {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.875rem;
}

.product-description {
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.product-status {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0;
}

/* ---- Contact ---------------------------------------------- */
.contact-pending {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ---- Footer ----------------------------------------------- */
.site-footer {
  max-width: var(--max-w);
  margin: 4rem auto 0;
  padding: 2rem var(--pad-x) 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.875rem 2rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.footer-nav a {
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--fg);
}

.footer-lang {
  margin-left: auto;
}

/* ---- Page header (inner pages) ---------------------------- */
.page-header {
  padding: 3rem 0 2rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---- Page content (legal, privacy, about) ----------------- */
.page-content {
  padding-bottom: 4rem;
}

.page-content > * + * {
  margin-top: 1rem;
}

.page-content h2 {
  font-size: 1.125rem;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.005em;
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content p,
.page-content li {
  font-size: 0.9375rem;
  line-height: 1.75;
}

.page-content ul,
.page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.page-content li {
  margin-bottom: 0.25rem;
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ---- Legal table ------------------------------------------ */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.75rem;
  font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}

.legal-table th {
  background: var(--code-bg);
  font-weight: 500;
  font-size: 0.8125rem;
  white-space: nowrap;
  width: 38%;
}

.lang-note {
  background: var(--code-bg);
  border-left: 3px solid var(--border);
  padding: 0.875rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

.legal-footnote {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.last-updated {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 3rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ---- About page ------------------------------------------- */
.about-lead {
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 0;
}

.timeline {
  list-style: none;
  margin-top: 1.5rem;
}

.timeline li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
}

.timeline li:last-child {
  border-bottom: 1px solid var(--border);
}

.timeline .tl-date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  padding-top: 0.125rem;
}

/* ---- Animations ------------------------------------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes hero-rise {
  from { scale: 0.95; rotate: x 10deg; }
  to   { scale: 1;    rotate: x 0deg;  }
}

/* Scroll-driven product card tilt-to-flat */
@supports (animation-timeline: scroll()) {
  .product-grid {
    perspective: 1200px;
  }

  .product-card {
    animation: hero-rise linear both;
    animation-timeline: view();
    animation-range: entry 20% entry 80%;
  }
}

/* Site-hero entry — staggered on load */
.site-hero .hero-eyebrow  { animation: fade-up 0.5s 0.05s ease both; }
.site-hero-wordmark        { animation: fade-up 0.65s 0.13s ease both; }
.site-hero-tagline         { animation: fade-up 0.6s 0.24s ease both; }
.site-hero-cta             { animation: fade-up 0.6s 0.34s ease both; }
.site-hero-visual          { animation: fade-in 1.4s 0.5s ease both; }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .site-hero { grid-template-columns: 1fr; min-height: auto; }
  .site-hero-visual { height: 240px; }
  .site-hero-visual::before { background: linear-gradient(to bottom, #0f0f0f 0%, rgba(15,15,15,0.5) 40%, rgba(15,15,15,0) 100%); }
  .site-hero-text { padding: 3.5rem var(--pad-x) 3rem; }
  .site-hero-cta { gap: 0.75rem; }
  .btn { padding: 0.6rem 1.25rem; font-size: 0.8125rem; }

  .site-header {
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
  }

  .header-right {
    gap: 1.25rem;
  }

  .legal-table {
    font-size: 0.8375rem;
  }

  .legal-table th {
    width: 42%;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .footer-lang {
    margin-left: 0;
  }
}

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

  a,
  .btn,
  .product-card,
  .site-logo,
  .site-nav a,
  .lang-switcher a {
    transition: none;
  }

  .site-hero .hero-eyebrow,
  .site-hero-wordmark,
  .site-hero-tagline,
  .site-hero-cta,
  .site-hero-visual,
  .product-card {
    animation: none;
  }
}
