/* FocusTime website — brand tokens pulled from lib/core/theme/app_colors.dart */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --text: #17212f;
  --muted: #5b6b80;
  --primary: #4c7fe0;
  --primary-strong: #3d6bc4;
  --mint: #8fd6c3;
  --success: #57a97b;
  --border: #e4e9f1;
  --ring-track: #e4e9f1;
  --shadow: 0 10px 30px rgba(23, 33, 47, 0.08);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --surface: #1a2230;
    --surface-2: #202b3c;
    --text: #e8edf5;
    --muted: #9aa8bc;
    --primary: #6d9be8;
    --primary-strong: #8cb0ee;
    --mint: #8fd6c3;
    --success: #6cbe90;
    --border: #273247;
    --ring-track: #273247;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Language switching: html[lang] gates .en/.th blocks ---- */
html[lang="th"] .en { display: none; }
html[lang="en"] .th { display: none; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.logo:hover { text-decoration: none; }

.logo svg { display: block; }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  cursor: pointer;
}
.lang-switch button.active {
  background: var(--primary);
  color: #fff;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-strong); color: #fff; }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* ---- Hero ---- */
.hero { padding: 72px 0 56px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

.hero .sub {
  color: var(--muted);
  font-size: 18px;
  margin: 0 0 30px;
  max-width: 52ch;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-note { margin-top: 16px; font-size: 13.5px; color: var(--muted); }

/* ---- Phone mockup ---- */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 280px;
  height: 560px;
  border-radius: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 14px;
}
.phone-screen {
  height: 100%;
  border-radius: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px;
}

.ring { position: relative; width: 210px; height: 210px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .time {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.ring .time .clock {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.ring .time .phase { font-size: 13px; color: var(--muted); font-weight: 500; }

.mock-controls { display: flex; align-items: center; gap: 14px; }
.mock-btn-main {
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 10px 30px;
  font-weight: 600;
  font-size: 15px;
}
.mock-btn-round {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.mock-note { font-size: 12px; color: var(--muted); }

/* ---- Sections ---- */
section.block { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--muted); margin: 0; font-size: 16.5px; }

/* ---- Feature cards ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}
.feature-card.mint .icon { background: color-mix(in srgb, var(--mint) 20%, transparent); color: #3d9a80; }
.feature-card.green .icon { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---- Privacy strip ---- */
.privacy-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}
.privacy-strip h2 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 28px); }
.privacy-strip p { margin: 0; color: var(--muted); max-width: 60ch; }

/* ---- Policy pages ---- */
.policy-page { padding: 56px 0 80px; }
.policy-page .prose { max-width: 780px; }
.policy-page h1 {
  font-size: clamp(30px, 4vw, 40px);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.policy-meta { color: var(--muted); font-size: 14.5px; margin-bottom: 36px; }
.policy-section { margin-bottom: 36px; }
.policy-section h2 { font-size: 20px; margin: 0 0 12px; }
.policy-section p, .policy-section li { color: var(--text); font-size: 15.5px; }
.policy-section p { margin: 0 0 12px; }
.policy-section ul, .policy-section ol { margin: 0 0 12px; padding-left: 22px; }
.policy-section li { margin-bottom: 6px; }
.policy-section strong { font-weight: 600; }

.policy-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 0 0 12px;
}
.policy-section th, .policy-section td {
  text-align: left;
  border: 1px solid var(--border);
  padding: 10px 12px;
  vertical-align: top;
}
.policy-section th { background: var(--surface-2); font-weight: 600; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 44px;
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-note { color: var(--muted); font-size: 13px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 48px 0 40px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .privacy-strip { grid-template-columns: 1fr; padding: 28px; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .nav a { display: none; } /* keep lang switch only */
  .phone { width: 240px; height: 480px; }
  .ring { width: 180px; height: 180px; }
  .ring .time .clock { font-size: 36px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}
