/* FirstPolicy website. Tokens from marketing/brand/README.md (same as the app's ui/theme.ts). */
@font-face { font-family: "Mitr"; font-weight: 500; font-display: swap; src: url("/fonts/Mitr_500Medium.woff2") format("woff2"); }
@font-face { font-family: "Mitr"; font-weight: 600; font-display: swap; src: url("/fonts/Mitr_600SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 400; font-display: swap; src: url("/fonts/IBMPlexSansThai_400Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 600; font-display: swap; src: url("/fonts/IBMPlexSansThai_600SemiBold.woff2") format("woff2"); }

:root {
  --bg: #F6F5FB; --ink: #1B1640; --ink-soft: #5B5677; --violet: #6A4DFF; --gold: #FFC83D; --white: #FFFFFF;
  --lilac: #E8E2FF; --lilac-pale: #F4F0FF; --lilac-on-dark: #C9C2F2; --sky: #D7EEFF; --peach: #FFE3D3;
  --mint: #D3F5E6; --pink: #FFDCEB; --sun: #FFF0BF; --line: #EEEBF7;
  --heading: "Mitr", "IBM Plex Sans Thai", system-ui, sans-serif;
  --body: "IBM Plex Sans Thai", system-ui, sans-serif;
  --shadow: 0 10px 24px rgba(27, 22, 64, 0.06);
  --gutter: clamp(16px, 4vw, 32px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--violet); }
h1, h2, h3 { font-family: var(--heading); font-weight: 600; line-height: 1.3; margin: 0 0 .4em; }
h1 { font-size: clamp(30px, 5.2vw, 50px); }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: 20px; font-weight: 500; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--white); padding: 8px 16px; border-radius: 999px; z-index: 10; }
.skip:focus { left: 8px; }
.draft-banner { background: var(--sun); text-align: center; font-size: 14px; padding: 6px var(--gutter); }

/* header / footer */
.top, main, .foot { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.top { display: flex; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--violet); font-family: var(--heading); font-weight: 500; font-size: 20px; margin-right: auto; }
.logo-polly { width: 36px; height: 36px; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--violet); }
.lang { background: var(--white); color: var(--ink); text-decoration: none; border-radius: 999px; padding: 6px 14px; font-family: var(--heading); font-size: 14px; box-shadow: var(--shadow); min-height: 36px; display: inline-flex; align-items: center; }
@media (max-width: 720px) { .top nav { display: none; } }

.foot { padding-top: 40px; padding-bottom: 40px; text-align: center; font-size: 14px; color: var(--ink-soft); }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; }
.foot .links a { color: var(--ink); }
.disclaimer { max-width: 640px; margin: 0 auto 12px; }

/* buttons, pills, tags */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px; border-radius: 999px; font-family: var(--heading); font-weight: 500; font-size: 18px; text-decoration: none; }
.btn.dark { background: var(--ink); color: var(--white); box-shadow: 0 10px 24px rgba(27, 22, 64, .25); }
.btn.white { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.pill { display: inline-block; background: var(--white); border-radius: 999px; padding: 4px 14px; font-size: 14px; font-family: var(--heading); margin-bottom: 14px; }
.tag { display: inline-block; background: var(--lilac); border-radius: 999px; padding: 2px 12px; font-size: 13px; margin: 0 0 10px; }
.tag.draft { background: var(--sun); }
.center { text-align: center; }
.sub, .lead { color: var(--ink-soft); }
.lead { font-size: 18px; max-width: 34em; }
mark.todo { background: var(--sun); padding: 0 4px; border-radius: 4px; }

/* hero */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 16px; background: var(--lilac); border-radius: 36px; padding: clamp(28px, 5vw, 56px); margin-top: 8px; }
.rings { position: absolute; right: -60px; top: 50%; width: 520px; height: 520px; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle, var(--white) 0 44%, var(--lilac-pale) 44% 62%, transparent 62%); }
.rings { z-index: 0; }
.hero-text, .hero-polly { position: relative; z-index: 1; }
.float { z-index: 1; }
.hero-polly { display: flex; justify-content: center; }
.hero h1 .accent { display: block; color: var(--violet); }
.nw { white-space: nowrap; display: inline-block; }
.hero-polly img { width: min(280px, 70vw); }
.float { position: absolute; }
.f1 { left: 52%; top: 9%; transform: rotate(-12deg); }
.f2 { right: 5%; top: 7%; }
.f3 { left: 54%; bottom: 10%; }
.f4 { right: 7%; bottom: 12%; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.store { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--white); text-decoration: none; border-radius: 16px; padding: 8px 16px 8px 10px; min-height: 52px; font-family: var(--heading); font-size: 17px; line-height: 1.15; }
.store small { display: block; font-family: var(--body); font-size: 12px; color: var(--lilac-on-dark); }
.store.soon { opacity: .85; }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0; margin: 20px 0 0; }
.chips li { background: var(--white); border-radius: 999px; padding: 6px 16px; font-size: 15px; box-shadow: var(--shadow); }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-polly { order: -1; }
  .rings { right: 50%; top: 150px; transform: translate(50%, -50%); width: 420px; height: 420px; }
  .f1 { left: 6%; top: 4%; } .f2 { right: 6%; top: 6%; } .f3 { left: 8%; top: 30%; bottom: auto; } .f4 { right: 8%; top: 32%; bottom: auto; }
}

/* sections */
.section { margin-top: clamp(48px, 8vw, 88px); }
.section > h2, .section > .sub { text-align: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.card { border-radius: 28px; padding: 24px; }
.card p { margin: 0; }
.card-icon { width: 64px; height: 64px; margin-bottom: 6px; }
.bg-peach { background: var(--peach); } .bg-pink { background: var(--pink); } .bg-sky { background: var(--sky); }
@media (max-width: 820px) { .grid3 { grid-template-columns: 1fr; } }

.grow { background: var(--white); border-radius: 36px; padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow); }
.forms { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 0; margin: 24px 0 0; counter-reset: f; }
.forms li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--heading); font-weight: 500; position: relative; }
.forms li + li::before { content: "›"; position: absolute; left: -10px; top: 40%; font-size: 32px; color: var(--violet); }
.form { width: min(120px, 20vw); }

.trust { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0; margin: 24px 0 0; }
.trust li { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border-radius: 26px; padding: 20px; box-shadow: var(--shadow); }
.trust img { width: 48px; height: 48px; flex-shrink: 0; }
.trust p { margin: 0; color: var(--ink-soft); }
@media (max-width: 720px) { .trust { grid-template-columns: 1fr; } }

.faq { max-width: 760px; margin: 24px auto 0; display: grid; gap: 10px; }
details { background: var(--white); border-radius: 22px; box-shadow: var(--shadow); }
details > summary { cursor: pointer; list-style: none; padding: 16px 20px; font-family: var(--heading); font-weight: 500; display: flex; justify-content: space-between; gap: 12px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; color: var(--violet); font-size: 22px; line-height: 1; }
details[open] > summary::after { content: "–"; }
details > p, details > div { padding: 0 20px 16px; margin: 0; }

.cta { display: flex; align-items: center; gap: 24px; background: var(--ink); color: var(--white); border-radius: 36px; padding: clamp(24px, 4vw, 44px); margin-top: clamp(48px, 8vw, 88px); }
.cta p { color: var(--lilac-on-dark); }
.cta .store { background: var(--white); color: var(--ink); }
.cta .store small { color: var(--ink-soft); }
.cta > img { flex-shrink: 0; width: min(150px, 30vw); }
.store img { width: 28px; height: 28px; flex-shrink: 0; }
@media (max-width: 620px) { .cta { flex-direction: column; text-align: center; } .cta .stores { justify-content: center; } }

/* why */
.why { background: var(--ink); color: var(--white); border-radius: 36px; padding: clamp(28px, 5vw, 56px); }
.why .sub { color: var(--lilac-on-dark); max-width: 40em; margin: 0 auto; }
.why h2 { color: var(--white); text-align: center; }
.kicker { text-align: center; color: var(--gold); font-family: var(--heading); font-weight: 500; margin-bottom: 6px; }
.why .card { color: var(--ink); }
.bg-sun { background: var(--sun); } .bg-mint { background: var(--mint); } .bg-lilac { background: var(--lilac); }
.path { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0; margin: 28px 0 8px; }
.path li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-family: var(--heading); font-weight: 500; font-size: 16px; }
.path li + li::before { content: ""; position: absolute; top: 28px; right: calc(50% + 36px); width: calc(100% - 60px); border-top: 3px dashed var(--gold); }
.path li:last-child { color: var(--gold); }
@media (max-width: 720px) {
  .path { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .path li + li::before { display: none; }
}

/* agency */
.agency { background: var(--sky); border-radius: 36px; padding: clamp(24px, 4vw, 48px); }
.agency-head { display: flex; gap: 20px; align-items: center; }
.agency-head img { flex-shrink: 0; width: min(140px, 28vw); }
.agency-head .sub { margin: 0; }
.kicker.left { text-align: left; color: #2B4F70; }
.agency-points { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0; margin: 24px 0; }
.agency-points li { display: flex; gap: 12px; align-items: flex-start; background: var(--white); border-radius: 24px; padding: 16px; }
.agency-points img { width: 44px; height: 44px; flex-shrink: 0; }
.agency-points h3 { font-size: 18px; margin: 0 0 2px; }
.agency-points p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.agency-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
@media (max-width: 720px) { .agency-points { grid-template-columns: 1fr; } .agency-head { flex-direction: column; align-items: flex-start; } }

/* questions */
.page-head { margin-top: 16px; }
.qlist { display: grid; gap: 16px; max-width: 760px; }
.qcard { background: var(--white); border-radius: 28px; padding: clamp(18px, 3vw, 26px); box-shadow: var(--shadow); }
.qcard .stem { font-size: 19px; font-weight: 500; }
.choices { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.choices li { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: 18px; padding: 10px 14px; }
.letter { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--white); display: inline-flex; align-items: center; justify-content: center; font-family: var(--heading); font-size: 15px; }
.qcard details { box-shadow: none; background: var(--mint); border-radius: 20px; }
.qcard details > summary { padding: 12px 16px; }
.answer { padding: 0 16px 14px; }
.answer p:last-child { margin: 0; }
.src { font-size: 14px; color: var(--ink-soft); }
.empty { text-align: center; background: var(--white); border-radius: 28px; padding: 32px; box-shadow: var(--shadow); max-width: 760px; }
.empty.big { margin: 40px auto; }

/* legal */
.legal { max-width: 760px; background: var(--white); border-radius: 32px; padding: clamp(22px, 4vw, 48px); box-shadow: var(--shadow); margin-top: 16px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); }
.legal h2 { font-size: 22px; margin-top: 1.4em; }
.legal .updated { color: var(--ink-soft); font-size: 15px; }
.legal li { margin-bottom: .3em; }

/* motion */
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.bob { animation: bob 3s ease-in-out infinite; }
.float { animation: float 3.4s ease-in-out infinite; }
.f2, .f4 { animation-delay: .6s; animation-duration: 3.8s; }
@media (prefers-reduced-motion: reduce) { .bob, .float { animation: none; } html { scroll-behavior: auto; } }
