/* ============================================================
   NYANWANWAON — production stylesheet
   Ported from the "Organic" design system with site-specific
   color overrides (see design handoff README: the chalk-white /
   ink-black ground is deliberate — do NOT revert to warm cream,
   it makes the black-and-white dogs look muddy).
   ============================================================ */

/* ---------- Tokens: light (default) ---------- */
:root,
[data-theme="light"] {
  --color-bg: #edeae4;
  --color-surface: #f7f5f1;
  --color-text: #17161a;

  --color-accent: #b07d2a;
  --color-accent-100: #f4e9d3;
  --color-accent-200: #e8d3a9;
  --color-accent-300: #d9b877;
  --color-accent-600: #97691f;
  --color-accent-700: #7c5617;
  --color-accent-800: #5e3f0f;
  --color-accent-900: #402a08;

  --color-accent-2: #4d6360;
  --color-accent-2-100: #dde6e4;
  --color-accent-2-800: #2c3d3b;

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-divider: color-mix(in srgb, #17161a 14%, transparent);

  --font-heading: "Caprasimo", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-jp: "Zen Maru Gothic", "Figtree", system-ui, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2e2b25 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 22%, transparent);

  --pad-x: clamp(20px, 5vw, 64px);
  --pad-section: clamp(56px, 8vw, 104px);
}

/* ---------- Tokens: dark ----------
   NOTE: the accent/neutral ramps are intentionally INVERTED here
   (100 darkest → 900 lightest) so that components using e.g.
   --color-accent-800 as "text on tag" keep their contrast
   relationship against the ground. Re-measure tag/button contrast
   whenever you touch these. */
[data-theme="dark"] {
  --color-bg: #16151a;
  --color-surface: #201f26;
  --color-text: #f2efe9;

  --color-accent: #e0a24e;
  --color-accent-100: #3a2d16;
  --color-accent-200: #f0cd93;
  --color-accent-300: #e8bc73;
  --color-accent-600: #c9873a;
  --color-accent-700: #a86c26;
  --color-accent-800: #f0cd93;
  --color-accent-900: #f7e4c4;

  --color-accent-2: #86a49f;
  --color-accent-2-100: #2a3634;
  --color-accent-2-800: #cfe0dc;

  --color-neutral-100: #24232a;
  --color-neutral-200: #2c2b33;
  --color-neutral-300: #38363f;
  --color-neutral-400: #4a4852;
  --color-neutral-500: #6a6774;
  --color-neutral-600: #8d8a97;
  --color-neutral-700: #b3b0ba;
  --color-neutral-800: #d6d3da;
  --color-neutral-900: #f2efe9;

  --color-divider: color-mix(in srgb, #f2efe9 18%, transparent);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-md: 0 3px 12px rgba(0, 0, 0, .5);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, .55);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0;
}

p { margin: 0; }
img { display: block; max-width: 100%; }
figure { margin: 0; }

a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); }
[data-theme="dark"] a { color: var(--color-accent-300); }
[data-theme="dark"] a:hover { color: var(--color-accent-200); }

.jp { font-family: var(--font-jp); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

.washed { filter: saturate(.6) contrast(.85) brightness(1.1) opacity(.94); }
.washed img { width: 100%; height: 100%; object-fit: cover; }

.container { max-width: 1180px; margin: 0 auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Motion ---------- */
@keyframes nw-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

[data-motion="reduced"] *,
[data-motion="reduced"] *::before,
[data-motion="reduced"] *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: 400;
  font-size: 14px; line-height: 1.2;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  min-height: 44px;
  white-space: nowrap;
}
.btn svg { display: block; flex: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); color: var(--color-bg); }
.btn-primary:active { background: var(--color-accent-700); }

.btn-secondary { border-color: var(--color-divider); color: var(--color-text); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); color: var(--color-text); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }

.btn-ghost { color: var(--color-accent-700); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent-700); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
[data-theme="dark"] .btn-ghost { color: var(--color-accent-300); }
[data-theme="dark"] .btn-ghost:hover { color: var(--color-accent-200); }

.btn-lg { padding: 15px 28px; font-size: 16px; min-height: 48px; }

.icon-btn {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--color-divider);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center;
  font-size: 11px; letter-spacing: .02em;
  padding: 3px 10px;
  border-radius: 999px;
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent-700); }
[data-theme="dark"] .tag-outline { color: var(--color-accent-300); }
.tag-bold { font-weight: 700; }

/* ---------- Inputs ---------- */
.input {
  min-height: 48px; padding: 0 20px; font: inherit;
  font-size: 15px; color: var(--color-text);
  caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: 999px;
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
.input::placeholder { color: color-mix(in srgb, var(--color-text) 45%, transparent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 14px var(--pad-x);
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-divider);
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  text-decoration: none; color: var(--color-text);
}
.brand:hover { color: var(--color-text); }
.brand-en { font-family: var(--font-heading); font-size: 22px; letter-spacing: -.01em; }
.brand-jp { font-size: 12px; opacity: .6; }

.nav-desktop { display: none; gap: 6px; margin-left: auto; }
.nav-desktop a {
  padding: 8px 14px; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: 14px;
  white-space: nowrap; color: var(--color-text);
}
.nav-desktop a:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); color: var(--color-text); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-desktop + .header-actions { margin-left: 0; }

.header-cta { font-size: 14px; }

/* Mobile nav (hamburger) — desktop nav is hidden under 1080px */
.nav-toggle { display: grid; }
@media (min-width: 1080px) {
  .nav-desktop { display: flex; }
  .nav-toggle { display: none; }
}
.nav-mobile {
  position: absolute; top: 100%; left: 0; right: 0;
  display: none; flex-direction: column;
  padding: 10px var(--pad-x) 18px;
  background: color-mix(in srgb, var(--color-bg) 96%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-divider);
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: flex; align-items: center; min-height: 48px;
  padding: 0 6px;
  text-decoration: none; font-weight: 600; font-size: 16px;
  color: var(--color-text);
  border-radius: 12px;
}
.nav-mobile a:hover { background: color-mix(in srgb, var(--color-text) 8%, transparent); color: var(--color-text); }
@media (min-width: 1080px) { .nav-mobile { display: none !important; } }
@media (max-width: 480px) { .header-cta { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(48px, 8vw, 104px) var(--pad-x) clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-blob {
  position: absolute; top: -140px; right: -120px;
  width: 460px; height: 460px; border-radius: 50%;
  background: color-mix(in srgb, var(--color-accent) 16%, transparent);
  pointer-events: none;
}
.hero-copy { position: relative; max-width: 640px; }
.hero-copy h1 { font-size: clamp(44px, 6.4vw, 82px); line-height: 1.02; margin: 20px 0 0; }
.hero-jp { font-size: clamp(16px, 1.5vw, 19px); margin: 14px 0 0; opacity: .72; }
.hero-lead { font-size: 18px; line-height: 1.7; margin: 22px 0 0; max-width: 46ch; text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { font-size: 13px; opacity: .62; margin: 18px 0 0; }

.hero-photos {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 22px);
  align-items: center;
}
.hero-photo { overflow: hidden; }
.hero-photo-tall {
  grid-row: span 2; aspect-ratio: 3 / 4;
  border-radius: 200px 200px 32px 32px;
  box-shadow: var(--shadow-lg);
  animation: nw-bob 7s ease-in-out infinite;
}
.hero-photo-circle {
  aspect-ratio: 1; border-radius: 50%;
  box-shadow: var(--shadow-md);
  animation: nw-bob 6s ease-in-out infinite .8s;
}
.hero-photo-drop {
  aspect-ratio: 1; border-radius: 32px 200px 200px 200px;
  box-shadow: var(--shadow-md);
  animation: nw-bob 8s ease-in-out infinite .4s;
}

/* ---------- Sections ---------- */
.section { padding: var(--pad-section) var(--pad-x); }
.section-alt { background: var(--color-surface); }

.section-title { font-size: clamp(32px, 4vw, 52px); }
.section-sub-jp { opacity: .68; margin: 8px 0 0; font-size: 16px; }

.section-head-row {
  display: flex; flex-wrap: wrap; align-items: end;
  gap: 18px; justify-content: space-between;
}

/* ---------- Crew ---------- */
.crew-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(20px, 2.6vw, 34px);
  margin-top: clamp(32px, 4vw, 54px);
}
.pet-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 16px;
}
.pet-photo { aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; }
.pet-name-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.pet-name { font-size: 30px; }
.pet-name-jp { font-size: 15px; opacity: .66; }
.pet-meta {
  font-size: 14px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--color-accent-700);
}
[data-theme="dark"] .pet-meta { color: var(--color-accent-300); }
.pet-voice { font-size: 16px; line-height: 1.65; text-wrap: pretty; }
.pet-desc-jp { font-size: 14px; opacity: .68; line-height: 1.7; }
.pet-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.pet-card .btn { width: 100%; }

/* ---------- Silly Moves ---------- */
.moves-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(14px, 2vw, 24px);
  margin-top: clamp(28px, 4vw, 46px);
}
.move-photo {
  aspect-ratio: 1; border-radius: 28px;
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.move-caption { font-size: 14px; margin-top: 10px; color: var(--color-text); }
.move-caption .jp { opacity: .6; }

.quote {
  margin: clamp(36px, 5vw, 64px) 0 0;
  padding: clamp(28px, 4vw, 44px);
  background: color-mix(in srgb, var(--color-accent-2) 22%, var(--color-bg));
  border-radius: var(--radius-lg);
  max-width: 900px;
}
.quote p {
  font-family: var(--font-heading);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.3;
}
.quote footer { margin-top: 14px; font-size: 15px; opacity: .72; }

/* ---------- Shop ---------- */
.shop-note { font-size: 14px; opacity: .7; max-width: 30ch; }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
  margin-top: clamp(30px, 4vw, 48px);
}
.goods-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.goods-img { aspect-ratio: 1; position: relative; background: #ffffff; overflow: hidden; }
.goods-img img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.goods-img .goods-badge {
  position: absolute; top: 12px; left: 12px;
}
.goods-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.goods-name { font-size: 21px; }
.goods-name-jp { font-size: 13px; opacity: .65; }
.goods-desc { font-size: 14px; opacity: .78; line-height: 1.55; }
.goods-price { font-family: var(--font-heading); font-size: 20px; margin-top: 6px; }
.goods-price span { font-size: 14px; opacity: .6; }
.goods-card .btn { margin-top: auto; }
.goods-body .btn { margin-top: auto; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2.2vw, 28px);
  margin-top: clamp(28px, 3.5vw, 44px);
}
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-icon {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--color-accent-2) 30%, transparent);
  color: var(--color-accent-2-800);
}
.trust-item h4 { font-size: 18px; margin: 0 0 4px; }
.trust-item p { font-size: 14px; opacity: .74; line-height: 1.55; }

/* ---------- Follow ---------- */
.follow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.follow-title { font-size: clamp(30px, 3.6vw, 46px); }
.follow-desc { font-size: 16px; line-height: 1.7; margin: 18px 0 0; max-width: 44ch; }
.follow-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.follow-ctas .btn { min-height: 48px; padding: 14px 24px; gap: 10px; }
.feed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feed-photo { aspect-ratio: 1; border-radius: 20px; overflow: hidden; }

/* ---------- Restock ---------- */
.restock-section { padding: 0 var(--pad-x) clamp(56px, 8vw, 96px); }
.restock {
  background: color-mix(in srgb, var(--color-accent) 14%, var(--color-bg));
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 52px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px; align-items: center;
}
.restock h2 { font-size: clamp(26px, 3vw, 38px); }
.restock .jp { opacity: .7; margin: 8px 0 0; font-size: 15px; }
.restock form { display: flex; flex-wrap: wrap; gap: 12px; }
.restock .input { flex: 1 1 200px; }
.restock .btn { min-height: 48px; padding: 0 26px; }
.restock-status { font-size: 14px; margin: 10px 0 0; flex-basis: 100%; }
.restock-status[data-state="error"] { color: #a3271e; font-weight: 600; }
[data-theme="dark"] .restock-status[data-state="error"] { color: #ff9d94; }

/* ---------- Footer ---------- */
.site-footer {
  padding: clamp(32px, 4vw, 52px) var(--pad-x);
  border-top: 1px solid var(--color-divider);
  display: flex; flex-wrap: wrap; gap: 18px;
  justify-content: space-between; align-items: center;
}
.footer-brand { font-family: var(--font-heading); font-size: 20px; }
.footer-copy { font-size: 13px; opacity: .6; margin: 4px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; }

/* ---------- Legal page ---------- */
.legal-main { padding: clamp(40px, 6vw, 72px) var(--pad-x); }
.legal-main .container { max-width: 780px; }
.legal-main h1 { font-size: clamp(32px, 4vw, 48px); }
.legal-main h2 { font-size: clamp(24px, 3vw, 32px); margin-top: clamp(36px, 5vw, 56px); }
.legal-main h3 { font-size: 19px; margin-top: 28px; }
.legal-main p, .legal-main li { font-size: 15px; line-height: 1.75; margin-top: 10px; }
.legal-main .jp-block { opacity: .75; font-size: 14px; }
.legal-main table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; }
.legal-main th, .legal-main td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
}
.legal-main th { width: 32%; font-weight: 600; }
.legal-back { display: inline-flex; margin-top: 40px; }
