/* ===================================================================
   AzureCert — shared stylesheet
   Dark navy + white, minimalist/modern, AZ-900 study companion
   =================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --ink: #060c1a;
  --navy: #0a1f3d;
  --navy-soft: #11294d;
  --navy-line: rgba(255, 255, 255, 0.12);
  --blue: #145ea8;
  --blue-bright: #2f7fd1;
  --sky: #4da3ff;
  --sky-soft: #cfe4ff;
  --white: #ffffff;
  --mist: #f3f7fc;
  --mist-200: #e6edf8;
  --line: #dbe4f1;
  --slate: #42526b;
  --slate-light: #76869e;
  --radius-sm: 6px;
  --radius-md: 14px;
  --shadow-soft: 0 24px 48px -28px rgba(6, 12, 26, 0.35);
  --font-display: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --maxw: 1180px;
}

/* ---------- Reset ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

p {
  margin: 0 0 1rem;
  max-width: 62ch;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.12;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 600;
}

button,
input {
  font-family: inherit;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.section-tight {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow-free-tag {
  color: var(--blue);
  font-weight: 600;
}

.bg-mist {
  background: var(--mist);
}

.bg-navy {
  background: var(--navy);
  color: var(--sky-soft);
}

.bg-navy h2,
.bg-navy h3 {
  color: var(--white);
}

.bg-navy p {
  color: var(--sky-soft);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--sky);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--white);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--white);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
}

.btn-outline {
  border-color: var(--line);
  color: var(--navy);
  background: var(--white);
}

.btn-outline:hover {
  background: var(--mist);
  border-color: var(--blue);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid var(--navy-line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  position: relative;
  flex: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 3px;
  background: var(--navy);
}

.nav-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  cursor: pointer;
  z-index: 60;
}

.nav-burger span {
  display: block;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 2vw, 2rem);
}

.nav-links a {
  color: var(--sky-soft);
  font-weight: 500;
  font-size: 0.96rem;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a.is-current {
  color: var(--white);
  border-color: var(--sky);
}

/* ---------- Hero (home) ---------- */
.hero {
  background: radial-gradient(circle at 12% -10%, #132f54 0%, var(--navy) 46%, var(--ink) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-copy p {
  color: var(--sky-soft);
  font-size: 1.05rem;
  max-width: 54ch;
}

.hero-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--navy-line);
}

.hero-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--white);
}

.hero-stat span {
  color: var(--slate-light);
  font-size: 0.85rem;
}

.hero-media {
  position: relative;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid rgba(77, 163, 255, 0.5);
  clip-path: polygon(0 8%, 92% 0, 100% 92%, 8% 100%);
  z-index: 0;
}

.hero-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 4.3;
  object-fit: cover;
  clip-path: polygon(0 8%, 92% 0, 100% 92%, 8% 100%);
}

/* ---------- Feature rows ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.feature-row + .feature-row {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.feature-row.reverse {
  grid-template-columns: 1.1fr 0.9fr;
}

.feature-row.reverse .feature-media {
  order: 2;
}

.feature-media img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  border: 1px solid var(--line);
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--mist);
}

/* ---------- Domain panels (shared: home summary + CLO page) ---------- */
.domain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.domain-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: clamp(1.5rem, 3vw, 2rem);
}

.domain-card.domain-1 {
  border-left-color: var(--sky);
}

.domain-card.domain-2 {
  border-left-color: var(--blue);
}

.domain-card.domain-3 {
  border-left-color: var(--navy);
}

.domain-weight {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
}

.weight-bar {
  height: 6px;
  background: var(--mist-200);
  border-radius: 999px;
  margin: 0.75rem 0 1.1rem;
  overflow: hidden;
}

.weight-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
}

.domain-card.domain-1 .weight-bar-fill {
  background: var(--sky);
}

.domain-card.domain-3 .weight-bar-fill {
  background: var(--navy);
}

.domain-card ul {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}

.domain-card li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.93rem;
  color: var(--slate);
}

.domain-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--blue-bright);
}

/* ---------- Stats band ---------- */
.stats-band {
  position: relative;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

.stats-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--stats-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.18;
}

.stats-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(6, 12, 26, 0.96), rgba(10, 31, 61, 0.86));
}

.stats-band .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}

.stats-band strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  color: var(--white);
}

.stats-band span {
  font-size: 0.85rem;
  color: var(--slate-light);
}

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.testimonial-card p {
  font-size: 0.98rem;
  color: var(--slate);
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.avatar-initial {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.testimonial-person strong {
  display: block;
  font-size: 0.92rem;
  color: var(--navy);
}

.testimonial-person span {
  font-size: 0.82rem;
  color: var(--slate-light);
}

/* ---------- FAQ (details/summary) ---------- */
.faq-list {
  display: grid;
  gap: 0.9rem;
  max-width: 760px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  background: var(--white);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  font-family: var(--font-display);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--blue);
  flex: none;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  margin-top: 0.85rem;
  font-size: 0.95rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--blue) 120%);
  color: var(--white);
  text-align: center;
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  color: var(--sky-soft);
  margin-inline: auto;
}

.cta-band .btn-row {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--slate-light);
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.88rem;
}

.footer-credit {
  font-size: 0.85rem;
  margin: 0;
  color: var(--slate-light);
}

/* ---------- Page banner (interior pages) ---------- */
.page-banner {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--banner-bg);
  background-size: cover;
  background-position: center;
  opacity: 0.22;
}

.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6, 12, 26, 0.94), rgba(10, 31, 61, 0.8));
}

.page-banner .container {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.75rem, 6vw, 4rem);
}

.page-banner p {
  color: var(--sky-soft);
  font-size: 1.02rem;
}

/* ---------- Tabset (radio-hack, used on Practice Test + Flash Cards) ---------- */
.tabset {
  position: relative;
}

.tab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tab-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.tab-labels label {
  border: 1px solid var(--line);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  cursor: pointer;
  background: var(--white);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tab-panel {
  display: none;
}

#tab-1:checked ~ .tab-labels label[for="tab-1"],
#tab-2:checked ~ .tab-labels label[for="tab-2"],
#tab-3:checked ~ .tab-labels label[for="tab-3"] {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

#tab-1:checked ~ #panel-1,
#tab-2:checked ~ #panel-2,
#tab-3:checked ~ #panel-3 {
  display: block;
}

/* ---------- Practice test question cards ---------- */
.qa-list {
  display: grid;
  gap: 1.1rem;
}

.qa-item {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.4rem;
  background: var(--white);
}

.qa-question {
  font-weight: 600;
  color: var(--navy);
  max-width: none;
  margin-bottom: 0.85rem;
}

.qa-number {
  display: inline-block;
  color: var(--blue);
  font-family: var(--font-display);
  margin-right: 0.4rem;
}

.qa-options {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
}

.qa-options li {
  font-size: 0.94rem;
  color: var(--slate);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--mist);
}

.qa-reveal summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--blue);
  font-size: 0.9rem;
  list-style: none;
}

.qa-reveal summary::-webkit-details-marker {
  display: none;
}

.qa-reveal summary::before {
  content: "\25B8  ";
  color: var(--blue);
}

.qa-reveal[open] summary::before {
  content: "\25BE  ";
}

.qa-reveal p {
  margin-top: 0.75rem;
  font-size: 0.93rem;
  max-width: none;
}

.qa-reveal {
  border-top: 1px dashed var(--line);
  padding-top: 0.75rem;
}

/* ---------- Flash cards (checkbox-hack flip) ---------- */
.flash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.flip-card {
  perspective: 1200px;
  display: block;
  cursor: pointer;
  min-height: 170px;
}

.flip-card-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 170px;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}

.flip-card-input:checked ~ .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.96rem;
}

.flip-card-front {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 600;
}

.flip-card-back {
  background: var(--navy);
  color: var(--sky-soft);
  transform: rotateY(180deg);
  font-size: 0.9rem;
}

.flip-hint {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.74rem;
  color: var(--slate-light);
  font-weight: 400;
}

.flip-card-back .flip-hint {
  color: rgba(207, 228, 255, 0.65);
}

/* ---------- Study tip callout ---------- */
.tip-box {
  border: 1px solid var(--line);
  border-left: 5px solid var(--sky);
  background: var(--mist);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin-top: 1.25rem;
}

.tip-box p {
  margin: 0;
  font-size: 0.93rem;
}

/* ---------- Comparison table (CLO page) ---------- */
.clo-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.clo-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.clo-table th,
.clo-table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.clo-table th {
  background: var(--mist);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 600;
}

.clo-table tr:last-child td {
  border-bottom: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
    max-width: 420px;
    margin-inline: auto;
  }

  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse .feature-media {
    order: 0;
  }

  .domain-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .stats-band .container {
    grid-template-columns: repeat(2, 1fr);
  }

  .flash-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-burger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--navy-line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem clamp(1.25rem, 4vw, 2.5rem) 1rem;
    display: none;
  }

  .nav-toggle-input:checked ~ .nav-links {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--navy-line);
  }

  .flash-grid {
    grid-template-columns: 1fr;
  }
}
