@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap");

@font-face {
  font-family: "Noto Sans Thai Looped";
  src: url("/fonts/noto-sans-thai-looped.woff2") format("woff2");
  font-display: swap;
}


.talkthai-home-experience, .portal-page {
  font-family: "Manrope", "Noto Sans Thai Looped", system-ui, sans-serif;
}
:is(.talkthai-home-experience, .portal-page) {
& {
  --ink: #2c1934;
  --muted: #55455e;
  --accent: #632b70;
  --accent-dark: #492155;
  --line: #ded0e5;
  --paper: #fffaff;
  --lilac: #f0e7f7;
  --gold: #f5cb79;
  --display: "Instrument Serif", Georgia, serif;
  --body: "Manrope", "Noto Sans Thai Looped", system-ui, sans-serif;
}

* { box-sizing: border-box; }
&.portal-page { margin: 0; background: var(--paper); color: var(--ink); font: 500 1rem/1.65 var(--body); }
a { color: inherit; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #9553a6; outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.skip { position: absolute; top: 0; left: 12px; z-index: 2; padding: 8px 14px; background: white; transform: translateY(-125%); }
.skip:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.nav, nav, .footer { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
.nav { min-height: 74px; justify-content: space-between; }
nav { flex-wrap: wrap; }
nav a, .footer a { font-weight: 750; text-decoration: none; }
nav a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.brand { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; font-size: 1.3rem; font-weight: 800; line-height: 1; text-decoration: none; }
.brand img { margin-right: 8px; }
.brand span { color: var(--accent); }

.experiencia-hero { display: grid; grid-template-columns: 1.12fr 1fr; align-items: center; gap: clamp(28px, 5vw, 78px); padding-block: clamp(45px, 7.5vw, 108px); }
.eyebrow { color: var(--accent); font-size: .85rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
& h1, & h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
h1 { font-size: clamp(3rem, 6.4vw, 5.6rem); margin-block: 10px 19px; }
& h1 em { color: var(--accent); font-family: "Noto Sans Thai Looped", sans-serif; font-size: .69em; font-style: normal; white-space: nowrap; }
h2 { font-size: clamp(2.4rem, 4.1vw, 4.1rem); margin-block: 6px 12px; }
h3 { font-size: 1.18rem; line-height: 1.35; margin-block: 0 7px; }
.intro { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.16rem); max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block: 24px 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .6rem 1rem; border: 1px solid transparent; border-radius: 9px; text-align: center; text-decoration: none; font-weight: 800; cursor: pointer; }
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-dark); }
.secondary { background: transparent; color: var(--accent-dark); border-color: #ab86b5; }
.secondary:hover { background: var(--lilac); }
.experiencia-hero-note { color: var(--muted); font-size: .9rem; }

.mali-stage { overflow: hidden; border: 1px solid #d8c3e9; border-radius: 24px; background: #e9dff7; }
.mali-art { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transform-origin: 50% 82%; }
.mali-message { position: static; color: var(--ink); justify-content: start; display: flex; align-items: center; flex-wrap: wrap; gap: 3px 10px; padding: 13px 18px; border-top: 1px solid #d8c3e9; background: #f5ecfb; font-weight: 750; }
.mali-thai { font: 700 1.3rem/1.25 "Noto Sans Thai Looped", sans-serif; color: var(--accent); }
.mali-replay { min-height: 44px; margin-left: auto; padding: 3px; border: 0; color: var(--accent-dark); background: transparent; text-decoration: underline; text-underline-offset: .22em; cursor: pointer; }
.is-greeting .mali-art { animation: mali-greeting 1.15s ease-in-out both; }
.is-greeting .mali-message { animation: mali-glow 1.15s ease-out both; }
@keyframes mali-greeting {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.04) rotate(-2deg); }
  55% { transform: scale(1.04) rotate(2deg); }
  78% { transform: scale(1.02) rotate(-1deg); }
}
@keyframes mali-glow { 40% { background-color: #fae6ac; } }

.journey { padding-block: clamp(42px, 6.6vw, 90px); background: var(--lilac); }
.journey-lead { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px 40px; align-items: end; }
.journey-lead p:last-child, .learning-grid p { color: var(--muted); }
.learning-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-block: 24px 19px; }
.learning-grid article { padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.journey-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.text-link { text-decoration: underline; display: inline-block; color: var(--accent-dark); font-weight: 800; text-underline-offset: .22em; }

.mentoring { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 5vw, 64px); padding-block: clamp(44px, 7vw, 96px); }
.mentoring img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.mentoring ul { padding-left: 22px; }
.mentoring li::marker { color: var(--accent); }
.footer { min-height: 80px; flex-wrap: wrap; color: var(--muted); }
.footer .brand { margin-right: auto; }

&.portal-page { background: #f7eff8; }
.portal { padding-block: clamp(36px, 7vw, 76px); }
.portal-head { margin-bottom: 30px; }
.portal-head h1 { font-size: clamp(3rem, 6vw, 5.1rem); }
.portal-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sheet { padding: clamp(17px, 3.3vw, 34px); border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.sheet h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.activity-head { display: flex; gap: 4px 20px; flex-wrap: wrap; align-items: baseline; justify-content: space-between; }
.progress-label { color: var(--accent-dark); font-size: .9rem; font-weight: 800; }
progress { display: block; width: 100%; height: .8rem; margin: 7px 0 22px; accent-color: var(--accent); }
fieldset { min-width: 0; margin: 0 0 18px; padding: 0 0 17px; border: solid var(--line); border-width: 0 0 1px; }
legend { padding: 0; font-weight: 800; }
.options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.options label { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 11px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 1.08rem; }
.options label:has(:checked) { outline: 1px solid var(--accent); background: var(--lilac); }
.options input { accent-color: var(--accent); }
.feedback { margin-top: 8px; color: var(--muted); }
.result { margin-block: 0 12px; padding: 10px 12px; border-radius: 8px; background: #f9eac5; font-weight: 800; }
.review dl { margin: 16px 0; }
.review dl div { padding-block: 7px; border-bottom: 1px solid var(--line); }
.review dt { color: var(--accent-dark); font: 700 1.3rem/1.5 "Noto Sans Thai Looped", sans-serif; }
.review dd { margin: 0; color: var(--muted); }

@media (max-width: 770px) {
  .experiencia-hero, .mentoring, .journey-lead, .portal-grid { grid-template-columns: 1fr; }
  .experiencia-hero { padding-top: 36px; }
  .mali-stage { max-width: 570px; }
  .mentoring img { max-height: 330px; aspect-ratio: 16 / 9; }
}
@media (max-width: 550px) {
  .wrap { width: calc(100% - 32px); }
  .nav { flex-wrap: wrap; min-height: 0; padding-block: 10px 13px; gap: 6px; }
  .nav nav { width: 100%; gap: 13px; }
  .learning-grid { grid-template-columns: 1fr; }
  .mali-replay { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .is-greeting .mali-art, .is-greeting .mali-message { animation: none; }
}

}
