/* teemtat — warm gradient / editorial style
   Fonts: Instrument Sans (headings/body) + Instrument Serif italic (accents) + Noto Sans Thai */

:root {
  --bg: #ffffff;
  --fg: #0d0d0d;
  --muted: #6f6f73;
  --line: #e7e7ea;
  --pill-border: #1a1a1a;

  /* gradient palette */
  --g-yellow: #ffe7a3;
  --g-orange: #ff9a3c;
  --g-pink: #ff4fa0;
  --g-magenta: #d4148f;
  --g-purple: #5a1aa8;
  --g-deep: #2a0b5e;

  --sans: "Instrument Sans", "Noto Sans Thai", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: "Instrument Serif", "Noto Serif Thai", Georgia, serif;
}

/* Light-only on purpose: the look depends on a white canvas behind the gradients. */
:root { color-scheme: light; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; text-decoration: none; }
.nav-links { display: flex; gap: 28px; font-size: .82rem; color: var(--muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--fg); }

/* ---------- pill button ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid var(--pill-border);
  border-radius: 999px;
  font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; color: var(--fg); cursor: pointer;
  --lit-fill: transparent; --lit-r: 999px;
}
.pill:hover, .pill:focus-visible { --lit-fill: var(--bg); }
.pill::after { content: "→"; font-size: .95rem; letter-spacing: 0; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 72px 0 0; position: relative; }
.eyebrow { font-family: var(--serif); font-style: italic; font-size: 1.35rem; margin: 0 0 10px; }
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02; letter-spacing: -0.045em; font-weight: 700;
  margin: 0 auto 22px; max-width: 12ch;
}
.lead { color: var(--muted); max-width: 54ch; margin: 0 auto 30px; font-size: .98rem; }

/* gradient glow band (the soft yellow→orange→pink haze) */
.glow {
  position: relative; height: 420px; margin-top: 40px; pointer-events: none;
}
.glow::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: 50%; height: 260px;
  transform: translateY(-50%);
  background:
    radial-gradient(ellipse 35% 60% at 20% 50%, var(--g-orange), transparent 70%),
    radial-gradient(ellipse 40% 70% at 50% 55%, var(--g-pink), transparent 70%),
    radial-gradient(ellipse 35% 60% at 80% 50%, var(--g-magenta), transparent 70%),
    radial-gradient(ellipse 60% 90% at 50% 20%, var(--g-yellow), transparent 70%);
  filter: blur(40px); opacity: .9;
  animation: haze-a 16s ease-in-out infinite alternate;
}
/* second haze layer drifting the other way, so the colours slowly mix and flow */
.glow::after {
  content: ""; position: absolute; left: -10%; right: -10%; top: 50%; height: 240px;
  transform: translateY(-50%);
  background:
    radial-gradient(ellipse 30% 55% at 30% 50%, var(--g-magenta), transparent 70%),
    radial-gradient(ellipse 30% 60% at 65% 45%, var(--g-yellow), transparent 70%),
    radial-gradient(ellipse 25% 55% at 85% 55%, var(--g-purple), transparent 70%);
  filter: blur(50px); opacity: .45; mix-blend-mode: multiply;
  animation: haze-b 22s ease-in-out infinite alternate;
}
@keyframes haze-a {
  0%   { transform: translate(-6%, -50%) scale(1, 1); }
  50%  { transform: translate(3%, -56%) scale(1.08, .92); }
  100% { transform: translate(7%, -46%) scale(.96, 1.1); }
}
@keyframes haze-b {
  0%   { transform: translate(8%, -48%) scale(1.05); }
  50%  { transform: translate(-4%, -54%) scale(.92, 1.12); }
  100% { transform: translate(-9%, -50%) scale(1.1, .95); }
}
@media (prefers-reduced-motion: reduce) { .glow::before, .glow::after { animation: none; } }
/* the floating orb in place of the phone */
.orb {
  position: absolute; left: 50%; top: 50%; width: 240px; height: 240px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, #fff6 0 18%, transparent 40%),
    conic-gradient(from 200deg, var(--g-yellow), var(--g-orange), var(--g-pink), var(--g-magenta), var(--g-purple), var(--g-orange), var(--g-yellow));
  box-shadow: 0 40px 80px -20px #d4148f66, inset 0 -20px 50px #2a0b5e55;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translate(-50%, -56%) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* ---------- statement section ---------- */
.statement {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center;
  padding: 80px 0 64px;
}
.statement h2 {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  line-height: 1.02; letter-spacing: -0.045em; font-weight: 700; margin: 0;
}
.statement h2 em { letter-spacing: -0.01em; }
.statement p { font-size: 1.1rem; line-height: 1.45; margin: 0; max-width: 28ch; justify-self: end; }

/* ---------- project grid ---------- */
.features {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  padding: 8px 0 140px;
}
.features::after { /* bottom haze leading into the banner */
  content: ""; position: absolute; left: -30vw; right: -30vw; bottom: 0; height: 160px; z-index: -1;
  background: linear-gradient(90deg, var(--g-yellow), var(--g-pink) 45%, var(--g-orange));
  filter: blur(50px); opacity: .55;
}
.feature {
  --lit-r: 24px; --lit-fill: rgba(255, 255, 255, .78);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 168px; padding: 22px 24px; border-radius: 24px;
  border: 1px solid var(--line); text-decoration: none;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.feature:hover, .feature:focus-visible { --lit-fill: #fff; }
.feature-no { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--muted); }
.feature h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.03em; margin: 0; display: flex; justify-content: space-between; }
.feature h3::after { content: "↗"; font-weight: 400; opacity: .25; transition: opacity .3s, transform .3s var(--ease-out, ease); }
.feature:hover h3::after, .feature:focus-visible h3::after { opacity: 1; transform: translate(2px, -2px); }

/* ---------- gradient banner ---------- */
.banner {
  background: linear-gradient(100deg, var(--g-deep) 0%, var(--g-purple) 22%, var(--g-magenta) 50%, var(--g-pink) 68%, var(--g-orange) 88%, #ffc23a 100%);
  color: #fff; padding: 110px 0;
}
.banner h2 {
  font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -0.04em; line-height: 1.05;
  margin: 0 0 24px; max-width: 16ch; font-weight: 700;
}
.banner .pill { border-color: #fff; }
.banner .pill { color: #fff; }
.banner .pill:hover, .banner .pill:focus-visible { color: var(--fg); }

footer { padding: 32px 0 48px; color: var(--muted); font-size: .8rem; display: flex; justify-content: space-between; }

/* ---------- sub pages ---------- */
.page-hero { text-align: center; padding: 80px 0 40px; }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.045em; line-height: 1.02; margin: 0 0 16px; }
.page-hero .glow { height: 260px; margin-top: 10px; }
.page-hero .orb { width: 160px; height: 160px; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; }
  .glow { height: 320px; }
  .orb { width: 180px; height: 180px; }
  .statement { grid-template-columns: 1fr; gap: 20px; padding: 56px 0 40px; }
  .statement p { justify-self: start; }
  .features { grid-template-columns: 1fr; gap: 28px; padding-bottom: 100px; }
  .banner { padding: 72px 0; }
  footer { flex-direction: column; gap: 6px; }
}

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.login-glow {
  position: fixed; inset: auto -20% -10% -20%; height: 55vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 30% 60% at 20% 60%, var(--g-orange), transparent 70%),
    radial-gradient(ellipse 35% 70% at 50% 70%, var(--g-pink), transparent 70%),
    radial-gradient(ellipse 30% 60% at 80% 60%, var(--g-magenta), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 30%, var(--g-yellow), transparent 70%);
  filter: blur(50px); opacity: .85;
}
.login { flex: 1; text-align: center; padding: 64px 16px 120px; }
.login h1 { font-size: clamp(2.6rem, 7vw, 4.2rem); letter-spacing: -0.045em; line-height: 1.02; margin: 0 0 36px; }
.login-form {
  max-width: 360px; margin: 0 auto; text-align: left;
  display: grid; gap: 16px;
  padding: 28px; border-radius: 20px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 30px 60px -30px rgba(90, 26, 168, .35);
}
.login-form label { display: grid; gap: 6px; font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.login-form input {
  font: inherit; font-size: 1rem; font-weight: 400;
  padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--fg);
}
.login-error { margin: 0; color: #c2185b; font-size: .85rem; }
.pill-solid, .pill-solid:hover, .pill-solid:focus-visible { --lit-fill: var(--fg); color: #fff; }
.pill-solid { justify-content: center; padding: 13px 20px; font-family: inherit; }

.logout { color: var(--muted); }

/* ---------- login → aurora zoom animation ---------- */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-in-out: cubic-bezier(.65, 0, .35, 1); }

.stage { transition: transform .9s var(--ease-out), filter .9s var(--ease-out), opacity .9s var(--ease-out); transform-origin: 50% 60%; }
.login-glow { transition: opacity .6s; }
.pill-solid { transition: transform .6s var(--ease-out), opacity .4s, background .2s, filter .6s; }

/* aurora: three blurred light blobs, parked below the screen */
.aurora {
  position: fixed; left: 50%; bottom: 0; width: 140vmax; height: 70vmax;
  transform: translate(-50%, 70%) scale(.35); opacity: 0;
  pointer-events: none; z-index: 5; filter: blur(48px) saturate(1.2);
  transition: transform 1s var(--ease-out), opacity .6s;
}
.aurora span { position: absolute; border-radius: 50%; mix-blend-mode: normal; }
.aurora span:nth-child(1) { inset: 20% 30% 10% 5%;  background: radial-gradient(circle, var(--g-purple), transparent 65%); animation: drift1 3.2s ease-in-out infinite; }
.aurora span:nth-child(2) { inset: 15% 8% 15% 35%;  background: radial-gradient(circle, var(--g-orange), transparent 65%); animation: drift2 3.6s ease-in-out infinite; }
.aurora span:nth-child(3) { inset: 0 25% 30% 25%;   background: radial-gradient(circle, var(--g-yellow), var(--g-pink) 40%, transparent 68%); animation: drift3 2.8s ease-in-out infinite; }
@keyframes drift1 { 50% { transform: translate(8%, -6%) scale(1.12); } }
@keyframes drift2 { 50% { transform: translate(-10%, -4%) scale(.9); } }
@keyframes drift3 { 50% { transform: translate(0, -8%) scale(1.15); } }

.status {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px;
  z-index: 6; pointer-events: none;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; color: var(--fg);
  opacity: 0; transform: scale(.92); filter: blur(6px);
  transition: opacity .5s .25s, transform .7s .25s var(--ease-out), filter .5s .25s;
}
.status-icon {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 1) loading: page zooms back + blurs, button dissolves into the glow, aurora rises */
.is-loading .stage { transform: scale(.9); filter: blur(14px); opacity: .25; }
.is-loading .login-glow { opacity: 0; }
.is-loading .pill-solid { transform: scale(1.6, 2.4); opacity: 0; filter: blur(12px); }
.is-loading .aurora { transform: translate(-50%, 38%) scale(1); opacity: 1; }
.is-loading .status { opacity: 1; transform: none; filter: none; }

/* 2) success: aurora sweeps up through the page and off the top, then everything zooms toward you */
.is-success .aurora {
  transform: translate(-50%, -150%) scale(1.5); opacity: .9;
  transition: transform 1.1s var(--ease-in-out), opacity 1.1s;
}
.is-success .status { transition-delay: 0s; }
.is-success .status-icon { animation: none; border-color: currentColor; background: currentColor;
  -webkit-mask: none; position: relative; }
.is-success .status-icon::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px;
  border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.is-success .stage { transform: scale(1.15); opacity: 0; filter: blur(20px); transition-duration: 1.1s; }

/* error: shake */
.shake { animation: shake .5s var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---------- arrival on the site after login: zoom in from blur ---------- */
html.welcome body > * { animation: arrive 1.1s var(--ease-out) both; }
html.welcome body::before {
  content: ""; position: fixed; left: -20%; right: -20%; top: -30vh; height: 70vh; z-index: 50; pointer-events: none;
  background:
    radial-gradient(ellipse 30% 60% at 25% 50%, var(--g-purple), transparent 70%),
    radial-gradient(ellipse 35% 60% at 70% 50%, var(--g-orange), transparent 70%),
    radial-gradient(ellipse 40% 60% at 50% 60%, var(--g-yellow), transparent 70%);
  filter: blur(50px);
  animation: aurora-exit 1.2s var(--ease-in-out) both;
}
@keyframes arrive { from { opacity: 0; transform: scale(1.08); filter: blur(16px); } }
@keyframes aurora-exit { from { transform: translateY(20vh); opacity: 1; } to { transform: translateY(-80vh); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .stage, .aurora, .status, .pill-solid { transition: none !important; }
  .aurora span, .status-icon { animation: none !important; }
  html.welcome body > *, html.welcome body::before { animation: none !important; }
}

/* ---------- request access ---------- */
.login-alt { margin: 22px 0 0; font-size: .88rem; color: var(--muted); }
.login-alt a { color: var(--fg); font-weight: 600; }
.hint { font-weight: 400; color: var(--muted); }
.login-form textarea {
  font: inherit; font-size: .95rem; padding: 12px 14px; border-radius: 12px; resize: vertical;
  border: 1.5px solid var(--line); background: #fff; color: var(--fg);
}
.pill-solid:disabled { opacity: .5; cursor: wait; }
.request-done {
  max-width: 360px; margin: 0 auto; padding: 32px 28px; border-radius: 20px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.9); box-shadow: 0 30px 60px -30px rgba(90,26,168,.35);
}
.done-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 8px; }
.done-text { color: var(--muted); margin: 0 0 22px; }

/* ---------- admin ---------- */
.admin { padding-top: 40px; padding-bottom: 80px; max-width: 860px; }
.admin-head h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); letter-spacing: -0.045em; line-height: 1.02; margin: 0 0 28px; }
.admin-head .eyebrow { text-align: left; }
.muted { color: var(--muted); }
.admin-banner {
  position: sticky; top: 12px; z-index: 10; margin: 0 0 16px; padding: 12px 16px; border-radius: 12px;
  background: var(--fg); color: #fff; font-size: .9rem;
}
.admin-banner.is-error { background: #c2185b; }
.admin-card {
  padding: 22px; border-radius: 18px; margin-bottom: 32px; position: relative; overflow: hidden;
  border: 1px solid var(--line); background: #fff;
}
.admin-card::before {
  content: ""; position: absolute; right: -80px; top: -80px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, var(--g-pink), var(--g-orange) 40%, transparent 70%); opacity: .35; filter: blur(30px);
}
.admin-card h2 { font-size: 1.05rem; margin: 0 0 6px; position: relative; }
.admin-card p { font-size: .88rem; margin: 0 0 14px; position: relative; }
.copy { font: inherit; border: 0; background: #f4f2f5; border-radius: 8px; padding: 2px 8px; cursor: pointer; }
.copy span { color: var(--g-magenta); font-weight: 600; font-size: .78rem; }
.copy code { font-size: .8rem; }
.invite { display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.invite input {
  flex: 1 1 180px; font: inherit; font-size: .95rem; padding: 10px 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff;
}
.invite .pill-solid { padding: 10px 20px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button {
  font: inherit; font-size: .85rem; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); color: var(--muted);
}
.tabs button[aria-selected="true"] { --lit-fill: var(--fg); border-color: var(--fg); color: #fff; }
.count { display: inline-block; min-width: 1.4em; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #0000000d; font-size: .75rem; }
.tabs button[aria-selected="true"] .count { background: var(--g-magenta); color: #fff; }

.user-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.user {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff;
}
.user-info { display: grid; gap: 2px; min-width: 0; }
.user-email { font-size: .9rem; overflow-wrap: anywhere; }
.user-meta { font-size: .78rem; }
.user-note { margin: 6px 0 0; font-family: var(--serif); font-style: italic; font-size: 1rem; }
.user-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.user-actions .pill { padding: 8px 14px; }
.user-actions .pill::after { content: none; }
.link-danger { font: inherit; font-size: .8rem; border: 0; background: none; color: #c2185b; cursor: pointer; padding: 6px; }
.empty { text-align: center; padding: 32px 0; }
@media (max-width: 760px) {
  .user { flex-direction: column; align-items: stretch; }
  .user-actions { justify-content: flex-start; flex-wrap: wrap; }
}
.invite-note { display: inline-block; margin: -16px 0 20px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .88rem; }
.invite-result { display: flex; gap: 8px; align-items: center; margin-top: 12px; position: relative; flex-wrap: wrap; }
.invite-result code { flex: 1 1 240px; font-size: .78rem; padding: 10px 12px; border-radius: 10px; background: #f4f2f5; overflow-wrap: anywhere; }
.invite-result .pill-solid { padding: 10px 18px; }
.invite-result .pill-solid::after { content: none; }

/* =====================================================================
   LIT — "ไฟวิ่งรอบขอบ" (Siri-style edge glow) — the teemtat signature
   ---------------------------------------------------------------------
   Hover / keyboard-focus any .lit element (and .pill, .feature, tabs,
   text inputs — they opt in below): the border turns into our gradient,
   spins around the edge, and blooms outward as a soft light.

   Knobs (set on the element):
     --lit-r       outer border-radius of the element   (match border-radius)
     --lit-fill    the element's fill colour             (opaque when lit)
     --lit-spread  how far the glow reaches              (default 14px)
   Add the class "lit" to any new element to get the effect.
   ===================================================================== */
@property --lit-angle { syntax: "<angle>"; inherits: true; initial-value: 0deg; }

:root {
  --lit-colors: var(--g-yellow), var(--g-orange), var(--g-pink), var(--g-magenta),
                var(--g-purple), var(--g-magenta), var(--g-pink), var(--g-orange), var(--g-yellow);
  --lit-speed: 7s;
}

.lit, .pill, .feature, .tabs button {
  --lit-spread: 9px;
  position: relative;
  background: linear-gradient(var(--lit-fill, var(--bg)), var(--lit-fill, var(--bg))) padding-box;
  transition: border-color .5s ease, color .3s, transform .6s cubic-bezier(.22, 1, .36, 1), box-shadow .7s cubic-bezier(.22, 1, .36, 1);
  /* the angle keeps its place between hovers (paused, not reset) so the light resumes where it left off */
  animation: lit-spin var(--lit-speed) linear infinite paused;
}

/* the bloom: a blurred conic ring that sits just outside the border */
.lit::before, .pill::before, .feature::before, .tabs button::before {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  inset: calc(-1 * (var(--lit-spread) + 1.5px));
  padding: var(--lit-spread);
  border-radius: calc(var(--lit-r, 16px) + var(--lit-spread));
  background: conic-gradient(from var(--lit-angle), var(--lit-colors));
  filter: blur(6px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .7s cubic-bezier(.22, 1, .36, 1);
}

/* ON: hover, keyboard focus, or force it with .is-lit */
.feature:is(:hover, :focus-visible, .is-lit) { border-color: transparent; animation-play-state: running; }
:is(.lit, .pill, .tabs button):is(:hover, :focus-visible, .is-lit) {
  border-color: transparent;
  background:
    linear-gradient(var(--lit-fill, var(--bg)), var(--lit-fill, var(--bg))) padding-box,
    conic-gradient(from var(--lit-angle), var(--lit-colors)) border-box;
  animation-play-state: running;
  outline: none;
}
:is(.lit, .pill, .feature, .tabs button):is(:hover, :focus-visible, .is-lit)::before { opacity: .75; }
.feature:is(:hover, :focus-visible) {
  transform: translateY(-3px);
  box-shadow: inset 0 0 28px -10px var(--g-pink), inset 0 0 50px -24px var(--g-orange);
}
.feature { box-shadow: inset 0 0 0 0 transparent; }
.feature::after {
  content: ""; position: absolute; z-index: 2; pointer-events: none; inset: -1px; padding: 1.5px; border-radius: 24px;
  background: conic-gradient(from var(--lit-angle), var(--lit-colors));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .6s ease;
}
.feature:is(:hover, :focus-visible, .is-lit)::after { opacity: 1; }
:is(.pill, .tabs button):disabled { animation: none; }
:is(.pill, .tabs button):disabled::before { opacity: 0; }

/* text fields: same running edge while typing (inputs can't have ::before, so the bloom is a shadow) */
.login-form input, .login-form textarea, .invite input { transition: border-color .35s, box-shadow .45s; }
:is(.login-form input, .login-form textarea, .invite input):focus {
  outline: none; border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(from var(--lit-angle), var(--lit-colors)) border-box;
  box-shadow: 0 0 18px -4px color-mix(in srgb, var(--g-pink) 55%, transparent),
              0 0 30px -10px color-mix(in srgb, var(--g-orange) 60%, transparent);
  animation: lit-spin var(--lit-speed) linear infinite;
}

@keyframes lit-spin { to { --lit-angle: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .lit, .pill, .feature, .tabs button, .login-form input, .login-form textarea, .invite input { animation: none !important; }
  .feature:is(:hover, :focus-visible) { transform: none; }
}

/* ---------- home (minimal) ---------- */
.home-hero { text-align: center; padding: 88px 0 0; position: relative; }
.home-hero h1 {
  font-size: clamp(3rem, 9vw, 5.6rem); line-height: .95; letter-spacing: -0.05em; font-weight: 700; margin: 0;
}
.home-hero .wrap { position: relative; z-index: 1; }
.home-hero .glow { height: 200px; margin-top: -40px; }
.home .features { padding: 0 0 120px; gap: 24px; grid-template-columns: minmax(0, 420px); justify-content: center; }
@media (max-width: 760px) {
  .home-hero .glow { height: 160px; }
  .home .features { gap: 16px; }
  .feature { min-height: 112px; gap: 20px; }
}
/* keep the login button's dissolve animation (the shared .lit transition above would override it) */
.pill-solid { transition: transform .6s var(--ease-out), opacity .4s, filter .6s, border-color .35s; }

/* ---------- DEV tag (โปรเจกต์ที่ยังอยู่ระหว่างพัฒนา) — pill สีอำพัน + ไอคอนครึ่งวงกลม ---------- */
.tag {
  --tag-fg: #b5832a; --tag-bg: #fcf0d9;
  display: inline-flex; align-items: center; gap: .4em; vertical-align: middle; margin-left: 10px;
  padding: .28em .8em .28em .6em; border-radius: 999px; background: var(--tag-bg); color: var(--tag-fg);
  font-family: inherit; font-size: .72rem; font-weight: 700; letter-spacing: .01em; line-height: 1.2;
}
.tag::before { /* ไอคอนครึ่งวงกลม (in progress) */
  content: ""; width: .95em; height: .95em; border-radius: 50%; flex: none;
  border: .14em solid var(--tag-fg); box-sizing: border-box;
  background: linear-gradient(90deg, var(--tag-fg) 50%, transparent 50%);
}
.page-hero h1 .tag { font-size: .9rem; margin-left: 14px; }
