/* Daily Spark Lab — portal styles (warm paper + sunrise spark) */
:root {
  --font-head: "Prompt", "Leelawadee UI", "Noto Sans Thai", "Thonburi", "Tahoma", sans-serif;
  --font-body: "Sarabun", "Leelawadee UI", "Noto Sans Thai", "Thonburi", "Tahoma", sans-serif;

  --paper: #fbf4ea;
  --paper-2: #f6ead9;
  --card: #fffdf9;
  --ink: #2f2420;
  --ink-soft: #6b5a50;
  --line: #ecdcc8;
  --ember: #ef5d3a;
  --ember-deep: #c8431f;
  --amber: #ffb347;
  --honey: #ffd27a;
  --sage: #7fb69a;
  --sage-ink: #2f6b51;
  --sage-soft: #e3f1e8;

  --radius-xl: 30px;
  --radius-lg: 22px;
  --shadow-soft: 0 2px 10px rgba(110, 60, 30, 0.06);
  --shadow-lift: 0 22px 50px -24px rgba(110, 55, 25, 0.38);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(255, 179, 71, 0.22), transparent 70%),
    radial-gradient(700px 480px at -10% 30%, rgba(239, 93, 58, 0.10), transparent 70%),
    radial-gradient(800px 600px at 50% 110%, rgba(127, 182, 154, 0.16), transparent 70%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.35; margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(239, 93, 58, 0.5); outline-offset: 3px; border-radius: 10px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; text-decoration: none; transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- header */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(20px, calc((100% - var(--max)) / 2));
  padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(251, 244, 234, 0.78);
  backdrop-filter: blur(14px) saturate(1.3);
  transition: box-shadow 0.3s, background 0.3s;
}
.nav.scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px -22px rgba(110, 55, 25, 0.45); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--ink); box-shadow: var(--shadow-soft);
}
.logo-mark svg { width: 24px; height: 24px; }
.logo-mark path { fill: var(--amber); }
.logo-mark circle { fill: var(--honey); }
.logo-text { font-family: var(--font-head); font-weight: 600; font-size: 19px; letter-spacing: 0.1px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  text-decoration: none; padding: 8px 14px; border-radius: 999px; font-family: var(--font-head);
  font-weight: 500; font-size: 15px; color: var(--ink-soft); transition: background 0.2s, color 0.2s;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.7); color: var(--ink); }
.nav-links .nav-cta { background: var(--ink); color: #fff; }
.nav-links .nav-cta:hover { background: #47362f; color: #fff; }

main { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------------ hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
  padding: 56px 0 80px; min-height: min(640px, calc(100vh - 70px));
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
  padding: 6px 14px 6px 10px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--ember-deep);
  background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line);
}
.spark-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle, var(--honey), var(--ember));
  box-shadow: 0 0 0 4px rgba(239, 93, 58, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); font-weight: 700; line-height: 1.28; letter-spacing: -0.3px; }
.ink-grad {
  background: linear-gradient(100deg, var(--ember-deep) 0%, var(--ember) 45%, #f08a2c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin: 22px 0 0; max-width: 34em; font-size: 18.5px; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px;
  padding: 12px 24px; border-radius: 16px; text-decoration: none;
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
  transition: transform 0.25s var(--spring), box-shadow 0.25s, background 0.2s;
}
.btn-main {
  color: #fff; background: linear-gradient(135deg, #e5512c 0%, #cf4120 60%, #b9361a 100%);
  box-shadow: 0 16px 30px -14px rgba(200, 67, 31, 0.75);
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -14px rgba(200, 67, 31, 0.85); }
.btn-main span { transition: transform 0.25s var(--spring); }
.btn-main:hover span { transform: translateX(3px); }
.btn-line { color: var(--ink); background: rgba(255, 255, 255, 0.6); border: 1.5px solid var(--line); }
.btn-line:hover { background: #fff; transform: translateY(-2px); }
.btn-disabled {
  color: var(--ink-soft); background: transparent; border: 1.5px dashed #d9c3aa; cursor: default; font-weight: 500;
}

/* hero illustration: a tiny preview of Kids Chef */
.hero-art { position: relative; display: grid; place-items: center; min-height: 440px; }
.orbit {
  position: absolute; width: min(440px, 96%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 210, 122, 0.85), rgba(255, 179, 71, 0.35) 45%, transparent 70%);
  filter: blur(6px);
}
.orbit::after {
  content: ""; position: absolute; inset: 7%; border-radius: 50%; border: 1.5px dashed rgba(200, 67, 31, 0.22);
  animation: spin 60s linear infinite;
}
.spark { position: absolute; width: 22px; height: 22px; background: var(--ember);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 3.2s ease-in-out infinite; }
.s1 { top: 10%; left: 12%; }
.s2 { bottom: 14%; right: 6%; width: 30px; height: 30px; background: var(--amber); animation-delay: -1.1s; }
.s3 { top: 18%; right: 12%; width: 14px; height: 14px; background: var(--sage); animation-delay: -2s; }

.mini-app {
  position: relative; width: min(360px, 92%); padding: 22px; border-radius: 28px;
  background: var(--card); border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-lift); transform: rotate(-2.5deg);
  animation: bob 7s ease-in-out infinite;
}
.mini-top { display: flex; gap: 12px; align-items: center; }
.mini-logo { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
  background: linear-gradient(135deg, #ffb592, #ff8a65); flex: none; }
.mini-title { font-family: var(--font-head); font-weight: 600; font-size: 16.5px; line-height: 1.4; }
.mini-sub { font-size: 13px; color: var(--ink-soft); }
.mini-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.mini-chips span { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: #f7efe6; color: var(--ink-soft); }
.mini-chips .on { background: var(--sage-soft); color: var(--sage-ink); font-weight: 600; }
.mini-btn { text-align: center; padding: 11px; border-radius: 14px; color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 15px;
  background: linear-gradient(135deg, #ea5a2a, #c83d0f); }
.mini-card { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 16px;
  background: #fff6d8; }
.mini-emoji { font-size: 28px; }
.mini-card-title { font-family: var(--font-head); font-weight: 500; font-size: 14.5px; line-height: 1.4; }
.mini-card-meta { font-size: 12.5px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- sections */
.work, .approach { padding: 56px 0 72px; }
.section-head { max-width: 640px; margin-bottom: 34px; }
.kicker { margin: 0 0 6px; font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: 1.5px; color: var(--ember-deep); }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; }
.section-head p:last-child:not(.kicker) { margin: 10px 0 0; color: var(--ink-soft); }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.project {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 28px;
  border-radius: var(--radius-xl); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.project h3 { font-size: 24px; font-weight: 600; }
.project-desc { margin: 0; color: var(--ink-soft); }
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; font-size: 13.5px;
  font-weight: 600; background: #f4e9dc; color: var(--ink-soft); }
.tag.live { background: var(--sage-soft); color: var(--sage-ink); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f9e6c; box-shadow: 0 0 0 3px rgba(47, 158, 108, 0.2); animation: pulse 2s ease-in-out infinite; }

.project.featured {
  grid-column: 1 / -1; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 0; padding: 0; overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.project.featured:hover { transform: translateY(-4px); }
.project-visual {
  position: relative; min-height: 300px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 45%),
    linear-gradient(140deg, #ffcfb4 0%, #ff9a76 48%, #f0703f 100%);
}
.pv-emoji { position: absolute; font-size: 64px; filter: drop-shadow(0 12px 18px rgba(120, 40, 10, 0.25)); animation: bob 6s ease-in-out infinite; }
.e1 { top: 16%; left: 14%; transform: rotate(-14deg); }
.e2 { top: 38%; left: 42%; font-size: 92px; animation-delay: -2s; }
.e3 { bottom: 12%; right: 14%; animation-delay: -4s; }
.project-body { display: flex; flex-direction: column; gap: 14px; padding: 34px 34px 36px; align-items: flex-start; }
.project.featured h3 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
.feature-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; }
.feature-list li span { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #fff1e6; font-size: 17px; }

.project.soon { background: rgba(255, 253, 249, 0.55); border: 1.5px dashed #e0cbb3; box-shadow: none; padding-top: 30px; }
.project.soon .btn { margin-top: auto; align-self: flex-start; }
.soon-num { font-family: var(--font-head); font-weight: 700; font-size: 54px; line-height: 1; color: transparent;
  -webkit-text-stroke: 1.5px #dcc3a6; }

.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.principle { padding: 26px; border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); }
.principle h3 { font-size: 19px; font-weight: 600; margin-top: 14px; }
.principle p { margin: 8px 0 0; color: var(--ink-soft); font-size: 16px; }
.p-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; font-size: 24px; background: #fff; box-shadow: var(--shadow-soft); }

/* ---------------------------------------------------------------- footer */
.foot { margin-top: 24px; padding: 30px 20px calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.foot-inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.foot p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.logo.small .logo-mark { width: 34px; height: 34px; border-radius: 11px; }
.logo.small .logo-mark svg { width: 20px; height: 20px; }
.logo.small .logo-text { font-size: 16.5px; }

/* ---------------------------------------------------------------- motion */
.can-reveal .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.can-reveal .reveal.in { opacity: 1; transform: none; }
.can-reveal .project.featured.reveal.in:hover { transform: translateY(-4px); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(239, 93, 58, 0.05); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(0.6) rotate(45deg); opacity: 0.6; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* ------------------------------------------------------------ responsive */
@media (hover: none) {
  .project.featured:hover, .can-reveal .project.featured.reveal.in:hover { transform: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 40px 0 56px; min-height: 0; text-align: left; }
  .hero-art { min-height: 380px; }
  .project.featured { grid-template-columns: 1fr; }
  .project-visual { min-height: 200px; }
  .principles { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { padding-left: 16px; padding-right: 16px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-links .nav-cta { padding: 9px 14px; font-size: 14px; }
  .logo-text { font-size: 17px; }
  main { padding: 0 16px; }
  .lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-art { min-height: 330px; }
  .work, .approach { padding: 36px 0 48px; }
  .work-grid { grid-template-columns: 1fr; gap: 16px; }
  .project { padding: 22px; }
  .project-body { padding: 24px 22px 26px; }
  .project-body .btn { width: 100%; }
  .pv-emoji { font-size: 50px; }
  .e2 { font-size: 72px; }
  .foot-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 360px) {
  .logo-text { font-size: 15.5px; }
  .nav-links .nav-cta { padding: 8px 11px; font-size: 13px; min-height: 40px; display: inline-flex; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
