/* ==========================================================================
   KEEPTIME PRODUCTION — sale page
   ========================================================================== */

:root {
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-soft: #F4F2EC;
  --ink: #15151A;
  --ink-soft: #35353D;
  --muted: #6E6E78;
  --line: #E9E6DD;

  --accent: #FF4B3E;
  --accent-dark: #E1382C;
  --accent-soft: #FFECE9;

  --gold: #C9973F;
  --gold-soft: #F6EDDD;

  --ink-rgb: 21, 21, 26;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --shadow-sm: 0 1px 2px rgba(var(--ink-rgb), .05), 0 1px 1px rgba(var(--ink-rgb), .03);
  --shadow-md: 0 16px 32px -16px rgba(var(--ink-rgb), .22);
  --shadow-lg: 0 30px 60px -20px rgba(var(--ink-rgb), .28);

  --container: 1180px;
  --font: 'Prompt', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { scroll-margin-top: 84px; }

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow-light { color: #FFC9C2; }

h1, h2, h3, h4 { font-weight: 700; margin: 0; color: var(--ink); }
p { margin: 0; }

.lead { font-size: 17px; color: var(--muted); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 28px -12px rgba(255, 75, 62, .55);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--ink); }

.btn-outline-light {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.35);
}
.btn-outline-light:hover { background: rgba(255,255,255,.16); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 246, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled {
  border-color: var(--line);
  box-shadow: 0 4px 20px -12px rgba(var(--ink-rgb), .18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
  line-height: 1.1;
}
.brand-name em {
  display: block;
  font-style: normal;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .18em;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}
.main-nav a:hover { color: var(--ink); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-cta .btn-ghost { display: none; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
}
.hero-glow {
  position: absolute;
  top: -220px;
  right: -160px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(255,75,62,.16), rgba(255,75,62,0) 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.18;
  letter-spacing: -.01em;
  margin-bottom: 20px;
}
.accent-text { color: var(--accent); }

.hero .lead { max-width: 520px; margin-bottom: 32px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
}
.hero-badge .icon { width: 15px; height: 15px; color: var(--accent); }

.hero-visual { position: relative; }
.hero-frame {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0c0c10;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.frame-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0));
  z-index: 2;
}
.frame-bar i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
}
.hero-frame img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  opacity: .92;
  transition: transform .5s ease;
}
.hero-frame:hover img { transform: scale(1.04); }

.play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 66px; height: 66px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  transition: transform .25s ease;
}
.play-btn svg { width: 24px; height: 24px; fill: var(--ink); margin-left: 3px; }
.hero-frame:hover .play-btn { transform: translate(-50%, -50%) scale(1.08); }

.floating-card {
  position: absolute;
  left: -18px;
  bottom: -26px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  max-width: 280px;
}
.floating-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.floating-icon .icon { width: 20px; height: 20px; }
.floating-card strong { display: block; font-size: 13.5px; }
.floating-card span { font-size: 12px; color: var(--muted); }

/* ---------------- section head ---------------- */
.section-head {
  max-width: 620px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  margin-bottom: 14px;
}
.section-head p { color: var(--muted); font-size: 16px; }

/* ---------------- services ---------------- */
.services { padding: 96px 0; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.service-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--gold-soft);
  color: var(--gold);
  margin-bottom: 20px;
}
.service-icon .icon { width: 24px; height: 24px; }
.service-card h3 {
  font-size: 15px;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.service-card p { color: var(--muted); font-size: 14.5px; }

/* ---------------- why ---------------- */
.why { padding: 96px 0; background: var(--surface-soft); }
.why-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 64px;
  align-items: start;
}
.why h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 16px; }
.why .lead { margin-bottom: 36px; }

.why-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.why-list li { display: flex; gap: 16px; align-items: flex-start; }
.why-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.why-icon .icon { width: 19px; height: 19px; }
.why-list strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.why-list span { font-size: 14px; color: var(--muted); }

.process-card {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  box-shadow: var(--shadow-lg);
}
.process-card .eyebrow { color: #FF8A80; }
.process-card h3 { color: #fff; font-size: 22px; margin-bottom: 30px; }

.process-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 26px; }
.process-steps li { display: flex; gap: 16px; }
.step-num {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  letter-spacing: .06em;
  padding-top: 2px;
}
.process-steps strong { display: block; font-size: 15.5px; margin-bottom: 4px; }
.process-steps span { font-size: 13.5px; color: rgba(255,255,255,.62); }

/* ---------------- portfolio ---------------- */
.portfolio { padding: 96px 0; }

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.portfolio-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.portfolio-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.portfolio-thumb {
  position: relative;
  aspect-ratio: 4/5;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.thumb-a { background: linear-gradient(150deg, #2b2119 0%, #6b3b23 55%, #c9973f 130%); }
.thumb-b { background: linear-gradient(150deg, #14181c 0%, #2b3a3f 55%, #6f9a94 130%); }
.thumb-c { background: linear-gradient(150deg, #1a141f 0%, #3f2b52 55%, #a25ecf 130%); }

.portfolio-tag {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.28);
  padding: 6px 12px;
  border-radius: 999px;
}
.play-sm {
  width: 50px; height: 50px;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.play-sm svg { width: 18px; height: 18px; margin-left: 2px; }

.portfolio-body { padding: 22px 24px 26px; }
.portfolio-body h3 { font-size: 17px; margin-bottom: 10px; }
.portfolio-body p {
  font-size: 13.8px;
  color: var(--muted);
  margin-bottom: 18px;
  min-height: 62px;
}
.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}
.portfolio-link .icon { width: 14px; height: 14px; }

.portfolio-more { text-align: center; margin-top: 48px; }

/* ---------------- insight ---------------- */
.insight { padding: 96px 0; background: var(--surface-soft); }
.insight-inner {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 60px;
  align-items: center;
}
.insight-visual img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.insight-copy h2 { font-size: clamp(24px, 3vw, 34px); margin: 6px 0 18px; }
.insight-copy .lead { margin-bottom: 26px; }
.insight-copy .lead strong { color: var(--ink); }

.insight-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.insight-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: 14.5px;
  color: var(--ink-soft);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.insight-list li:last-child { border-bottom: none; padding-bottom: 0; }
.insight-list .num {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
}

.insight blockquote {
  margin: 0 0 30px;
  padding: 18px 22px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 16px;
  font-weight: 500;
  font-style: normal;
  color: var(--ink);
}

/* ---------------- cta ---------------- */
.cta {
  background: var(--ink);
  padding: 96px 0;
}
.cta-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.cta h2 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 16px; }
.cta p { color: rgba(255,255,255,.68); font-size: 16px; margin-bottom: 36px; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; }

/* ---------------- footer ---------------- */
.site-footer { background: #0F0F13; color: rgba(255,255,255,.78); padding-top: 64px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand .brand-mark { width: 40px; height: 40px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-name em { color: rgba(255,255,255,.5); }
.footer-brand p { font-size: 13.5px; color: rgba(255,255,255,.5); margin-top: 6px; }

.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  color: #fff;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer-col a, .footer-col span {
  color: rgba(255,255,255,.62);
  text-decoration: none;
  font-size: 14px;
}
.footer-col a:hover { color: #fff; }

.footer-bottom { padding: 22px 0; }
.footer-bottom span { font-size: 13px; color: rgba(255,255,255,.4); }

/* ---------------- reveal animation ----------------
   Visible by default so the page works with JS disabled/blocked.
   Only hidden-then-revealed when .js-reveal is set (via inline script
   in <head>, before first paint) and the browser allows motion. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.js-reveal [data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 560px; margin: 0 auto; }
  .why-inner { grid-template-columns: 1fr; }
  .insight-inner { grid-template-columns: 1fr; }
  .insight-visual { max-width: 420px; margin: 0 auto; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: 68px;
    left: 16px;
    right: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .main-nav a { width: 100%; padding: 12px 10px; border-radius: 10px; }
  .main-nav a:hover { background: var(--surface-soft); }
  .nav-toggle { display: flex; }
  .header-cta .btn-ghost { display: none; }
}

@media (min-width: 861px) {
  .header-cta .btn-ghost { display: inline-flex; }
  .nav-toggle { display: none; }
}

@media (max-width: 640px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .floating-card { position: static; margin-top: -30px; margin-left: 18px; margin-right: 18px; }
  .hero-frame { margin-bottom: 46px; }
  .cta-actions .btn { width: 100%; justify-content: center; }
  .cta-actions { flex-direction: column; }
}
