@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap");

:root {
  --primary: #4697d5;
  --primary-dark: #245b86;
  --secondary: #f7d66f;
  --secondary-dark: #d6aa22;
  --white: #ffffff;
  --ink: #101010;
  --muted: #636363;
  --line: rgba(16, 16, 16, 0.16);
  --card: rgba(255, 255, 255, 0.94);
  --shadow: 0 28px 80px rgba(70, 151, 213, 0.16);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-primary: "GenSekiGothic TW", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-secondary: "Microsoft Tai Le", "Segoe UI", sans-serif;
  --font-number: "Fredoka", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 14%, rgba(247, 214, 111, 0.6), transparent 30%),
    radial-gradient(circle at 12% 100%, rgba(70, 151, 213, 0.24), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(70, 151, 213, 0.18), transparent 22%),
    var(--white);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(247, 214, 111, 0.08), transparent 22%, transparent 72%, rgba(70, 151, 213, 0.08)),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.7) 78%);
  z-index: -2;
}

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

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.site-header {
  display: flex;
  align-items: center;
  padding: 18px clamp(20px, 6vw, 52px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-secondary);
  font-size: 1.02rem;
  font-weight: 600;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  flex: 0 0 26px;
  object-fit: cover;
}

.brand strong {
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
  min-height: calc(100vh - 73px);
  padding: clamp(54px, 7vw, 92px) clamp(24px, 6vw, 68px) 64px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 52vw;
  height: 52vw;
  min-width: 440px;
  min-height: 440px;
  left: -18vw;
  top: -16%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(247, 214, 111, 0.68) 0%, rgba(247, 214, 111, 0.12) 42%, transparent 74%);
  z-index: -1;
}

.hero-sketch {
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(16, 16, 16, 0.06);
  border-radius: 50%;
  z-index: -1;
}

.hero-sketch::before,
.hero-sketch::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 180px;
  height: 1px;
  background: rgba(16, 16, 16, 0.08);
  transform-origin: left center;
}

.hero-sketch::before {
  transform: rotate(38deg);
}

.hero-sketch::after {
  transform: rotate(-38deg);
}

.hero-sketch-top {
  top: 32px;
  right: 16%;
  transform: scale(0.72);
}

.hero-sketch-bottom {
  left: 28%;
  bottom: 18px;
}

.hero-content {
  max-width: 640px;
}

.eyebrow {
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.84rem;
  margin: 0 0 14px;
}

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

h1 {
  font-size: clamp(3.4rem, 7vw, 5.1rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
  margin-bottom: 22px;
  max-width: 8.6em;
}

.hero-description {
  max-width: 430px;
  color: var(--muted);
  font-family: var(--font-secondary);
  font-size: 0.98rem;
  line-height: 1.9;
  margin-bottom: 42px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 30px rgba(70, 151, 213, 0.24);
}

.button.primary:hover,
.button.primary:focus-visible {
  box-shadow: 0 18px 38px rgba(70, 151, 213, 0.34);
}

.button.secondary {
  color: var(--primary-dark);
  background: rgba(70, 151, 213, 0.1);
}

.button.full {
  width: 100%;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--font-secondary);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 400;
}

.hero-link span {
  font-size: 2rem;
  line-height: 1;
}

.login-card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(16, 16, 16, 0.04);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px 26px 24px;
}

.login-card::before {
  display: none;
}

.card-header {
  margin-bottom: 20px;
}

.card-header h2,
.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.card-header p,
.section-heading p:not(.eyebrow),
.belief-card p,
.feature-item p {
  color: var(--muted);
  line-height: 1.75;
}

.card-header p {
  margin-bottom: 4px;
  font-family: var(--font-primary);
  font-weight: 700;
}

.card-header small {
  display: block;
  color: var(--muted);
  font-family: var(--font-secondary);
  line-height: 1.6;
}

.social-login {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 18px;
  width: 100%;
}

.google-signin-button {
  width: 100%;
  min-height: 42px;
  display: grid;
  place-items: center;
}

.google-signin-button > div {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.google-signin-button iframe {
  width: 100% !important;
  max-width: 100% !important;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid rgba(16, 16, 16, 0.18);
  border-radius: 999px;
  background: var(--white);
  color: #292929;
  font-family: var(--font-secondary);
  font-size: 0.92rem;
  cursor: pointer;
}

.social-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
}

.social-icon.google {
  color: #db4437;
  background: rgba(219, 68, 55, 0.08);
}

.social-icon.facebook {
  color: #1877f2;
  background: rgba(24, 119, 242, 0.08);
}

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

.input-group {
  display: grid;
  gap: 6px;
}

.login-form label:not(.checkbox-label) {
  font-weight: 700;
  color: #222;
  font-size: 0.88rem;
}

.login-form input[type="email"],
.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  padding: 11px 14px;
  color: var(--ink);
  font-family: var(--font-secondary);
  transition: border 180ms ease, box-shadow 180ms ease;
}

.login-form input[readonly] {
  color: var(--muted);
  background: rgba(16, 16, 16, 0.04);
  cursor: default;
}

.login-form input:focus {
  outline: none;
  border-color: rgba(70, 151, 213, 0.75);
  box-shadow: 0 0 0 4px rgba(70, 151, 213, 0.14);
}

.form-options {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: -4px 0 0;
  font-family: var(--font-secondary);
  font-size: 0.84rem;
}

.form-options a {
  color: #5a5a5a;
  font-weight: 400;
}

.login-form .button.primary {
  min-height: 40px;
  width: min(140px, 100%);
  justify-self: center;
  margin-top: 6px;
  padding: 0 20px;
  font-family: var(--font-secondary);
  font-size: 0.92rem;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.form-actions .button {
  min-height: 40px;
  min-width: 112px;
  padding-inline: 18px;
  font-family: var(--font-secondary);
  font-size: 0.92rem;
}

.form-message {
  min-height: 22px;
  margin: 12px 0 0;
  text-align: center;
  font-weight: 800;
}

.form-message.success {
  color: #157a48;
}

.form-message.error {
  color: #bf2f2f;
}

.demo-account {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(16, 16, 16, 0.1);
}

.demo-account p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.demo-account code {
  color: var(--primary-dark);
  font-family: var(--font-number);
  overflow-wrap: anywhere;
}

.belief,
.features {
  padding: 60px clamp(20px, 6vw, 72px);
}

.section-heading {
  max-width: 900px;
  margin-bottom: 28px;
}

.section-heading.compact {
  max-width: 680px;
}

.belief-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.92fr 0.92fr;
  gap: 18px;
}

.belief-card,
.feature-item {
  padding: 26px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(20, 33, 51, 0.06);
}

.belief-card.highlighted {
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(67, 151, 213, 0.94), rgba(23, 111, 174, 0.96)),
    var(--primary);
}

.belief-card.highlighted p,
.belief-card.highlighted span {
  color: rgba(255, 255, 255, 0.82);
}

.belief-card span {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--primary-dark);
  font-family: var(--font-number);
  font-weight: 900;
}

.belief-card h3,
.feature-item h3 {
  margin-bottom: 8px;
  font-size: 1.28rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-item {
  display: flex;
  gap: 16px;
}

.feature-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--primary-dark);
  background: rgba(67, 151, 213, 0.12);
  font-weight: 900;
}

.site-footer {
  padding: 28px clamp(20px, 6vw, 72px) 40px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 48px;
  }

  .login-card {
    max-width: 620px;
    width: 100%;
  }

  .belief-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .site-header {
    padding-inline: 20px;
  }

  .form-options {
    justify-content: flex-start;
  }

  h1 {
    font-size: clamp(2.8rem, 16vw, 4rem);
  }

  .hero-link {
    font-size: 1.2rem;
  }
}
