/* =========================================================
   style.css — Liquid Glass portfolio (white, futuristic)
   1. Tokens  2. Base  3. Glass + buttons  4. Nav
   5. Hero (B&W portrait + card orbit)  6. Intro  7. Work (curved slider)
   8. Ways (glass rates card)  9. Reviews  10. About  10b. See more work  11. Contact/Footer
   12. Modal  13. Motion  14. Mobile
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #F4F5F8;
  --ink: #111114;
  --muted: #6B6E78;
  --line: rgba(17, 17, 20, .08);
  --orange: #FF6A2B;         /* CI: ส้ม (จุด/ไฮไลต์/hover) */
  --orange-ink: #C4470F;     /* ส้มเข้ม สำหรับตัวหนังสือเล็ก */
  --blue: #5C9BFF;           /* CI: ฟ้ากระจก */
  --sky: #CFE1FF;
  --peach: #FFD8C2;

  --glass-bg: linear-gradient(135deg, rgba(255,255,255,.66), rgba(206,225,255,.3));
  --glass-border: rgba(255, 255, 255, .75);
  --glass-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -1px 0 rgba(17,17,20,.04),
    0 24px 48px -24px rgba(30, 60, 130, .28);
  --blur: blur(18px) saturate(180%);

  --font: "Geist", "Noto Sans Thai", -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --gutter: clamp(16px, 4vw, 48px);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
main, .work, .contact { overflow-x: clip; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.55;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.04em; line-height: 1.02; text-wrap: balance; }
h2 { font-size: clamp(40px, 6.4vw, 84px); font-weight: 700; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; }
a { color: var(--orange-ink); text-decoration: none; }
a:hover { color: var(--orange); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 8px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* ---------- 3. Glass + buttons ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
/* Liquid glass (Chrome/Edge): ขอบแก้วบิดภาพด้านหลังเหมือนเลนส์ */
.lg .glass, .lg .btn--glass {
  backdrop-filter: url(#liquid) blur(3px) saturate(180%) brightness(1.04);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px; border-radius: 999px; font-size: 16px; font-weight: 500;
  transition: transform .3s var(--spring), background .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--orange); color: #fff; }
.btn--glass { color: var(--ink);
  background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.btn--glass:hover { color: var(--ink); background: rgba(255,255,255,.8); }

/* ---------- 4. Nav (เกาะแก้วตรงกลางบน) ---------- */
.nav {
  position: fixed; inset: 16px var(--gutter) auto; z-index: 60;
  display: flex; justify-content: center; pointer-events: none;
}
.nav__pill { display: flex; gap: 2px; padding: 5px; border-radius: 999px; pointer-events: auto; }
.nav__pill a {
  padding: 8px 18px; border-radius: 999px; font-size: 14px; color: var(--ink);
  transition: background .25s, color .25s;
}
.nav__pill a:hover { background: rgba(255,255,255,.9); color: var(--ink); }

/* ---------- 5. Hero ---------- */
.hero {
  --cx: 50%; --cy: 60%; --R: 420px; --cw: 140px;   /* ตั้งค่าจริงจาก hero.js */
  position: relative; height: 100svh; min-height: 640px; overflow: hidden; isolation: isolate;
}
.hero__bg { /* แสงฟ้าหลังตัว + ส้มอุ่นๆ มุมขวา */
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(24% 34% at 50% 60%, rgba(70, 140, 255, .42), transparent 72%),
    radial-gradient(34% 42% at 6% 12%, rgba(150, 192, 255, .7), transparent 70%),
    radial-gradient(30% 40% at 4% 78%, rgba(120, 175, 255, .35), transparent 70%),
    radial-gradient(28% 36% at 96% 20%, rgba(255, 168, 112, .42), transparent 70%),
    radial-gradient(34% 40% at 90% 86%, rgba(255, 106, 43, .3), transparent 70%);
}
.hero__fade { /* ขอบล่าง: เบลอ + จางไปหา section ถัดไป */
  position: absolute; left: 0; right: 0; bottom: 0; height: clamp(140px, 24svh, 240px); z-index: 5; pointer-events: none;
  background: linear-gradient(to bottom, rgba(244,245,248,0), rgba(244,245,248,.75) 60%, var(--bg));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  -webkit-mask: linear-gradient(to bottom, transparent, #000 65%); mask: linear-gradient(to bottom, transparent, #000 65%);
}
.hero__head {
  position: absolute; left: 50%; top: clamp(92px, 12.5svh, 132px); translate: -50% 0; z-index: 4;
  width: min(92vw, 880px); text-align: center;
}
.hero__head h1 { font-size: clamp(34px, 4.5vw, 64px); font-weight: 600; letter-spacing: -0.045em; }
.hero__head .serif { /* ตัวเอียงแบบมีเชิง ให้ดูมีความอาร์ต */
  font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400;
  font-size: 1.18em; letter-spacing: -0.015em; line-height: .9;
}
.hero__head .c-blue { color: #2F6BFF; }
.hero__head .c-orange { color: var(--orange); }
.hero__head p { margin-top: 14px; font-size: clamp(15px, 1.15vw, 17px); }

/* รูปขาวดำ ชิดขอบล่าง หน้าอยู่กึ่งกลาง */
.portrait {
  position: absolute; left: 50%; bottom: 0; translate: -50% 0; z-index: 2;
  height: min(62svh, 720px); width: auto; max-width: none;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}

/* การ์ดโคจรรอบหัว: วงหลังอยู่หลังรูป, วงหน้าอยู่หน้ารูป */
.orbit { position: absolute; inset: 0; pointer-events: none; perspective: 1500px; perspective-origin: var(--cx) var(--cy); }
.orbit--back { z-index: 1; }
.orbit--front { z-index: 3; }
.ring { position: absolute; left: var(--cx); top: var(--cy); width: 0; height: 0; transform-style: preserve-3d; transform: rotateX(-22deg); }
.card {
  --turn: .35; --lift: 0px; --s: 1;
  position: absolute; left: calc(var(--cw) / -2); top: calc(var(--cw) * -.643);
  width: var(--cw); aspect-ratio: 7 / 9; padding: 5px; border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(150,190,255,.6));
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: inset 0 1px 0 #fff, 0 18px 40px -18px rgba(30, 60, 130, .38);
  /* วางบนวง -> หันเข้าหาคนดูนิดหน่อย -> ยกขึ้นตอนเลือก */
  transform: rotateY(var(--a)) translateZ(var(--R)) rotateY(var(--face)) rotateY(calc(var(--f) * var(--turn) * -1)) translateZ(var(--lift)) scale(var(--s));
  transition: transform .8s var(--ease), opacity .5s, box-shadow .5s;
  pointer-events: auto; text-align: left; -webkit-tap-highlight-color: transparent;
}
.card__media { position: relative; display: block; width: 100%; height: 100%; border-radius: 17px; overflow: hidden; background: #E4E7EE; }
.card__media img, .card__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%);
}
.card__media img { filter: grayscale(1) contrast(1.05); transition: filter .6s var(--ease); }
.card__media video { opacity: 0; transition: opacity .5s; }
.card__info {
  position: absolute; left: 5px; right: 5px; bottom: 5px; padding: 28px 10px 9px; border-radius: 0 0 17px 17px;
  background: linear-gradient(to top, rgba(10,10,14,.72), transparent); color: #fff;
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .5s var(--ease);
}
.card__info b { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.card__info span { font-size: 11px; opacity: .8; }
.card .play {
  position: absolute; right: 11px; top: 11px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--orange);
  opacity: 0; transform: scale(.6); transition: opacity .3s, transform .45s var(--spring);
}
.card .play svg { width: 12px; height: 12px; fill: #fff; margin-left: 2px; }
/* การ์ดที่ถูกเลือก: หันหน้าตรง ยกขึ้น มีสี เล่นพรีวิว */
.card.is-active { --turn: 1; --lift: 46px; --s: 1.1; box-shadow: inset 0 1px 0 #fff, 0 30px 60px -22px rgba(30, 60, 130, .5); }
.card.is-active img { filter: none; }
.card.is-active video { opacity: 1; }
.card.is-active .card__info, .card.is-active .play { opacity: 1; transform: none; }
.hero.has-pick .card:not(.is-active) { opacity: .55; }

/* ---------- 6. Intro ---------- */
.intro { padding: clamp(96px, 14vw, 180px) var(--gutter) clamp(72px, 10vw, 120px); max-width: 1240px; margin: 0 auto; }
.intro__text { font-size: clamp(30px, 4.6vw, 60px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.12; }
.hl { background: linear-gradient(90deg, var(--orange), #FF9A4D); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chips { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.chip { padding: 22px 22px 20px; border-radius: 24px; display: flex; flex-direction: column; gap: 4px; }
.chip b { font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.chip span { font-size: 14px; color: var(--muted); }

/* ---------- 7. Work: สไลด์โค้ง แบ่งเป็นชุด ---------- */
.work { position: relative; padding: clamp(72px, 10vw, 120px) 0 clamp(56px, 8vw, 96px); }
.work::before { /* แสงนุ่มๆ ด้านหลัง */
  content: ""; position: absolute; inset: 20% 0 0; z-index: -1;
  background: radial-gradient(50% 45% at 50% 50%, rgba(196,219,255,.6), transparent 70%),
              radial-gradient(30% 35% at 85% 70%, rgba(255,216,194,.45), transparent 70%);
}
.work__head { text-align: center; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.work__head p.muted { max-width: 560px; min-height: 3.1em; }
.eyebrow { color: var(--orange); font-weight: 600; font-size: clamp(16px, 1.5vw, 20px); letter-spacing: -0.01em; }

.curve { --ch: clamp(300px, 30vw, 440px); margin-top: clamp(8px, 2vw, 24px); }
.curve__track {
  position: relative; display: flex; align-items: center; gap: 14px;
  height: calc(var(--ch) + 120px); padding: 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  perspective: 850px; perspective-origin: 50% 50%;
  cursor: grab; overscroll-behavior-x: contain; outline: none;
  transition: opacity .28s;
}
.curve__track::-webkit-scrollbar { display: none; }
.curve__track.is-dragging { cursor: grabbing; }
.curve__track.is-switching { opacity: 0; }
.curve__spacer { flex: none; height: 1px; }
.vcard {
  flex: none; position: relative; height: var(--ch); aspect-ratio: 9 / 16;
  border-radius: 22px; overflow: hidden; background: #DCE2EC;
  box-shadow: 0 30px 50px -30px rgba(20, 40, 90, .45);
  will-change: transform; -webkit-user-select: none; user-select: none;
}
.vcard--h { aspect-ratio: 16 / 9; height: calc(var(--ch) * .6); }
.vcard img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform .6s var(--ease); }
.vcard__info {
  position: absolute; inset: auto 0 0; padding: 40px 16px 14px; text-align: left; color: #fff;
  background: linear-gradient(to top, rgba(10,10,14,.75), transparent);
  opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .45s var(--ease);
}
.vcard__info b { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; }
.vcard__info span { font-size: 12px; opacity: .8; }
.vcard .play {
  position: absolute; right: 12px; top: 12px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--orange); opacity: 0; transform: scale(.6);
  transition: opacity .3s, transform .45s var(--spring);
}
.vcard .play svg { width: 13px; height: 13px; fill: #fff; margin-left: 2px; }
.vcard:hover img, .vcard:focus-visible img { transform: scale(1.05); }
.vcard:hover .vcard__info, .vcard:focus-visible .vcard__info,
.vcard:hover .play, .vcard:focus-visible .play, .vcard.is-center .play { opacity: 1; transform: none; }

.curve__bar { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 0 var(--gutter); }
.curve__caption { min-width: 0; max-width: 520px; text-align: center; font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.curve__caption b { color: var(--ink); font-weight: 600; }
.curve__arrow { flex: none; width: 46px; height: 46px; border-radius: 50%; font-size: 24px; line-height: 1; color: var(--ink); transition: transform .3s var(--spring); }
.curve__arrow:hover { transform: scale(1.08); }
.sets { margin-top: 28px; padding: 0 var(--gutter); display: flex; justify-content: center; gap: clamp(18px, 4vw, 56px); flex-wrap: wrap; }
.set { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 15px; color: var(--muted); padding: 6px 4px; transition: color .25s; }
.set span { font-weight: 700; font-size: 15px; color: var(--ink); opacity: .35; transition: opacity .25s, color .25s; }
.set:hover { color: var(--ink); }
.set[aria-selected="true"] { color: var(--ink); }
.set[aria-selected="true"] span { color: var(--orange); opacity: 1; }

/* ---------- 8. Ways (ราคา): การ์ดกระจก ---------- */
.ways { position: relative; padding: clamp(72px, 10vw, 120px) var(--gutter) clamp(56px, 8vw, 96px); }
.ways::before, .ways::after { /* แสงฟ้า/ส้มด้านหลัง ให้กระจกมีอะไรให้หักเห */
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(90px);
}
.ways::before { width: 520px; height: 520px; left: 6%; top: 34%; background: var(--sky); opacity: .9; }
.ways::after  { width: 420px; height: 420px; right: 8%; bottom: 4%; background: var(--peach); opacity: .7; }
.ways__head { text-align: center; max-width: 960px; margin: 0 auto clamp(36px, 5vw, 60px); }
.ways__head h2 { font-size: clamp(40px, 6.2vw, 84px); }
.ways__head h2 span { color: #9AA3B5; }
.ways__head p { margin-top: 18px; }
.rates__card { max-width: 1040px; margin: 0 auto; border-radius: 40px; padding: clamp(24px, 4.5vw, 56px) clamp(24px, 5vw, 64px); }
.rates__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rate { display: grid; grid-template-columns: 44px 1fr auto; align-items: baseline; gap: 6px 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.rate:first-child { padding-top: 6px; }
.rate i { grid-row: 1 / span 2; font-style: normal; font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--orange); }
.rate b { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.02em; }
.rate span { grid-column: 2; font-size: 15.5px; color: var(--muted); max-width: 540px; }
.rate strong { grid-row: 1 / span 2; grid-column: 3; align-self: center; font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; letter-spacing: -0.04em; }
.rates__foot { margin-top: 24px; text-align: center; font-size: 14px; }

/* ---------- 9. Reviews ---------- */
.reviews { padding: clamp(72px, 10vw, 120px) 0; overflow: hidden; }
.reviews__head { text-align: center; padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 16px; align-items: center; }
.reviews__head b { color: var(--ink); }
.marquee { margin-top: 48px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab;
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee::-webkit-scrollbar { display: none; }
.marquee.is-dragging { cursor: grabbing; -webkit-user-select: none; user-select: none; }
.marquee__track { display: flex; gap: 16px; width: max-content; padding: 10px 0 30px; }
.review { width: 340px; flex: none; padding: 26px; border-radius: 28px; display: flex; flex-direction: column; gap: 18px; justify-content: space-between; }
.review p { font-size: 16px; line-height: 1.6; }
.review footer { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.review .stars { color: var(--orange); letter-spacing: 2px; }

/* ---------- 10. About ---------- */
.about { max-width: 1240px; margin: 0 auto; padding: clamp(72px, 10vw, 120px) var(--gutter); display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.about__photo { position: sticky; top: 96px; border-radius: 36px; overflow: hidden; aspect-ratio: 4 / 5; box-shadow: var(--glass-shadow); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.about__body { display: flex; flex-direction: column; gap: 22px; }
.about__body > p:not(.mono) { color: var(--muted); font-size: 18px; }
.timeline { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.timeline time { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--orange); padding-top: 3px; }
.timeline b { display: block; font-weight: 600; }
.timeline span { font-size: 15px; color: var(--muted); }
.about .btn { align-self: flex-start; }

/* ---------- 10b. See more work: การ์ดหมุนเป็นวง ---------- */
.more {
  /* ขนาดวง/การ์ด อิงทั้งความกว้างและความสูงจอ ให้วงอยู่ในจอเสมอ ไม่ติดขอบ */
  --R: min(32vw, 35svh, 400px); --s: min(9vw, 12.5svh, 140px);
  position: relative; height: clamp(640px, 100svh, 960px); overflow: hidden; isolation: isolate;
  display: grid; place-items: center; background: #0E1015; color: #fff;
}
.more::before { /* แสงฟ้า + ส้มจางๆ */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(40% 40% at 50% 50%, rgba(70, 130, 255, .22), transparent 70%),
              radial-gradient(30% 30% at 85% 90%, rgba(255, 106, 43, .18), transparent 70%);
}
.more__ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; animation: spin 120s linear infinite; }
.more__ring:has(.ring-card:hover) { animation-play-state: paused; }
.ring-card {
  position: absolute; left: calc(var(--s) / -2); top: calc(var(--s) * -.6);
  width: var(--s); height: calc(var(--s) * 1.2); border-radius: 22px; overflow: hidden; background: #1B1E26;
  transform: rotate(var(--a)) translateY(calc(var(--R) * -1));
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); transition: scale .45s var(--spring);
}
.ring-card img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .5s var(--ease); }
.ring-card:hover img, .ring-card:focus-visible img { filter: none; }
.ring-card__info {
  position: absolute; inset: auto 0 0; padding: 30px 14px 12px; font-size: 13px; font-weight: 600; text-align: left;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent); opacity: 0; transition: opacity .3s;
}
.ring-card:hover { scale: 1.08; }
.ring-card:hover .ring-card__info { opacity: 1; }
.more__center { position: relative; z-index: 2; text-align: center; pointer-events: none; display: flex; flex-direction: column; align-items: center; }
.more__center h2 { font-size: clamp(50px, min(7vw, 9.5svh), 120px); line-height: .88; letter-spacing: -0.055em; color: #A3ACBE; }
.more__btn {
  pointer-events: auto; margin-top: 20px; display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 7px 7px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background .25s;
}
.more__btn span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); }
.more__btn:hover { color: #fff; background: rgba(255,255,255,.14); }

/* ---------- 11. Contact / Footer ---------- */
.contact { padding: clamp(72px, 10vw, 120px) var(--gutter); position: relative; }
.contact::before { content: ""; position: absolute; inset: 20% 10%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,216,194,.75), transparent), radial-gradient(closest-side at 70% 60%, rgba(196,219,255,.85), transparent);
  filter: blur(40px); }
.contact__card { max-width: 1040px; margin: 0 auto; border-radius: 44px; padding: clamp(40px, 8vw, 96px) clamp(24px, 6vw, 72px); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.contact__card h2 { font-size: clamp(40px, 7vw, 92px); max-width: 860px; }
.contact__actions { margin-top: 12px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.contact__social { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; margin-top: 8px; font-size: 14px; }
.contact__social a { color: var(--muted); }
.contact__social a:hover { color: var(--ink); }
.footer { display: flex; justify-content: space-between; align-items: center; padding: 28px var(--gutter) 36px; font-size: 13px; color: var(--muted); }
.footer__logo { height: 18px; width: auto; opacity: .6; }

/* ---------- 12. Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(230, 233, 240, .55); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); animation: fade .3s both; }
.modal__panel { position: relative; width: min(1100px, 100%); max-height: calc(100dvh - 40px); overflow: auto; border-radius: 32px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
  background: rgba(255,255,255,.78); border: 1px solid #fff; box-shadow: 0 40px 80px -30px rgba(20,30,60,.35); animation: rise .45s var(--spring) both; }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 4px 6px 0; }
.modal__head h3 { font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; letter-spacing: -0.02em; }
.modal__tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-ink); margin-bottom: 4px; }
.modal__close { flex: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(17,17,20,.06); display: grid; place-items: center; }
.modal__close:hover { background: rgba(17,17,20,.12); }
.modal__close svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; }
.modal__player { display: flex; justify-content: center; background: #0d0d10; border-radius: 22px; overflow: hidden; }
.modal__player iframe { display: block; border: 0; width: 100%; aspect-ratio: 16 / 9; }
.modal__player.is-v iframe { --h: min(68dvh, 760px); height: var(--h); width: calc(var(--h) * 9 / 16); max-width: 100%; aspect-ratio: auto; }
.modal__thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; }
.modal__thumbs:empty { display: none; }
.thumb { flex: none; height: 80px; border-radius: 12px; overflow: hidden; opacity: .5; outline: 2px solid transparent; outline-offset: 2px; transition: opacity .2s, outline-color .2s; }
.thumb img { height: 100%; width: auto; }
.thumb:hover { opacity: .9; }
.thumb[aria-current="true"] { opacity: 1; outline-color: var(--orange); }
body.no-scroll { overflow: hidden; }

/* ---------- 13. Motion ---------- */
.reveal { opacity: 0; transform: translateY(24px); filter: blur(6px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; filter: none; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(30px) scale(.97); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}

/* ---------- 14. Mobile / short screens ---------- */
@media (max-height: 760px) and (min-width: 601px) {
  .hero__head h1 { font-size: clamp(34px, 4vw, 52px); }
  .hero__head p { margin-top: 10px; }
  .portrait { height: 58svh; }
}
@media (max-width: 900px) {
  .chips { grid-template-columns: repeat(2, 1fr); }
  .about { grid-template-columns: 1fr; }
  .about__photo { position: relative; top: 0; max-width: 420px; }
}
@media (max-width: 600px) {
  .nav { inset: 12px 12px auto; }
  .nav__pill a { padding: 8px 13px; font-size: 13.5px; }
  .hero { min-height: 620px; }
  .hero__head { top: 80px; }
  .hero__head h1 { font-size: 33px; }
  .hero__head p { font-size: 14.5px; max-width: 300px; margin: 10px auto 0; }
  .portrait { height: 60svh; }
  .card { padding: 3px; border-radius: 14px; }
  .card__media { border-radius: 11px; }
  .card__info { display: none; }
  .card .play { width: 24px; height: 24px; right: 7px; top: 7px; }
  .card .play svg { width: 10px; height: 10px; }
  .curve { --ch: 300px; }
  .curve__track { gap: 10px; }
  .vcard { border-radius: 16px; }
  .vcard--h { height: 150px; }
  .curve__arrow { width: 40px; height: 40px; font-size: 20px; }
  .curve__caption { font-size: 14px; }
  .sets { justify-content: flex-start; flex-wrap: nowrap; gap: 20px; overflow-x: auto; scrollbar-width: none; padding: 0 20px; }
  .sets::-webkit-scrollbar { display: none; }
  .set { flex: none; font-size: 13.5px; white-space: nowrap; }
  .rates__card { border-radius: 30px; }
  .rate { grid-template-columns: 30px 1fr; padding: 22px 0; }
  .rate strong { grid-row: auto; grid-column: 2; font-size: 30px; margin-top: 4px; }
  .more { --R: 38vw; --s: 58px; height: 580px; }
  .ring-card { border-radius: 14px; }
  .more__center h2 { font-size: 30px; }
  .more__btn { /* มือถือ: ปุ่มอยู่ใต้วง ไม่ชนการ์ด */
    position: absolute; left: 50%; top: calc(50% + var(--R) + var(--s) * .6 + 28px); translate: -50% 0;
    margin: 0; font-size: 14px; white-space: nowrap;
  }
  .review { width: 280px; }
  .timeline li { grid-template-columns: 76px 1fr; }
}
