/*
 * Digital Foundation Asia — the company site. Plan 10.
 *
 * Every value a designer will replace lives in :root below: colours, the two
 * families, the scale. The look is a placeholder until then (Plan 10, decision 11).
 * The idea it borrows is the land office: deed paper, ledger ink, survey lines.
 * LINE green appears once, on the button that matters.
 */

@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/chakra-petch-thai-600-normal.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Chakra Petch"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/chakra-petch-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sarabun"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/sarabun-thai-400-normal.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Sarabun"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/sarabun-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sarabun"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/sarabun-thai-600-normal.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Sarabun"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/sarabun-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #edf1ea;      /* deed paper */
  --ink: #1c2a38;        /* ledger ink */
  --survey: #6a8494;     /* plot lines */
  --survey-ink: #4a6170; /* the survey tone, dark enough for small text on paper */
  --peg: #c9cfc6;        /* boundary-peg concrete: borders, quiet fills */
  --line-green: #06c755; /* LINE's own green: the contact button and nothing else */
  --line-green-ink: #04913f;

  --display: "Chakra Petch", "Sarabun", system-ui, sans-serif;
  --body: "Sarabun", system-ui, sans-serif;

  /* A modular scale on 1.25 from a 17px body. Thai marks above and below the
     line want more leading than Latin; the body line height carries it for both. */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.33rem;
  --step-2: 1.66rem;
  --step-3: clamp(1.66rem, 1.3rem + 1.4vw, 2.07rem);
  --step-4: clamp(2rem, 1.3rem + 3.2vw, 3.24rem);

  --measure: 38rem;
  --wide: 68rem;
  --gutter: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.75;
}

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

a { color: inherit; text-underline-offset: 0.2em; text-decoration-color: var(--survey); }
a:hover { text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

p { margin: 0; }

/* Thai has no spaces between words, and the browser does not know every
   loanword: this keeps one from splitting across a line in a heading. */
.nobr { white-space: nowrap; }

/* ── Frame ─────────────────────────────────────────────────────────────── */

.frame { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.2;
  text-decoration: none;
}

/* A boundary peg seen from above: the mark until a designer draws one. */
.wordmark-peg { width: 0.75rem; height: 0.75rem; flex: none; background: var(--ink); box-shadow: 0 0 0 3px var(--peg); }

.languages { display: flex; gap: 1rem; font-size: var(--step--1); }
.languages a { text-decoration: none; color: var(--survey-ink); padding-block: 0.25rem; }
.languages a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--ink); }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  gap: 1.5rem;
  padding-block: 0.5rem 3.5rem;
}

.hero h1 { font-size: var(--step-4); max-width: 20ch; }
.hero .lede { font-size: var(--step-1); line-height: 1.65; max-width: var(--measure); margin-top: 1rem; }

.plot { width: 100%; max-width: 28rem; height: auto; }
.plot .road { fill: var(--peg); }
.plot .parcel { fill: none; stroke: var(--survey); stroke-width: 1.5; stroke-linejoin: round; }
.plot .yours { fill: url(#hatch); stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.plot .peg { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.plot .plot-label { font-family: var(--display); font-weight: 600; font-size: 14px; fill: var(--ink); }
.plot .plot-label-bg { fill: var(--paper); }

/* The page's one moment of motion: the survey is drawn, then your plot settles in. */
@media (prefers-reduced-motion: no-preference) {
  .plot .parcel { stroke-dasharray: 1; stroke-dashoffset: 1; animation: survey 1.1s ease-out forwards; }
  .plot .parcel:nth-of-type(2) { animation-delay: 0.1s; }
  .plot .parcel:nth-of-type(3) { animation-delay: 0.2s; }
  .plot .parcel:nth-of-type(4) { animation-delay: 0.3s; }
  .plot .parcel:nth-of-type(5) { animation-delay: 0.4s; }
  .plot .settles { opacity: 0; animation: settle 0.6s ease-out 1.3s forwards; }
  @keyframes survey { to { stroke-dashoffset: 0; } }
  @keyframes settle { to { opacity: 1; } }
}

/* ── The LINE button, and who answers it ───────────────────────────────── */

.reach { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: 1.75rem; }

.line-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.7rem 1.4rem;
  background: var(--line-green);
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-1);
  line-height: 1.2;
  text-decoration: none;
  border-radius: 0.5rem;
}
.line-button:hover { background: var(--line-green-ink); }
.line-button svg { width: 1.6rem; height: 1.6rem; flex: none; }

.answerer { display: flex; align-items: center; gap: 0.75rem; font-size: var(--step--1); line-height: 1.5; }
.answerer strong { display: block; font-size: var(--step-0); font-weight: 600; }

.portrait {
  width: 3.5rem;
  height: 3.5rem;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--peg);
}

/* ── Sections ──────────────────────────────────────────────────────────── */

.section { padding-block: 3.5rem; border-top: 1px solid var(--peg); }
.section h2 { font-size: var(--step-3); margin-bottom: 1.5rem; }
.section .intro { max-width: var(--measure); margin-bottom: 2rem; }

/* What you get: sentences, beside the phone a video will one day replace. */
.offer { display: grid; gap: 2.5rem; align-items: start; }
.offer-list { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.offer-list li { padding-block: 0.9rem; border-bottom: 1px solid var(--peg); }
.offer-list li:first-child { padding-top: 0; }
.offer-list strong { font-weight: 600; }

.phone {
  width: 11.5rem;
  justify-self: center;
  padding: 0.55rem;
  border: 2px solid var(--ink);
  border-radius: 1.75rem;
}
.phone svg { border-radius: 1.2rem; }

/* How it starts: a real sequence, so it is numbered. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); column-gap: 1rem; }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-1);
  line-height: 1;
}
.steps h3 { font-size: var(--step-1); }

/* Price: one number large, the rest as a ledger. */
.price-main { font-family: var(--display); font-weight: 600; font-size: var(--step-4); line-height: 1.15; }
.price-main small { font-size: var(--step-1); color: var(--survey-ink); }
.ledger { width: 100%; max-width: var(--measure); border-collapse: collapse; margin-top: 1.5rem; }
.ledger th, .ledger td { padding: 0.8rem 0; border-bottom: 1px solid var(--peg); vertical-align: top; }
.ledger th { text-align: left; font-weight: 400; }
.ledger td { text-align: right; font-family: var(--display); font-weight: 600; white-space: nowrap; padding-left: 1rem; }
.price-note { margin-top: 1.5rem; max-width: var(--measure); color: var(--survey-ink); }

.soon { max-width: var(--measure); }
.soon h3 { font-size: var(--step-1); margin-bottom: 0.4rem; }

/* Who we are: the Thai partner first, and larger. */
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }
.person { display: flex; gap: 1rem; align-items: center; }
.person h3 { font-size: var(--step-1); }
.person p { color: var(--survey-ink); line-height: 1.5; }
.person .portrait { width: 4.5rem; height: 4.5rem; }
.person.lead .portrait { width: 6rem; height: 6rem; }

.contact-body { display: grid; gap: 2rem; align-items: start; }
.contact-body .intro { margin-bottom: 0; }
.qr { display: none; }
.email { margin-top: 1.25rem; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.footer { padding-block: 2.5rem 3rem; border-top: 2px solid var(--ink); font-size: var(--step--1); line-height: 1.65; }
.footer-grid { display: grid; gap: 1.75rem; }
.footer h2 { font-size: var(--step-0); margin-bottom: 0.4rem; }
.footer p + p { margin-top: 0.4rem; }
.privacy { max-width: var(--measure); color: var(--survey-ink); }

/* ── The 404 and maintenance pages: one message, in both languages ─────── */

.notice { padding-block: 3rem 5rem; }
.notice > * { max-width: var(--measure); }
.notice h1 { font-size: var(--step-4); margin-bottom: 1rem; }
.notice h2 { font-size: var(--step-2); margin-bottom: 0.75rem; }
.notice p + p { margin-top: 0.75rem; }
.notice [lang="en"] { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--peg); }

/* Something we do not have yet: a name, a number, a photo. Visible on purpose,
   so nothing ships with a gap nobody noticed. */
.tbd { outline: 1px dashed var(--survey); outline-offset: 2px; background: color-mix(in srgb, var(--peg) 50%, transparent); }

/* ── Wider screens ─────────────────────────────────────────────────────── */

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; column-gap: 3.5rem; padding-block: 3rem 5rem; }
  .offer { grid-template-columns: minmax(0, 1fr) auto; column-gap: 4rem; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
  .phone { width: 15rem; }
  .person { flex-direction: column; align-items: flex-start; }
  .contact-body { grid-template-columns: minmax(0, 1fr) auto; column-gap: 4rem; }
  .qr { display: block; width: 10rem; text-align: center; font-size: var(--step--1); line-height: 1.4; }
  .qr-code { width: 10rem; height: 10rem; display: grid; place-items: center; margin-bottom: 0.5rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 4rem; }
}
