/* Pinksolutions: one stylesheet for all pages.
   Shape rule: media and surfaces 28px, small items 14px, buttons full pill. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
/* Thai glyphs for the bilingual legal pages; only downloaded where Thai text appears */
@font-face {
  font-family: "Noto Sans Thai";
  src: url("../fonts/noto-sans-thai.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

:root {
  color-scheme: light dark;
  --pink: #e8377d; /* sampled from the logo */
  --pink-text: #b8195a; /* AA for small text on light surfaces */
  --paper: #f5f3f4;
  --surface: #fdfcfd;
  --ink: #141114;
  --muted: #5e5860;
  --line: rgb(20 17 20 / 0.12);
  --blush: #fbe4ee;
  --shadow: 0 40px 80px -40px rgb(120 20 60 / 0.28);

  --display: "Archivo", "Noto Sans Thai", "Arial Narrow", system-ui, sans-serif;
  --body: "Figtree", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 28px;
  --radius-sm: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --section: clamp(80px, 10vw, 144px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  interpolate-size: allow-keywords;
}
@media (prefers-color-scheme: dark) {
  :root {
    --pink-text: #f0609a;
    --paper: #121013;
    --surface: #1b181c;
    --ink: #f3f0f2;
    --muted: #aba3ac;
    --line: rgb(243 240 242 / 0.13);
    --blush: #2a1520;
    --shadow: 0 40px 80px -40px rgb(0 0 0 / 0.6);
  }
}

/* The dark sheet that carries Why us, FAQ and the footer: the logo's own pink-on-black. */
.night {
  --pink-text: #f0609a;
  --paper: #141114;
  --surface: #1e1a1f;
  --ink: #f5f3f4;
  --muted: #aba3ac;
  --line: rgb(245 243 244 / 0.12);
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
}
@media (prefers-color-scheme: dark) {
  .night {
    --paper: #0b0a0c;
    --surface: #18151a;
    box-shadow: 0 -1px 0 var(--line);
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: 104px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a, button, summary { touch-action: manipulation; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); }

.skip-link {
  position: fixed;
  left: 16px;
  top: -100px;
  z-index: 30;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible { top: 16px; }

/* Type */
.display, h1, h2 {
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 116%;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}
h2 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.75rem); }
h3 {
  font-family: var(--display);
  font-weight: 650;
  font-stretch: 108%;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
.lead {
  margin-top: 20px;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.accent { color: var(--pink); }

/* Header: floating pill */
.site-header {
  position: fixed;
  z-index: 20;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  padding-inline: clamp(12px, 2vw, 24px);
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  max-width: 1320px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-stretch: 112%;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.brand img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a, .menu a {
  display: block;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 200ms ease, color 200ms ease;
}
.nav-links a { padding: 10px 16px; font-weight: 500; font-size: 0.975rem; }
.menu-btn {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 160ms var(--ease-out);
}
.menu-btn:active { transform: scale(0.94); }
.menu-btn span {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform 220ms var(--ease-out);
}
.menu-btn span:first-child { top: 19px; }
.menu-btn span:last-child { top: 27px; }
.site-header:has(.menu:popover-open) .menu-btn span:first-child { transform: translateY(4px) rotate(45deg); }
.site-header:has(.menu:popover-open) .menu-btn span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu {
  pointer-events: auto; /* the header is pointer-events: none, the popover inherits it */
  inset: calc(88px + env(safe-area-inset-top, 0px)) 12px auto 12px;
  width: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  transform-origin: top right;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out),
    overlay 200ms allow-discrete, display 200ms allow-discrete;
}
.menu:not(:popover-open) { opacity: 0; transform: translateY(-6px) scale(0.97); }
@starting-style {
  .menu:popover-open { opacity: 0; transform: translateY(-6px) scale(0.97); }
}
.menu a {
  padding: 14px 18px;
  font-family: var(--display);
  font-weight: 650;
  font-stretch: 112%;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}
.menu a:active { background: var(--blush); }

@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { background: var(--blush); }
  .menu a:hover { background: var(--blush); }
}
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
}

/* Button with nested icon */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 8px 8px 8px 26px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  transition: transform 220ms var(--ease-out);
}
.btn-icon svg { width: 18px; height: 18px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover .btn-icon { transform: translateY(3px); }
}

/* Hero */
.hero { padding-top: calc(76px + clamp(40px, 6vw, 88px)); }
.hero h1 {
  max-width: 20ch;
  font-size: clamp(2.5rem, 0.9rem + 5.4vw, 5.25rem);
  line-height: 1.0;
  letter-spacing: -0.045em;
}
.hero h1 .accent { white-space: nowrap; }
.hero-row {
  display: grid;
  justify-items: start;
  gap: 28px;
  margin-top: clamp(24px, 3vw, 36px);
}
.hero-kicker {
  font-family: var(--display);
  font-weight: 650;
  font-stretch: 112%;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}
.hero-sub { margin-top: 6px; color: var(--muted); font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3rem); }
.hero-media {
  position: relative;
  margin-top: clamp(56px, 7vw, 88px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
}
.hero-frame { overflow: hidden; border-radius: var(--radius); aspect-ratio: 21 / 9; }
.hero-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.hero-mark {
  position: absolute;
  z-index: 1;
  right: clamp(20px, 5vw, 72px);
  top: 0;
  width: clamp(88px, 22vw, 300px);
  translate: 0 -50%;
  pointer-events: none;
}
.hero-mark img { width: 100%; }

/* Shared media */
.media { overflow: hidden; border-radius: var(--radius); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* Import & Export: split */
.split {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px 24px;
  align-items: center;
}
.split-copy { grid-column: 1 / 7; }
.split .media { grid-column: 7 / -1; aspect-ratio: 5 / 4; }
.split .media img { object-position: 35% 50%; }
.points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
  margin-top: 44px;
}
.points li {
  position: relative;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-weight: 500;
  line-height: 1.45;
}
.points li::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--pink);
  transform: rotate(45deg);
}

/* E-Commerce: panel overlapping wide media */
.overlap {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
}
.overlap .media { grid-column: 5 / -1; grid-row: 1; aspect-ratio: 4 / 3; }
.overlap .media img { object-position: 70% 50%; }
.panel {
  grid-column: 1 / 7;
  grid-row: 1;
  z-index: 1;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.checks { margin-top: 32px; }
.checks li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  padding-block: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.checks li + li { border-top: 1px solid var(--line); }
.checks svg { width: 20px; height: 20px; margin-top: 2px; color: var(--pink); }

/* Beauty Salons: blush surface */
.beauty {
  padding: clamp(28px, 5vw, 72px);
  border-radius: var(--radius);
  background: var(--blush);
}
.beauty h2 { font-size: clamp(2.4rem, 1.2rem + 4.6vw, 5rem); }
.beauty .media { margin-top: clamp(32px, 4vw, 56px); aspect-ratio: 2 / 1; border-radius: var(--radius-sm); }
.beauty .media img { object-position: 50% 60%; }
.beauty-points {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.beauty-points li {
  padding-top: 18px;
  border-top: 2px solid var(--pink);
  font-weight: 500;
  line-height: 1.45;
}

/* Why us: bento */
.bento {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  margin-top: clamp(40px, 5vw, 64px);
}
.tile {
  display: flex;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: rgb(255 255 255 / 0.03);
}
.tile-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
}
.tile .media { border-radius: 0; aspect-ratio: 16 / 7; }
.tile-lg { grid-row: span 2; }
.tile-lg .media { flex: 1; min-height: 260px; aspect-ratio: auto; }
.tile-lg .media img { object-position: 15% 50%; }
.tile-body { padding: clamp(24px, 3vw, 36px); }
.tile-lead {
  margin-top: 10px;
  color: var(--pink-text);
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 108%;
  font-size: 1.0625rem;
}
.tile-body p:last-child { margin-top: 10px; color: var(--muted); max-width: 52ch; }

/* FAQ */
.faq {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px 24px;
  align-items: start;
}
.faq-head { grid-column: 1 / 6; position: sticky; top: 112px; }
.faq-list { grid-column: 7 / -1; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-block: 26px;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 106%;
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform 220ms var(--ease-out), background-color 200ms ease;
}
.faq-icon svg { width: 16px; height: 16px; }
details[open] .faq-icon { transform: rotate(45deg); background: var(--pink); border-color: var(--pink); color: #fff; }
.faq-list details p { padding-bottom: 28px; max-width: 58ch; color: var(--muted); }

/* Footer */
.site-footer { padding-block: clamp(64px, 8vw, 104px) 40px; }
/* On the home page the footer continues the dark sheet; on legal pages it is the sheet */
main:has(> .night:last-child) + .site-footer { border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px 24px;
}
.footer-brand .brand { font-size: 1.5rem; }
.footer-brand .brand img { width: 48px; height: 48px; }
.site-footer h2 {
  margin-bottom: 16px;
  font-size: 0.875rem;
  font-stretch: 110%;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.site-footer li a {
  display: inline-block;
  padding-block: 6px;
  text-decoration: none;
  transition: color 200ms ease;
}
.site-footer a[aria-current="page"] { color: var(--pink-text); }
.footer-base {
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}
@media (hover: hover) and (pointer: fine) {
  .site-footer li a:hover { color: var(--pink-text); }
}

/* Legal pages */
.legal { padding-top: calc(76px + clamp(48px, 7vw, 96px)); padding-bottom: var(--section); }
.legal h1 { font-size: clamp(2.5rem, 1.2rem + 4.6vw, 4.75rem); }
.legal-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px clamp(32px, 5vw, 72px);
  align-items: start;
}
.legal-head { grid-column: 1 / -1; padding-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line); }
.legal-head .lead { max-width: 64ch; }
.th-title {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}

/* Bilingual pairs: English and Thai side by side when there is room */
.bi { display: grid; gap: 28px 56px; align-items: start; }
@media (min-width: 1180px) {
  .bi { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 1179px) {
  .prose .th { padding-top: 28px; border-top: 1px dashed var(--line); }
}
[lang="th"] { line-height: 1.85; letter-spacing: 0; }
.prose .th h3 { letter-spacing: 0; line-height: 1.4; }
.th-alpha .mk { margin-right: 4px; color: var(--pink-text); font-weight: 600; }
.tel { white-space: nowrap; }
.toc { position: sticky; top: 112px; }
.toc-title { margin-bottom: 12px; font-weight: 600; color: var(--muted); font-size: 0.9375rem; }
.toc ol { display: grid; gap: 2px; counter-reset: toc; }
.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition: color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .toc a:hover { color: var(--pink-text); }
}
.prose section + section { margin-top: 56px; padding-top: 48px; border-top: 1px solid var(--line); }
.prose h2, .prose h3 {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  font-stretch: 108%;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.prose .num { color: var(--pink-text); }
.prose a { color: var(--pink-text); text-underline-offset: 3px; }
.prose p, .prose ul, .prose ol { margin-top: 16px; }
.prose ul, .prose ol { display: grid; gap: 10px; }
.prose ol.alpha { padding-left: 1.6em; list-style: lower-alpha; }
.prose ol.alpha li { padding-left: 6px; }
.prose ol.alpha li::marker { color: var(--pink-text); font-weight: 600; }
.prose ul li { position: relative; padding-left: 22px; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--pink);
  transform: rotate(45deg);
}
.prose strong { font-weight: 600; }

/* Responsive collapse */
@media (max-width: 900px) {
  .split-copy, .split .media, .overlap .media, .panel, .faq-head, .faq-list { grid-column: 1 / -1; }
  .split .media { grid-row: 1; aspect-ratio: 4 / 3; }
  .overlap { gap: 0; }
  .overlap .media { grid-row: 1; }
  .panel { grid-row: 2; box-shadow: none; border-radius: 0 0 var(--radius) var(--radius); border-top: 0; }
  .overlap .media { border-radius: var(--radius) var(--radius) 0 0; }
  .beauty-points { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: 1fr; }
  .tile-lg { grid-row: auto; }
  .tile-lg .media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .faq-head { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .legal-grid { grid-template-columns: 1fr; }
  .toc { position: static; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
}
@media (max-width: 640px) {
  .hero-frame { aspect-ratio: 4 / 3; }
  .points, .beauty-points { grid-template-columns: 1fr; }
  .beauty .media { aspect-ratio: 4 / 3; }
  .hero-row { justify-items: stretch; }
  .btn { justify-content: space-between; }
}

/* Motion: everything below is enhancement, the page reads fully without it */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .rise { animation: rise 800ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 80ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } }
  .hero-mark { animation: stamp 900ms var(--ease-out) 320ms both; }
  @keyframes stamp { from { opacity: 0; scale: 0.9; } }

  .faq-list details::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 260ms var(--ease-out), content-visibility 260ms allow-discrete;
  }
  .faq-list details[open]::details-content { block-size: auto; }

  @supports (animation-timeline: scroll()) {
    /* Signature: the compass mark turns as the visitor moves down the page */
    .hero-mark img { animation: turn linear both; animation-timeline: scroll(root); }
    @keyframes turn { to { transform: rotate(270deg); } }
  }
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(40px); } }
  }
}
