/* =======================
   core.css — baseline (Apple-like clean design)
   Minimal reset + fluid type + container + responsive grid for team page
   ======================= */

/* 0. Reset (safe) */
:root {
  --fs-1: clamp(28px, 4vw, 56px);
  --fs-2: clamp(22px, 3vw, 40px);
  --fs-3: clamp(18px, 2.2vw, 24px);
  --fs-body: clamp(15px, 1.05vw, 18px);
  --ring: 2px;

  --max-w: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --gap: clamp(16px, 2.5vw, 28px);
  --gap-lg: clamp(20px, 3vw, 36px);
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-soft: 0 12px 30px rgba(0,0,0,.25);
  --shadow-hover: 0 16px 40px rgba(0,0,0,.35);
  --bg: #0b1a17;      /* deep teal-black */
  --surface: rgba(255,255,255,.04);
  --surface-2: rgba(255,255,255,.06);
  --line: rgba(255,255,255,.08);
  --fg: rgba(255,255,255,.88);
  --fg-dim: rgba(255,255,255,.64);
  --accent: #25f5a2;  /* neon green tuned for contrast */
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  /* Fluid type: scales gently from small phones to desktops */
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro SC",
               "PingFang SC", "Segoe UI", Roboto, "Helvetica Neue", Arial,
               "Noto Sans CJK SC","Noto Sans","Microsoft YaHei", sans-serif;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, a { cursor: pointer; }

/* 1. Sections & containers */
.section {
  padding-block: clamp(52px, 7vw, 96px);
  position: relative;
}

.section .section-title,
.section h1, .section h2 {
  margin: 0 0 0.8em 0;
  line-height: 1.25;
  letter-spacing: 0.2px;
  font-weight: 700;
  font-size: clamp(22px, 2.8vw, 40px);
  text-align: center;
}

.container, .wrap, .content, .inner, .section > .cards {
  width: min(100% - 2*var(--gutter), var(--max-w));
  margin-inline: auto;
}

/* 2. Team/Guardians page specific improvements */
.team-section .cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap-lg);
  align-items: stretch;
}

.team-section .card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  padding: clamp(18px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  backdrop-filter: saturate(1.2) blur(6px);
}

.team-section .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(255,255,255,.18);
}

.team-section .agent-avatar {
  width: clamp(84px, 10vw, 120px);
  height: clamp(84px, 10vw, 120px);
  border-radius: 999px;
  border: 3px solid var(--accent);
  object-fit: cover;
  margin-bottom: clamp(12px, 1.8vw, 18px);
}

.team-section h3 {
  font-size: clamp(18px, 2vw, 22px);
  margin: 0.2em 0 0.3em;
  color: var(--accent);
  font-weight: 700;
}

.team-section h4 {
  font-size: clamp(14px, 1.5vw, 16px);
  margin: 0 0 0.6em;
  color: var(--fg);
  opacity: .8;
  font-weight: 600;
}

.team-section p {
  margin: 0;
  color: var(--fg-dim);
  line-height: 1.7;
}

/* 3. Buttons (if present) */
.button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75em 1.15em;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
  font-weight: 600;
}
.button:hover, .btn:hover { background: rgba(255,255,255,.1); transform: translateY(-2px); }
.button.primary, .btn.primary { background: var(--accent); color: #032019; border-color: transparent; }
.button.primary:hover, .btn.primary:hover { transform: translateY(-2px) scale(1.01); }

/* 4. Responsive breakpoints */
@media (max-width: 1023.98px) {
  .team-section .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 639.98px) {
  .section { padding-block: clamp(40px, 8vw, 64px); }
  .team-section .cards { grid-template-columns: 1fr; }
  .team-section .card { text-align: left; align-items: flex-start; }
  .team-section .agent-avatar { margin-left: auto; margin-right: auto; }
}

/* 5. Ultra-wide guardrails */
@media (min-width: 1440px) {
  :root {
  --fs-1: clamp(28px, 4vw, 56px);
  --fs-2: clamp(22px, 3vw, 40px);
  --fs-3: clamp(18px, 2.2vw, 24px);
  --fs-body: clamp(15px, 1.05vw, 18px);
  --ring: 2px;
 --max-w: 1280px; }
  .section .section-title,
  .section h1, .section h2 { letter-spacing: 0.1px; }
}

/* =======================
   Step E — Visual & A11y polish
   ======================= */

/* Typography scale */
:root {
  --fs-1: clamp(28px, 4vw, 56px);
  --fs-2: clamp(22px, 3vw, 40px);
  --fs-3: clamp(18px, 2.2vw, 24px);
  --fs-body: clamp(15px, 1.05vw, 18px);
  --ring: 2px;

  --h1: clamp(28px, 4vw, 56px);
  --h2: clamp(22px, 3vw, 40px);
  --h3: clamp(18px, 2.4vw, 28px);
  --lead: clamp(16px, 1.6vw, 20px);
}

h1 { font-size: var(--h1); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--h2); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: var(--h3); font-weight: 700; }
.lead, .intro { font-size: var(--lead); color: var(--fg-dim); }

/* Link underline animation — subtle */
a.link, .nav-links a {
  position: relative;
  text-decoration: none;
}
a.link::after, .nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%; height: 2px;
  background: currentColor;
  opacity: .7;
  transition: width .25s ease;
}
a.link:hover::after, .nav-links a:hover::after { width: 100%; }

/* Focus visibility for keyboard users */
:where(a, button, .btn, [role="button"], input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, white 30%);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Section containerization for common sections */
.about-section > *, .services-section > *, .works > *, .testimonials-section > *, .contact > * {
  width: min(100% - 2*var(--gutter), var(--max-w));
  margin-inline: auto;
}

/* Cards general rhythm */
.cards .card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cards .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

/* Testimonials tweaks (if they exist) */
.testimonials-section .cards { row-gap: var(--gap-lg); }
.testimonials-section blockquote { margin: 0; color: var(--fg-dim); font-style: italic; }

/* Footer rhythm */
footer { border-top: 1px solid var(--line); padding-block: clamp(32px, 4vw, 56px); color: var(--fg-dim); }
footer .inner, footer .wrap, footer .content { width: min(100% - 2*var(--gutter), var(--max-w)); margin-inline: auto; }

/* Buttons tone down & on-dark contrast */
.btn, .button {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
}
.btn.primary, .button.primary { background: var(--accent); color: #032019; border-color: transparent; }
.btn:focus-visible, .button:focus-visible { outline-color: var(--accent); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--accent);
  color: #032019;
  border-radius: 999px;
  z-index: 10000;
}


/* Headings polishing */
h1 { font-size: var(--fs-1); line-height: 1.15; margin: 0 0 0.6em; }
h2 { font-size: var(--fs-2); line-height: 1.2;  margin: 0 0 0.8em; }
h3 { font-size: var(--fs-3); line-height: 1.25; margin: 0.4em 0 0.6em; }
p  { font-size: var(--fs-body); }
a:hover { opacity: .92; }


/* Spacing tweak for big titles */
.section .section-title,
.section h1,
.section h2 {
  margin-bottom: clamp(22px, 3.8vw, 40px);
}
.team-section h2 {
  margin-bottom: clamp(22px, 3.8vw, 40px);
}
