/* ==========================================================================
   Gold Foil Immigration — Global Styles
   Moving2Canada-inspired · Bright & Guide-style
   ========================================================================== */

:root {
  /* Brand palette */
  --color-primary: #e63946;
  --color-primary-hover: #d62839;
  --color-primary-light: rgba(230, 57, 70, 0.08);
  --color-secondary: #1d3557;
  --color-secondary-dark: #0b132b;

  /* Surfaces */
  --color-bg: #ffffff;
  --color-bg-muted: #f8f9fa;
  --color-border: #eaeaea;
  --color-border-input: #d1d5db;

  /* Text */
  --color-text: #334155;
  --color-text-heading: #1d3557;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-text-inverse: #ffffff;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 5rem;

  /* Layout */
  --container-max: 72rem;
  --container-padding: 1.25rem;
  --topbar-height: 2.25rem;
  --navbar-height: 4rem;
  --header-height: calc(var(--topbar-height) + var(--navbar-height));

  /* Radius */
  --radius-btn: 6px;
  --radius-card: 8px;
  --radius-input: 6px;

  /* Shadows */
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 10px 20px -5px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-heading);
}

h1 {
  font-size: clamp(2rem, 5vw + 0.5rem, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3vw + 0.25rem, 2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text-muted);
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--space-xl);
}

.section-header {
  margin-bottom: var(--space-lg);
}

.section-header--left {
  text-align: left;
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  max-width: 36rem;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#gf-lead-frame {
  position: absolute;
  width: 0;
  height: 0;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--container-padding);
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: var(--color-text-inverse);
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --- Top Bar --- */
.top-bar {
  background: var(--color-secondary);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
}

.top-bar__inner {
  display: flex;
  justify-content: center;
}

.top-bar__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--transition-fast);
}

.top-bar__link:hover {
  color: #ffffff;
}

.top-bar__badge {
  padding: 0.125rem 0.5rem;
  background: var(--color-primary);
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

/* --- Hero --- */
.hero {
  background: var(--color-bg);
  padding-block: var(--space-xl);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero__content {
  text-align: left;
}

.hero__tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  margin-bottom: var(--space-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: var(--radius-btn);
}

.hero__title {
  margin-bottom: var(--space-md);
}

.hero__desc {
  margin-bottom: var(--space-lg);
  max-width: 32rem;
}

.hero__note {
  margin-top: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--color-text-light);
}

.hero__form-status {
  margin-top: var(--space-xs);
  font-size: 0.875rem;
  line-height: 1.5;
}

.hero__form-status.is-success {
  color: #15803d;
}

.hero__form-status.is-error {
  color: var(--color-primary);
}

.hero__form-status.is-loading {
  color: var(--color-text-muted);
}

.hero__submit:disabled,
.hero__input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.hero__visual {
  width: 100%;
}

.hero__image {
  display: block;
  width: 100%;
  /* 原 4:3 高度的约 60% → 宽高比约 20:9 */
  aspect-ratio: 20 / 9;
  object-fit: cover;
  object-position: center 40%;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

/* --- Personas --- */
.personas {
  background: var(--color-bg);
}

.personas__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

/* --- Services --- */
.services {
  background: var(--color-bg-muted);
}

.services__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.services__intro h2 {
  margin-bottom: var(--space-md);
}

.services__intro p {
  max-width: 28rem;
}

/* --- Checklist --- */
.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  transition:
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.checklist__item:hover {
  border-color: #d1d5db;
  box-shadow: var(--shadow-card-hover);
}

.checklist__item strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: 0.25rem;
}

.checklist__item span {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Footer --- */
.footer {
  background: var(--color-secondary-dark);
  color: rgba(255, 255, 255, 0.75);
  padding-block: var(--space-xl) var(--space-md);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__about {
  margin-top: var(--space-md);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  max-width: 22rem;
}

.footer__heading {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-inverse);
  margin-bottom: var(--space-md);
}

.footer__links a,
.footer__contact li {
  display: block;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.625rem;
  transition: color var(--transition-fast);
}

.footer__links a:hover {
  color: #ffffff;
}

.footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.footer__contact svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--color-primary);
}

.footer__bottom {
  padding-top: var(--space-md);
  text-align: center;
}

.footer__bottom p {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

/* --- Responsive --- */
@media (min-width: 640px) {
  :root {
    --container-padding: 1.5rem;
  }

  .personas__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }

  .hero__form {
    flex-direction: row;
  }

  .hero__input {
    border-radius: var(--radius-input) 0 0 var(--radius-input);
    border-right: none;
  }

  .hero__submit {
    border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
    flex-shrink: 0;
  }
}

@media (min-width: 900px) {
  :root {
    --container-padding: 2rem;
    --space-xl: 5rem;
  }

  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .services__layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 639px) {
  .hero__form {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero__input,
  .hero__submit {
    border-radius: var(--radius-input);
    width: 100%;
  }

  .hero__input {
    border-right: 1px solid var(--color-border-input);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
