/* ==========================================================================
   Maxview Hefei — Homepage
   Swan Lake / civic district palette · Fraunces + Sora
   ========================================================================== */

:root {
  --ink: #0c3d4a;
  --ink-deep: #082c36;
  --mist: #e8f1f2;
  --brass: #b8894a;
  --brass-hover: #a07840;
  --charcoal: #1c2428;
  --stone: #f4f6f5;
  --white: #ffffff;
  --muted: rgba(28, 36, 40, 0.62);
  --line: rgba(12, 61, 74, 0.12);
  --shadow-soft: 0 12px 40px rgba(8, 44, 54, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;
  --max: 72rem;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Sora", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sticky-cta-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.page {
  overflow-x: hidden;
  padding-bottom: var(--sticky-cta-h);
}

@media (min-width: 768px) {
  .page {
    padding-bottom: 0;
  }
}

/* Avoid FOUC of raw keys: hide only until JS marks body.lang-ready */
body:not(.lang-ready) [data-i18n] {
  visibility: hidden;
}

noscript ~ * [data-i18n],
.no-js [data-i18n] {
  visibility: visible !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn--primary {
  background: var(--brass);
  color: var(--white);
  border-color: var(--brass);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--brass-hover);
  border-color: var(--brass-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(184, 137, 74, 0.35);
  outline: none;
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  outline: none;
}

/* ==========================================================================
   Hero — full-bleed, brand-first, one composition
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background-color: var(--ink-deep);
  background-size: cover;
  background-position: center 28%;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(8, 44, 54, 0.35) 0%,
      rgba(8, 44, 54, 0.55) 45%,
      rgba(8, 44, 54, 0.88) 100%
    ),
    linear-gradient(
      90deg,
      rgba(12, 61, 74, 0.45) 0%,
      transparent 55%
    );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: var(--space-2xl) 0 var(--space-xl);
  animation: hero-fade-in 0.9s var(--ease) both;
}

@keyframes hero-fade-in {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__brand {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 6vw, 3.75rem);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--mist);
}

.hero__title {
  margin: 0 0 var(--space-sm);
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--white);
}

.hero__lead {
  margin: 0 0 var(--space-lg);
  max-width: 36ch;
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(232, 241, 242, 0.88);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ==========================================================================
   Explore strip
   ========================================================================== */

.explore {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

@media (min-width: 768px) {
  .explore {
    grid-template-columns: repeat(4, 1fr);
  }
}

.explore__item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: var(--space-md) var(--space-lg);
  background: var(--ink);
  color: var(--mist);
  transition: background-color 0.25s var(--ease);
}

.explore__item:hover,
.explore__item:focus-visible {
  background: var(--ink-deep);
  outline: none;
}

.explore__item strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.explore__item span {
  font-size: 0.8125rem;
  color: rgba(232, 241, 242, 0.7);
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section {
  padding: var(--space-2xl) 0;
}

.section:nth-of-type(even) {
  background: var(--mist);
}

.section__head {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto var(--space-xl);
  max-width: 40rem;
}

.section__title {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

.section__desc {
  margin: 0;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 42ch;
}

/* ==========================================================================
   Areas — tabs + panels (interactive → card-like containers OK)
   ========================================================================== */

.areas {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
}

.area-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
  padding: 0.35rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.area-tab {
  flex: 1 1 auto;
  min-width: 6.5rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.area-tab:hover,
.area-tab:focus-visible {
  background: var(--mist);
  outline: none;
}

.area-tab.is-active {
  background: var(--ink);
  color: var(--mist);
}

.area-panel {
  display: none;
  opacity: 0;
}

.area-panel.is-active {
  display: block;
  animation: panel-in 0.4s var(--ease) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Compound grid cards (interactive links)
   ========================================================================== */

.compound-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .compound-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .compound-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.compound-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.compound-card:hover,
.compound-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(8, 44, 54, 0.16);
}

.compound-card__media {
  aspect-ratio: 16 / 10;
  background: var(--ink);
  background-size: cover;
  background-position: center;
  image-rendering: auto;
}

.compound-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: var(--space-md);
  flex: 1;
}

.compound-card__body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.compound-card__body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1;
}

.compound-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ==========================================================================
   Process — 4 steps
   ========================================================================== */

.process {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  gap: var(--space-lg);
  counter-reset: process-step;
}

@media (min-width: 768px) {
  .process {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }
}

.process__step {
  position: relative;
  padding-top: 0.25rem;
  counter-increment: process-step;
}

.process__step::before {
  content: counter(process-step, decimal-leading-zero);
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--brass);
  letter-spacing: -0.02em;
  line-height: 1;
}

.process__step h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.process__step p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .process__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.1rem;
    right: -0.75rem;
    width: 1.25rem;
    height: 1px;
    background: var(--line);
  }
}

/* ==========================================================================
   Schools
   ========================================================================== */

.schools {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .schools {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .schools {
    grid-template-columns: repeat(3, 1fr);
  }
}

.school-card {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--line);
}

.school-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}

.school-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ==========================================================================
   Reviews
   ========================================================================== */

.reviews {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .reviews {
    grid-template-columns: repeat(2, 1fr);
  }
}

.review-card {
  padding: 0;
  border: none;
  background: transparent;
}

.review-card blockquote {
  margin: 0 0 var(--space-md);
  padding: 0;
  border: none;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

.review-card cite {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Team
   ========================================================================== */

.team {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .team {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .team {
    grid-template-columns: repeat(3, 1fr);
  }
}

.team-card {
  text-align: left;
}

.team-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin-bottom: var(--space-sm);
  background: var(--mist);
}

.team-card h3 {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.team-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ==========================================================================
   Contact form (interactive → card container)
   ========================================================================== */

.contact {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
}

.contact__grid {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 800px) {
  .contact__grid {
    grid-template-columns: 1fr 1.15fr;
    align-items: start;
  }
}

.contact__form {
  display: grid;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--stone);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(12, 61, 74, 0.12);
  background: var(--white);
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
}

/* ==========================================================================
   Sticky mobile CTA bar
   ========================================================================== */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: var(--sticky-cta-h);
  padding: 0.65rem 1rem;
  padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--mist);
  border-top: 1px solid rgba(232, 241, 242, 0.12);
  box-shadow: 0 -8px 32px rgba(8, 44, 54, 0.25);
}

.sticky-cta .btn--primary {
  flex: 1;
  max-width: 18rem;
}

@media (min-width: 768px) {
  .sticky-cta {
    display: none;
  }
}

/* ==========================================================================
   Footer band
   ========================================================================== */

.site-end {
  padding: var(--space-xl) 0;
  background: var(--ink-deep);
  color: rgba(232, 241, 242, 0.75);
  text-align: center;
}

.site-end > * {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-end strong {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--mist);
}

.site-end p {
  margin: 0;
  font-size: 0.875rem;
}

.site-end a {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.site-end a:hover,
.site-end a:focus-visible {
  color: var(--mist);
  outline: none;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */

/* ==========================================================================
   Patches aligned to hefei-index.asp markup
   ========================================================================== */

.section--stone {
  background: var(--mist);
}

.section__actions {
  width: min(100% - 2.5rem, var(--max));
  margin: var(--space-xl) auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section__actions .btn--ghost {
  color: var(--ink);
  border-color: rgba(12, 61, 74, 0.28);
}

.section__actions .btn--ghost:hover,
.section__actions .btn--ghost:focus-visible {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

.explore__item i {
  font-size: 1.1rem;
  color: var(--brass);
  margin-bottom: 0.15rem;
}

.area-panel {
  padding: var(--space-lg);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.area-panel[hidden] {
  display: none !important;
}

.area-panel h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
}

.area-panel > p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.area-panel__facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.area-panel__facts li {
  position: relative;
  padding-left: 1rem;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.area-panel__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--brass);
}

.compound-card__meta,
.compound-card__drive {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.compound-card__drive {
  color: var(--ink);
  font-weight: 500;
}

.compound-card__links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.compound-card__links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.process__step::before {
  display: none;
}

.process__num {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--brass);
  letter-spacing: -0.02em;
  line-height: 1;
}

.trust-strip {
  width: min(100% - 2.5rem, var(--max));
  margin: var(--space-xl) auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 768px) {
  .trust-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-strip > div {
  padding: var(--space-md);
  background: var(--white);
  text-align: center;
}

.trust-strip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

.trust-strip span {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (min-width: 960px) {
  .schools {
    grid-template-columns: repeat(4, 1fr);
  }
}

.school-card {
  padding: var(--space-md);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-bottom: 1px solid var(--line);
}

.school-card__meta {
  margin: 0.65rem 0 !important;
  font-size: 0.8rem !important;
  line-height: 1.5;
}

.school-card a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.review-card__stars {
  color: var(--brass);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.review-card__text {
  margin: 0 0 var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

.review-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.review-card__meta strong {
  color: var(--charcoal);
}

.team-card__role {
  margin: 0 0 0.45rem !important;
  font-size: 0.8rem !important;
  font-weight: 600;
  color: var(--brass) !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (min-width: 900px) {
  .team {
    grid-template-columns: repeat(4, 1fr);
  }
}

.contact__grid {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
}

.contact__info p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--charcoal);
}

.contact__info a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.contact__note {
  color: var(--muted) !important;
  font-size: 0.875rem !important;
}

.field span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.field--full {
  grid-column: 1 / -1;
}

.form-banner {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-banner--ok {
  background: #e7f6ef;
  color: #0f5c3b;
}

.form-banner--err {
  background: #fdeceb;
  color: #8a1f1b;
}

.sticky-cta a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--mist);
}

.sticky-cta a:last-child {
  background: var(--brass);
  color: var(--white);
}

.site-end__inner {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
}

.site-end__brand {
  margin: 0 0 0.35rem !important;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--mist) !important;
}

.site-end__copy {
  margin-top: 0.75rem !important;
  opacity: 0.65;
  font-size: 0.8rem !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__inner,
  .area-panel.is-active,
  .btn,
  .compound-card {
    animation: none !important;
    transition: none !important;
  }
}
