/* Wingspan Business Solution, the company home page: one idea per screen,
   centred, with few words, like the product pages (physioclinic/product.css).
   Coloured from the logo: the hummingbird's mint-to-navy gradient gives the
   accents, the wordmark's warm brown-grey gives the text. */

:root {
  /* Logo colours (sampled from images/Wingspan-01.png) */
  --mint: #00f5b1;
  --aqua: #00c5a4;
  --teal: #00a59c;
  --deep-teal: #007c91;
  --navy: #004482;
  --brown: #534741;

  /* Roles */
  --ink: #2e2622;
  --ink-soft: #534741;
  --bg: #ffffff;
  --dark: #002f5c;
  --tint-mint: #c9fbe9;
  --shadow: 0 8px 28px rgba(0,47,92,.1);
  --shadow-lift: 0 22px 50px rgba(0,30,60,.3);
  /* Latin letters keep Inter; Thai falls through to Noto Sans Thai. */
  --sans: "Inter", "Noto Sans Thai", system-ui, sans-serif;
  --display: "Inter Tight", "Inter", "Noto Sans Thai", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--tint-mint); }
:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { margin: 0 0 16px; font-family: var(--display); font-weight: 700; line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.8vw, 3.5rem); }
h3 { font-size: 1.35rem; letter-spacing: -.01em; }
p { margin: 0 0 14px; }

/* Top bar: the logo, a floating pill of links, language and contact */
.topbar { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 3vw, 36px); background: rgba(255,255,255,.85); backdrop-filter: blur(14px); }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem var(--display); letter-spacing: -.01em; color: var(--brown); text-decoration: none; }
.logo-mark { width: 34px; height: auto; }
.pill-nav { display: flex; padding: 4px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); }
.pill-nav a { padding: 7px 18px; border-radius: 999px; color: var(--ink-soft); font-weight: 600; font-size: .94rem; text-decoration: none; white-space: nowrap; transition: background .2s ease; }
.pill-nav a:hover { background: var(--tint-mint); color: var(--dark); }
.top-actions { grid-column: -2; justify-self: end; display: flex; align-items: center; gap: 8px; }
.lang { padding: 7px 12px; border-radius: 999px; color: var(--ink-soft); font-weight: 600; font-size: .94rem; text-decoration: none; }
.lang:hover { background: var(--tint-mint); }

/* Buttons */
.btn { display: inline-block; padding: 14px 30px; border-radius: 999px; border: 2px solid transparent; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .2s ease, border-color .2s ease; }
.btn--sm { padding: 7px 18px; font-size: .92rem; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--dark); }
.btn--mint { background: var(--mint); color: var(--dark); }
.btn--mint:hover { background: #3dffc8; }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--tint-mint); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Layout */
main { padding: 0 clamp(12px, 2vw, 24px); }
section { max-width: 1160px; margin: 0 auto; text-align: center; }
.section { padding-top: clamp(88px, 12vw, 150px); }

/* Hero: one sentence with two words in coloured pills, one button */
.hero { padding: clamp(64px, 13vh, 130px) 8px clamp(56px, 9vh, 96px); }
.hero h1 { margin-bottom: 36px; }
.hero .line { display: block; }
.chip { display: inline-block; padding: 0 .28em .06em; border-radius: 999px; line-height: 1.1; }
.chip--navy { background: var(--navy); color: #fff; }
.chip--mint { background: var(--mint); color: var(--dark); }
/* Keeps the two chips together on one line. */
.nowrap { white-space: nowrap; }

/* PhysioClinic: the app on a board in the logo colours */
.product { padding: clamp(48px, 7vw, 84px) clamp(20px, 5vw, 64px) 0; border-radius: 36px; overflow: hidden; background: linear-gradient(150deg, #00757f 0%, #005f86 45%, var(--navy) 100%); color: #fff; }
.product .name { margin-bottom: 10px; font-weight: 700; color: var(--tint-mint); }
.product h2 { margin-bottom: 28px; }
.device-stage { position: relative; max-width: 860px; margin: clamp(36px, 5vw, 60px) auto 0; padding: 0 4%; }
.ipad, .iphone { background: #16202b; box-shadow: var(--shadow-lift); }
.ipad { padding: clamp(7px, 1.4vw, 14px) clamp(7px, 1.4vw, 14px) 0; border-radius: clamp(16px, 3vw, 30px) clamp(16px, 3vw, 30px) 0 0; }
.ipad img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; border-radius: clamp(10px, 1.8vw, 18px) clamp(10px, 1.8vw, 18px) 0 0; }
.iphone { position: absolute; right: 0; bottom: -12%; width: 21%; padding: clamp(4px, .8vw, 8px); border-radius: clamp(14px, 3.4vw, 34px); }
.iphone img { width: 100%; height: auto; border-radius: clamp(10px, 2.8vw, 27px); }

/* Services: four cards stepping through the logo gradient, navy to mint */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; text-align: left; }
.card { min-height: 220px; display: flex; flex-direction: column; padding: 26px 24px; border-radius: 28px; }
.card h3 { margin: auto 0 4px; }
.card p { margin: 0; font-size: .96rem; }
.card-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: rgba(255,255,255,.92); color: var(--navy); }
.card--navy { background: var(--navy); color: #fff; }
.card--deep { background: #00687a; color: #fff; }
.card--teal { background: var(--aqua); color: var(--dark); }
.card--mint { background: var(--mint); color: var(--dark); }

/* Contact and footer, in one deep card */
.foot { margin: clamp(88px, 12vw, 150px) clamp(0px, 2vw, 24px) 0; padding: clamp(56px, 8vw, 96px) clamp(20px, 4vw, 48px) 28px; border-radius: 36px 36px 0 0; background: var(--dark); color: #d5e3ef; text-align: center; }
.foot h2 { color: #fff; margin-bottom: 28px; }
.foot .hours { margin: 20px 0 0; font-size: .94rem; color: #b3c8db; text-wrap: balance; }
.foot-links { max-width: 1160px; margin: clamp(48px, 7vw, 80px) auto 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .9rem; }
.foot-links p { margin: 0; }
.foot :focus-visible { outline-color: #fff; }

/* Thai: tone marks need taller lines than Latin headings. */
:lang(th) h1, :lang(th) h2, :lang(th) h3 { letter-spacing: 0; }
:lang(th) h1 { font-size: clamp(2rem, 6vw, 4.7rem); line-height: 1.34; }
:lang(th) h2 { font-size: clamp(1.75rem, 4.2vw, 3rem); line-height: 1.4; }
:lang(th) h3 { line-height: 1.4; }
:lang(th) .chip { line-height: 1.4; padding-bottom: 0; margin-top: .08em; }

@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  /* Only the product link stays, so the way to PhysioClinic is never hidden. */
  .pill-nav { justify-self: end; padding: 0; box-shadow: none; background: none; }
  .pill-nav a:not(:first-child) { display: none; }
  .pill-nav a { padding: 6px 12px; background: var(--tint-mint); color: var(--dark); font-size: .88rem; }
  .topbar { grid-template-columns: auto 1fr auto; gap: 8px; padding-left: 16px; padding-right: 16px; }
  .top-actions { gap: 2px; }
  .lang { padding: 7px 8px; }
  .btn--sm { padding: 6px 13px; font-size: .88rem; }
  .hero { padding-top: 56px; }
  .product { border-radius: 28px; }
  .iphone { width: 25%; }
  .card { min-height: 170px; padding: 20px 18px; border-radius: 24px; }
  .card h3 { font-size: 1.12rem; }
  .card p { font-size: .9rem; line-height: 1.45; }
  .card-icon { width: 42px; height: 42px; font-size: 1.15rem; margin-bottom: 16px; }
  .cards { gap: 12px; }
  .foot-links { flex-direction: column; align-items: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .pill-nav a { transition: none; }
}
/* Narrow phones: the logo mark alone (the name stays for screen readers). */
@media (max-width: 420px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
