* {
  box-sizing: border-box;
}

:root {
  --blue: #003b95;
  --blue-2: #0057b8;
  --blue-3: #0071c2;
  --yellow: #febb02;
  --yellow-2: #f59e0b;
  --ink: #1a1a1a;
  --muted: #595959;
  --line: #e7e7e7;
  --bg: #f5f7fb;
  --card: #ffffff;
  --font: "Inter", "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 53, 128, .22);
}

.header-inner {
  width: min(1180px, calc(100% - 28px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 1000;
}

.brand span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  color: var(--blue);
  font-size: 14px;
}

.brand strong {
  font-size: 24px;
  letter-spacing: -.03em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
}

.main-nav a:hover,
.main-nav .nav-login {
  border-color: rgba(255,255,255,.45);
  background: rgba(255,255,255,.10);
}

.hero {
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue) 78%, transparent 78%);
  color: #fff;
}

.hero-inner {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 410px;
  gap: 24px;
  padding: 52px 0 96px;
}

.hero-copy {
  padding: 26px 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.eyebrow.blue {
  color: var(--blue-3);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(36px, 5.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -.055em;
}

.lead {
  max-width: 760px;
  color: rgba(255,255,255,.86);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 1000;
}

.button.primary {
  background: var(--yellow);
  color: #111827;
}

.button.secondary {
  border: 1px solid rgba(255,255,255,.42);
  background: rgba(255,255,255,.12);
  color: #fff;
}

.login-card {
  align-self: start;
  border: 4px solid var(--yellow);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  padding: 22px;
  box-shadow: 0 24px 70px rgba(0, 53, 128, .20);
}

.login-title small {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #eaf3ff;
  color: var(--blue);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 1000;
}

.login-title h2 {
  margin-bottom: 6px;
  font-size: 28px;
  line-height: 1.1;
}

.login-title p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.notice.fail {
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff1f2;
  color: #991b1b;
  padding: 10px 12px;
  font-weight: 900;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #333;
  font-weight: 900;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #b8b8b8;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  font: inherit;
  font-weight: 700;
}

.login-form input:focus {
  border-color: var(--blue-3);
  box-shadow: 0 0 0 3px rgba(0, 113, 194, .16);
  outline: none;
}

.login-form button,
.quick-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-3);
  color: #fff;
  padding: 0 16px;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.login-form button:hover,
.quick-button:hover {
  background: var(--blue-2);
}

.login-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.login-footer a {
  color: var(--blue-3);
  font-size: 13px;
  font-weight: 900;
}

.quick-panel {
  width: min(1180px, calc(100% - 28px));
  margin: -58px auto 0;
  position: relative;
  z-index: 5;
}

.quick-search {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1.3fr auto;
  gap: 4px;
  border: 4px solid var(--yellow);
  border-radius: 14px;
  background: var(--yellow);
  box-shadow: 0 18px 46px rgba(0, 53, 128, .13);
}

.quick-field {
  min-height: 66px;
  background: #fff;
  padding: 10px 14px;
  display: grid;
  align-content: center;
  gap: 3px;
}

.quick-field:first-child {
  border-radius: 9px 0 0 9px;
}

.quick-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-field strong {
  font-size: 15px;
  line-height: 1.3;
}

.quick-button {
  min-width: 130px;
  border-radius: 0 9px 9px 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.stat-grid article,
.booking-cards article,
.case-grid article,
.theme-links a,
.section,
.dashboard-preview,
.themes-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 53, 128, .07);
}

.stat-grid article {
  padding: 18px;
}

.stat-grid strong {
  display: block;
  color: var(--blue);
  font-size: 28px;
  font-weight: 1000;
}

.stat-grid span {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.5;
}

.section,
.dashboard-preview,
.themes-section {
  width: min(1180px, calc(100% - 28px));
  margin: 24px auto 0;
  padding: clamp(22px, 4vw, 36px);
}

.section-head {
  max-width: 820px;
}

.section-head h2,
.preview-copy h2,
.themes-section h2 {
  margin-bottom: 12px;
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.1;
  letter-spacing: -.045em;
}

.section-head p:not(.eyebrow),
.preview-copy p {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
}

.booking-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.booking-cards article {
  padding: 22px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eaf3ff;
  font-size: 24px;
}

.booking-cards h3,
.case-grid h3 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.booking-cards p,
.case-grid p {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.feature-grid span {
  border: 1px solid #d8ebff;
  border-radius: 12px;
  background: #f3f9ff;
  color: #164e86;
  padding: 12px;
  font-size: 14px;
  font-weight: 900;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.case-grid article {
  padding: 22px;
}

.case-grid b {
  display: inline-flex;
  border-radius: 999px;
  background: var(--yellow);
  color: #111827;
  padding: 7px 12px;
  font-size: 13px;
}

.dashboard-preview {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 24px;
  align-items: center;
}

.preview-copy .button.primary {
  color: #111827;
}

.mock-window {
  overflow: hidden;
  border: 1px solid #d8ebff;
  border-radius: 18px;
  background: #fff;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.mock-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #cbd5e1;
}

.mock-bar em {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.mock-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 320px;
}

.mock-sidebar {
  display: grid;
  align-content: start;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  padding: 16px;
}

.mock-sidebar strong {
  margin-bottom: 10px;
  font-size: 20px;
}

.mock-sidebar i {
  border-radius: 10px;
  padding: 9px;
  font-style: normal;
  font-size: 13px;
  font-weight: 850;
  opacity: .82;
}

.mock-sidebar .active {
  background: rgba(255,255,255,.16);
  opacity: 1;
}

.mock-main {
  padding: 16px;
}

.mock-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--blue-3));
  color: #fff;
  padding: 18px;
}

.mock-hero strong {
  font-size: 22px;
}

.mock-hero button {
  margin-left: auto;
  border: 0;
  border-radius: 8px;
  background: var(--yellow);
  color: #111827;
  padding: 10px 12px;
  font-weight: 1000;
}

.mock-kpi {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.mock-kpi span {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mock-kpi b {
  display: block;
  color: var(--blue);
  font-size: 24px;
}

.mock-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mock-list i {
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(90deg, #f3f9ff, #fff, #fff7db);
}

.themes-section {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 20px;
  align-items: center;
}

.theme-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.theme-links a {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.theme-links strong {
  color: var(--blue);
  font-size: 28px;
  font-weight: 1000;
}

.theme-links span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.site-footer {
  width: min(1180px, calc(100% - 28px));
  margin: 24px auto 40px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 850;
}

.site-footer a {
  color: var(--blue-3);
}

@media (max-width: 980px) {
  .hero-inner,
  .dashboard-preview,
  .themes-section {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding-bottom: 84px;
  }

  .quick-search {
    grid-template-columns: 1fr;
  }

  .quick-field,
  .quick-field:first-child,
  .quick-button {
    border-radius: 8px;
  }

  .stat-grid,
  .feature-grid,
  .theme-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .booking-cards,
  .case-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 62px;
  }

  .brand strong {
    font-size: 19px;
  }

  .main-nav a:not(.nav-login) {
    display: none;
  }

  .hero-inner {
    width: min(100% - 18px, 520px);
    padding-top: 30px;
  }

  h1 {
    font-size: 39px;
  }

  .lead {
    font-size: 16px;
  }

  .hero-actions,
  .login-footer,
  .site-footer {
    display: grid;
  }

  .button,
  .login-form button {
    width: 100%;
  }

  .quick-panel,
  .section,
  .dashboard-preview,
  .themes-section,
  .site-footer {
    width: min(100% - 18px, 520px);
  }

  .stat-grid,
  .feature-grid,
  .theme-links,
  .mock-kpi {
    grid-template-columns: 1fr;
  }

  .mock-body {
    grid-template-columns: 1fr;
  }

  .mock-sidebar {
    display: none;
  }

  .mock-hero {
    display: grid;
  }

  .mock-hero button {
    margin-left: 0;
  }
}


/* Step 15.1: reduce H1/H2 font sizes by about 5px */
h1 {
  font-size: clamp(31px, calc(5.2vw - 5px), 63px);
}

.login-title h2 {
  font-size: 23px;
}

.section-head h2,
.preview-copy h2,
.themes-section h2 {
  font-size: clamp(23px, calc(3.8vw - 5px), 43px);
}

@media (max-width: 640px) {
  h1 {
    font-size: 34px;
  }
}


/* Step 15.2: reduce H1 font size by another 5px */
h1 {
  font-size: clamp(26px, calc(5.2vw - 10px), 58px);
}

@media (max-width: 640px) {
  h1 {
    font-size: 29px;
  }
}


/* Step 15.3: reduce H1 by another 5px and H2 by another 10px */
h1 {
  font-size: clamp(21px, calc(5.2vw - 15px), 53px);
}

.login-title h2 {
  font-size: 13px;
}

.section-head h2,
.preview-copy h2,
.themes-section h2 {
  font-size: clamp(13px, calc(3.8vw - 15px), 33px);
}

@media (max-width: 640px) {
  h1 {
    font-size: 24px;
  }

  .section-head h2,
  .preview-copy h2,
  .themes-section h2 {
    font-size: 22px;
  }

  .login-title h2 {
    font-size: 18px;
  }
}


/* Step 15.4: app.resort108.com responsive heading tuning */

/* Desktop only: reduce H1 by 7px and H2 by 3px */
@media (min-width: 1024px) {
  h1 {
    font-size: clamp(21px, calc(5.2vw - 22px), 46px);
  }

  .login-title h2 {
    font-size: 10px;
  }

  .section-head h2,
  .preview-copy h2,
  .themes-section h2 {
    font-size: clamp(13px, calc(3.8vw - 18px), 30px);
  }
}

/* Mobile only: reduce H3 by 5px */
@media (max-width: 640px) {
  .booking-cards h3,
  .case-grid h3,
  .theme-links strong {
    font-size: 17px;
  }
}
