/* Yoo Dai website. The same look as the app: the colours of the Thai flag,
   one rounded sans serif, a white page by day and a navy page by night.
   Thai blue is #00247D (Pantone 2766 C, the ASEAN flag specification).
   Light, Dark or System is chosen in the header (theme.js). */

:root {
  --blue: #00247D; --blue-deep: #001A5C; --red: #A51931; --red-bright: #FF6B7F;
  --bg: #ffffff; --text: #0B1020; --subtle: #3A4256; --surface: #F2F4F7; --well: #E6E9EF;
  --line: rgba(0, 36, 125, 0.14); --link: #00247D; --on-blue: #ffffff;
  --shadow: 0 18px 40px rgba(0, 20, 70, 0.16);
  --radius: 24px; --page: 20px; --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060A17; --text: #ffffff; --subtle: #C9D0DE; --surface: #131A2C; --well: #222B42;
    --line: rgba(255, 255, 255, 0.14); --link: #9DB4FF; --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060A17; --text: #ffffff; --subtle: #C9D0DE; --surface: #131A2C; --well: #222B42;
  --line: rgba(255, 255, 255, 0.14); --link: #9DB4FF; --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 18px/1.55 ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); font-weight: 600; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 50; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--page); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; margin-right: auto; min-height: 44px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 16px; padding: 10px 12px; border-radius: 12px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--surface); }
.nav a[aria-current="page"] { color: var(--link); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 16px; padding: 10px 14px; border-radius: 12px; background: var(--surface); min-height: 44px; display: inline-flex; align-items: center; }
.menu summary::-webkit-details-marker { display: none; }
.menu:not([open]) .nav { display: none; }
.menu[open] .nav { display: grid; position: absolute; right: 0; top: 52px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: var(--shadow); min-width: 200px; }

/* Light and dark: one sun and moon button */
.theme-switch { display: inline-flex; }
.theme-toggle { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.theme-toggle:hover { background: var(--well); }
.theme-toggle svg { width: 20px; height: 20px; }

/* Buttons */
.button { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 22px; border-radius: 16px;
  background: var(--red); color: #fff; text-decoration: none; font-weight: 800; font-size: 17px; white-space: nowrap; }
.button:hover { filter: brightness(1.08); }
.button svg { width: 20px; height: 24px; flex: none; }
.button.store { background: #000; color: #fff; padding: 10px 20px; box-shadow: 0 0 0 1px var(--line); }
.button.store small { display: block; font-size: 11px; font-weight: 600; line-height: 1; opacity: 0.9; }
.button.store b { display: block; font-size: 19px; line-height: 1.15; }
.on-blue .button.store { background: #fff; color: #000; }

/* Type */
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--link); margin: 0 0 10px; }
.on-blue .eyebrow { color: #9DB4FF; }
.lead { color: var(--subtle); font-size: 20px; }

/* Sections */
.section { padding: 88px 0 0; }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); margin: 0 0 12px; }
.section-head p:not(.eyebrow) { margin: 0; color: var(--subtle); font-size: 19px; }

/* Hero */
.hero { background: var(--blue); color: var(--on-blue); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 56px; }
.hero h1 { font-size: clamp(40px, 6.6vw, 76px); margin: 0 0 18px; }
.hero-copy p:not(.eyebrow) { font-size: 21px; max-width: 540px; margin: 0 0 28px; color: rgba(255, 255, 255, 0.92); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.cta-row .note { font-size: 15px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.hero-media { display: grid; grid-template-columns: 1fr 0.86fr; gap: 22px; align-items: center; justify-self: end;
  width: 100%; max-width: 560px; padding-bottom: 56px; }
.hero-phone { width: 100%; }
.hero-side { display: grid; gap: 22px; }
.hero-widget { width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35)); }
.hero-watch { margin: 0; background: #000; border-radius: 30% / 26%; padding: 9%; box-shadow: var(--shadow); }
.hero-watch img { width: 100%; height: auto; border-radius: 18% / 15%; }

/* A screenshot in a phone frame, sized by its column */
.device { margin: 0; border-radius: 13% / 6.2%; padding: 3.2%; background: #0A0A0F; box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.device img { border-radius: 10.5% / 4.9%; width: 100%; aspect-ratio: 660 / 1434; object-fit: cover; }

/* Screens follow the page: the light screenshot by day, the dark one by night */
.when-dark { display: none !important; }
:root[data-theme="dark"] .when-light { display: none !important; }
:root[data-theme="dark"] .when-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .when-light { display: none !important; }
  :root:not([data-theme="light"]) .when-dark { display: block !important; }
}

/* How it works */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border-radius: 20px; padding: 20px; }
.steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; color: var(--link); font-weight: 800; font-size: 15px; margin-bottom: 18px; }
.steps h3 { margin: 0 0 6px; font-size: 21px; }
.steps p { margin: 0; color: var(--subtle); font-size: 16px; }

/* Feature rows: copy beside screens */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature + .feature { margin-top: 88px; }
.feature.flip .feature-copy { order: 2; }
.feature-copy h2 { font-size: clamp(28px, 3.8vw, 40px); margin: 0 0 14px; }
.feature-copy p:not(.eyebrow) { color: var(--subtle); font-size: 19px; margin: 0 0 14px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { padding-left: 32px; position: relative; font-weight: 600; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--link);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='10'/%3E%3C/svg%3E"); }
.ticks li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 5px; border: solid var(--bg); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.feature-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: var(--surface); border-radius: 32px; padding: 32px; }
.feature-shots .device:last-child { transform: translateY(28px); }

/* At a glance: widget, Lock Screen and watch */
.glance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.glance figure { margin: 0; background: var(--surface); border-radius: var(--radius); padding: 14px; display: grid; gap: 14px; align-content: start; }
.glance-shot { border-radius: 16px; overflow: hidden; aspect-ratio: 1 / 1; background: var(--blue); }
.glance-shot img { width: 100%; height: 100%; object-fit: cover; }
.glance-shot.watch { display: grid; place-items: center; }
.glance-shot.watch img { width: 56%; height: auto; border: 10px solid #000; border-radius: 26%; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35); }
.glance figcaption { padding: 0 6px 6px; }
.glance h3 { margin: 0 0 6px; font-size: 21px; }
.glance p { margin: 0; color: var(--subtle); font-size: 16px; }

/* Places */
.feature + .places { margin-top: 56px; }
.places { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.places figure { margin: 0; position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 3 / 4; background: var(--surface); }
.places img { width: 100%; height: 100%; object-fit: cover; }
.places figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(0, 0, 0, 0.55); color: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 14px; font-weight: 800; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* Private by design */
.band { background: var(--blue); color: var(--on-blue); border-radius: 32px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
.band h2 { font-size: clamp(28px, 3.8vw, 40px); margin: 0 0 12px; }
.band p:not(.eyebrow) { margin: 0; color: rgba(255, 255, 255, 0.92); }
.band a { color: #fff; }
.band ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; align-content: center; }
.band li { background: rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 14px 16px; font-weight: 700; }

/* Inside the app: a row of screens that scrolls sideways */
.tour { display: grid; grid-auto-flow: column; grid-auto-columns: 236px; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--page), calc((100vw - var(--max)) / 2 + var(--page)));
  padding: 8px max(var(--page), calc((100vw - var(--max)) / 2 + var(--page))) 28px; scrollbar-width: thin; }
.tour:focus-visible { outline-offset: -3px; border-radius: 0; }
.tour-nav { display: flex; justify-content: flex-end; gap: 10px; margin: -12px 0 12px; }
.round { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.round:hover:not(:disabled) { background: var(--well); }
.round:disabled { opacity: 0.35; cursor: default; }
.round svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tour-item { margin: 0; scroll-snap-align: start; display: grid; gap: 14px; align-content: start; }
.tour-item .device { box-shadow: 0 0 0 1px var(--line), 0 10px 26px rgba(0, 20, 70, 0.14); }
.tour-item figcaption { display: grid; gap: 2px; padding: 0 4px; }
.tour-item b { font-size: 18px; }
.tour-item span { color: var(--subtle); font-size: 15px; line-height: 1.4; }

/* Membership */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.tier { background: var(--surface); border-radius: var(--radius); padding: 24px 26px 26px; border: 2px solid transparent; }
.tier.member { border-color: var(--red); }
.tier h3 { margin: 0; font-size: 26px; }
.tier-sub { margin: 4px 0 0; color: var(--subtle); font-weight: 600; font-size: 16px; }
.tier .ticks { margin-top: 18px; }
.tier .ticks li { font-size: 17px; }
.prices { display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); gap: 16px; }
.price { background: var(--surface); border: 2px solid transparent; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.price.best { border-color: var(--red); }
.price .eyebrow { margin-bottom: 14px; }
.price .amount { font-size: 44px; font-weight: 800; line-height: 1; margin: auto 0 0; }
.price .per { margin: 6px 0 0; color: var(--subtle); font-weight: 600; }
.free { color: var(--subtle); font-size: 16px; max-width: 720px; margin: 24px 0; }
.legal { color: var(--subtle); font-size: 15px; }

/* Content pages: support, privacy, terms, partners */
main.page { max-width: 760px; margin: 0 auto; padding: 32px var(--page) 16px; }
main.page h1 { font-size: clamp(36px, 6vw, 52px); margin: 28px 0 12px; }
main.page h2 { font-size: 25px; margin: 40px 0 10px; }
main.page h3 { font-size: 20px; margin: 24px 0 6px; }
.updated { color: var(--subtle); font-size: 15px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px 22px; margin: 16px 0; }
.card > :first-child { margin-top: 0; } .card > :last-child { margin-bottom: 0; }
.notice { background: var(--surface); border-left: 4px solid var(--red); border-radius: 12px; padding: 12px 16px; font-size: 16px; }
ul { padding-left: 1.2em; }
li + li { margin-top: 6px; }
form { display: grid; gap: 14px; }
label { font-weight: 700; display: grid; gap: 6px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 48px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 25%, transparent); }
button[type="submit"] { font: inherit; font-weight: 800; border: 0; border-radius: 16px; min-height: 52px; padding: 12px 22px; background: var(--red); color: #fff; cursor: pointer; justify-self: start; }

/* Footer */
.site-footer { margin-top: 96px; background: var(--blue-deep); color: #fff; }
.site-footer .wrap { padding-top: 48px; padding-bottom: 48px; display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.site-footer .brand { color: #fff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.site-footer nav a { color: #fff; text-decoration: none; font-weight: 700; padding: 10px 8px; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0; font-size: 15px; color: rgba(255, 255, 255, 0.86); }
.site-footer a { color: #fff; }
.site-footer .fine { grid-column: 1 / -1; display: grid; gap: 6px; border-top: 1px solid rgba(255, 255, 255, 0.16); padding-top: 20px; }

/* Wide tablets */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .feature { gap: 36px; }
  .glance { grid-template-columns: 1fr 1fr; }
  .glance figure:last-child { grid-column: 1 / -1; max-width: calc(50% - 8px); justify-self: center; width: 100%; }
}
/* Tablets and phones */
@media (max-width: 820px) {
  .nav-wide { display: none; }
  .menu { display: block; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 48px; gap: 8px; }
  .cta-row { padding-bottom: 8px; }
  .hero-media { justify-self: center; max-width: 480px; padding-bottom: 40px; }
  .hero { padding-bottom: 0; }
  .feature, .band { grid-template-columns: 1fr; }
  .feature.flip .feature-copy { order: 0; }
  .feature-shots { max-width: 520px; width: 100%; justify-self: center; padding: 24px; }
  .tiers { grid-template-columns: 1fr; }
  .places { grid-template-columns: 1fr 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
}
/* Phones */
@media (max-width: 560px) {
  :root { --page: 16px; }
  body { font-size: 17px; }
  .section { padding-top: 64px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; }
  .steps li::before { margin: 2px 0 0; grid-row: span 2; }
  .glance { grid-template-columns: 1fr; }
  .glance figure:last-child { max-width: none; }
  .prices { grid-template-columns: 1fr 1fr; gap: 10px; }
  .price { padding: 18px; }
  .price .amount { font-size: 34px; }
  .hero-copy p { font-size: 19px; }
  .feature-shots { gap: 12px; padding: 18px; border-radius: 26px; }
  .brand span { font-size: 18px; }
  .tour { grid-auto-columns: 62vw; gap: 14px; }
  .tier { padding: 20px; }
}
@media (max-width: 360px) {
  .brand span { display: none; }
  .prices { grid-template-columns: 1fr; }
}

/* Contact form */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field-error { color: #D1102E; font-size: 15px; font-weight: 600; }
:root[data-theme="dark"] .field-error { color: #FF8A99; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field-error { color: #FF8A99; } }

/* Contact: sending, a failed send, and the thank you */
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #D1102E; }
.send-error { margin: 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--red) 12%, transparent); font-weight: 600; font-size: 16px; }
.send-error[hidden] { display: none; }
button.send:disabled { opacity: 0.7; cursor: progress; }
html.modal-open { overflow: hidden; }

/* The thank you: a card in the middle on wide screens, a sheet from the
   bottom on phones, where the thumb reaches Done. */
.sent { border: 0; padding: 0; width: min(440px, calc(100% - 32px)); border-radius: 28px; background: var(--bg); color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 20, 70, 0.35), 0 0 0 1px var(--line); }
.sent::backdrop { background: rgba(0, 18, 64, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sent[open] { animation: sentIn 0.32s cubic-bezier(0.2, 0.9, 0.3, 1); }
.sent-inner { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 36px 28px 28px; }
.sent-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--blue); display: grid; place-items: center;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 14%, transparent); margin-bottom: 6px; }
.sent-mark svg { width: 32px; height: 32px; fill: none; stroke: #fff; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.sent h2 { margin: 0; font-size: clamp(28px, 6vw, 34px); outline: none; }
.sent p { margin: 0 0 10px; color: var(--subtle); max-width: 26em; }
.sent-close { width: 100%; justify-content: center; border: 0; cursor: pointer; font: inherit; font-weight: 800; }
@keyframes sentIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@media (max-width: 560px) {
  .sent { width: 100%; max-width: none; margin: auto 0 0; border-radius: 28px 28px 0 0; }
  .sent[open] { animation-name: sheetUp; }
  .sent-inner { padding: 14px 20px calc(20px + env(safe-area-inset-bottom)); }
  .sent-inner::before { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--well); margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { .sent[open] { animation: none; } }
:root[data-theme="dark"] .sent-mark { background: #2B4BB8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sent-mark { background: #2B4BB8; } }
