/* Meow Meow Studio site stylesheet — the one CSS file both languages link.
   Warm paper + ink, one orange accent; dark mode follows the OS. Tang La keeps its own green, used only
   on its product card (--tl*) so the studio and the app read as parent / child. */

:root {
  --bg: #fbf6ee;
  --surface: #ffffff;
  --surface-tint: #f5ecdd;
  --ink: #2b2118;
  --ink-soft: #5c4e42;
  --ink-faint: #8a7a6b;
  --border: #e8dccb;
  --accent: #b5530f;
  --accent-hover: #9a460b;
  --on-accent: #ffffff;
  --accent-bg: #fbe9d6;
  --cat: #f0a15a;
  --cat-ink: #2b2118;
  --cat-pink: #f4b7a6;
  --tl: #2e7d5b;
  --tl-bg: #e8f3ee;
  --tl-ink: #1e5a41;
  --shadow: 0 1px 2px rgba(43, 33, 24, 0.05), 0 12px 32px -16px rgba(43, 33, 24, 0.22);
  --radius: 20px;
  --font-display: "Fraunces", "Trirong", "IBM Plex Sans Thai", ui-serif, Georgia, serif;
  --font-body: "IBM Plex Sans Thai", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "IBM Plex Sans Thai", ui-monospace, Consolas, monospace;
}

:root:lang(en) {
  --font-display: "Fraunces", "IBM Plex Sans Thai", ui-serif, Georgia, serif;
  --font-body: "IBM Plex Sans", "IBM Plex Sans Thai", ui-sans-serif, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1512;
    --surface: #231d18;
    --surface-tint: #2a221b;
    --ink: #f3ebe1;
    --ink-soft: #c9bcad;
    --ink-faint: #8f8173;
    --border: #3a3028;
    --accent: #f0a15a;
    --accent-hover: #f6b377;
    --on-accent: #2b1a0c;
    --accent-bg: #3a2616;
    --tl: #4caf82;
    --tl-bg: #1b2d25;
    --tl-ink: #7bc9a2;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -16px rgba(0, 0, 0, 0.6);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

:root:lang(th) body {
  line-height: 1.8;
}

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

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

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

.shell {
  width: min(1080px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--ink);
}

.brand .tile {
  width: 38px;
  height: 38px;
  flex: none;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
}

.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
}

.topnav a:hover {
  background: var(--surface-tint);
  color: var(--ink);
}

.topnav .lang {
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
}

@media (max-width: 560px) {
  .topnav .hide-sm {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: 40px 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 20px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0;
}

:root:lang(th) h1,
:root:lang(th) h2,
:root:lang(th) h3 {
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.12;
}

:root:lang(th) h1 {
  line-height: 1.3;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 24px 0 32px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  border: 1.5px solid var(--accent);
  transition: background 0.15s, transform 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
  transform: translateY(-1px);
}

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

.btn.ghost:hover {
  background: var(--surface-tint);
  border-color: var(--ink-faint);
  color: var(--ink);
}

/* The hero cat — eyes follow the pointer (studio.js), still without JS. */
.cat-stage {
  position: relative;
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: 40px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.cat-stage::before {
  content: "";
  position: absolute;
  inset: auto -10% -28% -10%;
  height: 55%;
  background: var(--accent-bg);
  border-radius: 50%;
}

.cat-stage svg {
  position: relative;
  width: 78%;
  height: auto;
}

.cat-stage .pupil {
  transition: transform 0.12s ease-out;
}

@media (max-width: 860px) {
  .hero {
    padding-block: 16px 64px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .cat-stage {
    max-width: 380px;
    order: -1;
    aspect-ratio: 4 / 3;
  }

  .cat-stage svg {
    width: 60%;
  }
}

/* ---------- Sections ---------- */

section {
  padding-block: 72px;
  scroll-margin-top: 12px;
}

.section-head {
  max-width: 40em;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  line-height: 1.2;
}

:root:lang(th) .section-head h2 {
  line-height: 1.35;
}

.section-head p {
  color: var(--ink-soft);
  margin: 12px 0 0;
}

/* ---------- App card ---------- */

.app-card {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 300px);
  gap: 48px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 48px;
  overflow: hidden;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.app-title img {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  flex: none;
}

.app-title h3 {
  font-size: 2rem;
  line-height: 1.2;
}

.app-card p {
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 28px;
}

.pills li {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--tl-ink);
  background: var(--tl-bg);
  padding: 4px 12px;
  border-radius: 999px;
}

.btn.tl {
  background: var(--tl);
  border-color: var(--tl);
  color: #fff;
}

.btn.tl:hover {
  background: var(--tl-ink);
  border-color: var(--tl-ink);
  color: #fff;
}

.phone {
  justify-self: center;
  width: 100%;
  max-width: 280px;
  border: 8px solid var(--ink);
  border-radius: 38px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow);
  transform: rotate(2.5deg);
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: 28px;
}

@media (max-width: 860px) {
  .app-card {
    grid-template-columns: 1fr;
    padding: 28px 24px 36px;
    gap: 32px;
  }

  .phone {
    transform: none;
    max-width: 240px;
  }
}

/* ---------- Principles ---------- */

.principles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.principle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.principle .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-bg);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.principle .icon svg {
  width: 26px;
  height: 26px;
}

.principle h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.principle p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

@media (max-width: 860px) {
  .principles {
    grid-template-columns: 1fr;
  }
}

/* ---------- Contact ---------- */

.contact-card {
  background: var(--accent-bg);
  border-radius: 32px;
  padding: 56px 40px;
  text-align: center;
}

.contact-card h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 12px;
}

.contact-card p {
  color: var(--ink-soft);
  max-width: 30em;
  margin: 0 auto 28px;
}

.contact-card .cta-row {
  justify-content: center;
}

/* ---------- Footer ---------- */

footer {
  padding-block: 40px 56px;
  color: var(--ink-faint);
  font-size: 15px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.foot p {
  margin: 0;
}

.foot nav {
  display: flex;
  gap: 20px;
}

.foot .tagline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.foot a {
  color: var(--ink-soft);
}

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

  .btn,
  .cat-stage .pupil {
    transition: none;
  }
}
