/* its4thai.com: the old ITS4Thai brand, updated. Orange and gold on warm
   white, a drawn temple roof across the top. Light only, every colour set
   explicitly. */

@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans Thai";
  src: url("/fonts/noto-sans-thai-thai.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #fffaf2;
  --ink: #3a2a14;
  --ink-soft: #5a4529;
  --ink-muted: #7a6448;
  --orange: #f7941d;
  --orange-deep: #c25e00;
  --orange-press: #d47600;
  --gold: #f7c46c;
  --gold-soft: #f3c98b;
  --field: #ffffff;
  --error: #a8321b;
  --display: "Nunito", "Noto Sans Thai", ui-rounded, system-ui, sans-serif;
  --body: "Inter", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
}

html { background: var(--page); }
body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}
:lang(th) { font-family: "Noto Sans Thai", var(--body); }

.band {
  position: relative;
  height: clamp(170px, 26vw, 300px);
  background: #eef7fc url("/img/temple.svg") center bottom / cover no-repeat;
}
.logo {
  position: absolute;
  top: 14px;
  left: max(14px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(58, 42, 20, 0.14);
  text-decoration: none;
}
.logo img { width: 40px; height: 35px; }
.logo span {
  font-family: var(--display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.3px;
  color: var(--orange);
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding-block: 28px 40px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.soon {
  display: inline-block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--orange-deep);
  padding: 4px 12px;
  border-radius: 999px;
}

h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(32px, 6vw, 46px);
  line-height: 1.08;
  color: var(--orange-deep);
  margin: 14px 0 12px;
  text-wrap: balance;
}
.lede { font-size: 18px; color: var(--ink-soft); margin: 0 0 22px; max-width: 34em; }

.signup { display: flex; flex-direction: column; gap: 10px; }
.signup-row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--field);
  border: 2px solid var(--gold-soft);
  border-radius: 12px;
  padding: 12px 14px;
}
.signup input::placeholder { color: #a8957a; }
.signup button {
  flex: 0 0 auto;
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  color: #ffffff;
  background: linear-gradient(180deg, #ffa733, var(--orange));
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  box-shadow: 0 3px 0 var(--orange-press);
  cursor: pointer;
}
.signup button:hover { background: linear-gradient(180deg, #ffb24d, #fb9d2b); }
.signup button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--orange-press); }
.signup button:disabled { opacity: 0.7; cursor: default; transform: none; }
.message { margin: 0; min-height: 1.5em; font-weight: 600; color: var(--error); }
.message.ok { color: var(--orange-deep); font-family: var(--display); font-weight: 800; font-size: 20px; }
.note { margin: 0; font-size: 14px; color: var(--ink-muted); max-width: 40em; }

:focus-visible { outline: 3px solid #2f6fb3; outline-offset: 2px; border-radius: 6px; }
.signup input:focus-visible { outline-offset: 1px; }

.story {
  margin: 40px 0 0;
  padding: 22px 22px 20px;
  background: #fff3df;
  border-radius: 18px;
}
.story h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.2;
  color: var(--orange-deep);
  margin: 0 0 10px;
  text-wrap: balance;
}
.story p { margin: 0 0 10px; color: var(--ink-soft); }
.story p:last-child { margin-bottom: 0; }

.features {
  list-style: none;
  margin: 36px 0 0;
  padding: 32px 0 0;
  border-top: 2px dashed var(--gold-soft);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.features li { border-left: 4px solid var(--gold); padding: 2px 0 2px 16px; }
.features h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 21px;
  line-height: 1.25;
  color: var(--orange-deep);
  margin: 0 0 6px;
  text-wrap: balance;
}
.features p { margin: 0; color: var(--ink-soft); }

.closing {
  margin: 44px 0 0;
  padding: 26px 22px 22px;
  background: #fff3df;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.closing h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 26px;
  line-height: 1.15;
  color: var(--orange-deep);
  margin: 0;
  text-wrap: balance;
}
.closing > p { margin: 0; color: var(--ink-soft); }

footer {
  max-width: 680px;
  margin: 0 auto;
  padding-block: 0 32px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  font-size: 13px;
  color: var(--ink-muted);
}

/* account page */
.band.short { height: clamp(120px, 16vw, 180px); }
.card {
  background: #ffffff;
  border: 2px solid var(--gold-soft);
  border-radius: 18px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card h1 { font-size: clamp(26px, 5vw, 34px); margin: 0; }
.card p { margin: 0; color: var(--ink-soft); }
.pw-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pw-row input { flex: 1 1 140px; }
.signup label { font-weight: 600; color: var(--ink-soft); }
.signup .ghost {
  font: inherit;
  font-weight: 600;
  color: var(--orange-deep);
  background: transparent;
  border: 2px solid var(--gold-soft);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}
.signup .ghost:hover,
.signup .ghost:active { background: #fff3df; box-shadow: none; transform: none; }
.signup .ghost { box-shadow: none; }

@media (max-width: 560px) {
  .band { background-position: 24% bottom; }
  .logo { padding: 6px 12px 6px 8px; }
  .logo img { width: 32px; height: 28px; }
  .logo span { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .signup button:active { transform: none; }
}
