/* AI Trust Academy — Responsible Innovation UAE brand system
   Palette (complete, do not extend): Sapphire #2E4366 · Slate #94B1CF · Ivory #EEEADB · White #FFFFFF
   Headings: Rosemartin (brand serif; Cambria/Georgia fallback until webfont files are added)
   Body: Poppins */

:root {
  --sapphire: #2E4366;
  --slate: #94B1CF;
  --ivory: #EEEADB;
  --white: #FFFFFF;
  --heading: 'Rosemartin', Cambria, Georgia, 'Times New Roman', serif;
  --body: 'Poppins', 'Segoe UI', Calibri, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  color: var(--sapphire);
  background: var(--ivory);
}

h1, h2, h3, h4 { font-family: var(--heading); font-weight: 400; line-height: 1.25; color: var(--sapphire); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.25rem; margin-bottom: .6rem; }

p { margin-bottom: 1.1rem; }
a { color: var(--sapphire); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header / navigation ---------- */
header {
  background: var(--white);
  border-bottom: 1px solid var(--slate);
  position: sticky; top: 0; z-index: 50;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: 1080px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand img { height: 46px; width: auto; display: block; }
.brand-name { font-family: var(--heading); font-size: 1.15rem; letter-spacing: .04em; color: var(--sapphire); border-left: 1px solid var(--slate); padding-left: 14px; line-height: 1.2; }
nav ul { list-style: none; display: flex; gap: 26px; }
nav a {
  text-decoration: none; font-size: .92rem; font-weight: 400; letter-spacing: .03em;
  color: var(--sapphire); padding-bottom: 4px; border-bottom: 2px solid transparent;
}
nav a:hover, nav a.active { border-bottom-color: var(--slate); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--sapphire); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { background: var(--sapphire); color: var(--white); padding: 96px 0 88px; }
.hero h1 { color: var(--white); max-width: 780px; }
.hero .lede { color: var(--ivory); font-size: 1.15rem; max-width: 680px; margin-top: 1.4rem; font-weight: 300; }
.hero .eyebrow, .eyebrow {
  font-family: var(--body); font-weight: 400; font-size: .8rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--slate); display: block; margin-bottom: 1.2rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 30px; text-decoration: none;
  font-family: var(--body); font-weight: 400; font-size: .95rem; letter-spacing: .04em;
  border: 1px solid transparent; margin-top: 1.6rem;
}
.btn-light { background: var(--ivory); color: var(--sapphire); }
.btn-light:hover { background: var(--white); }
.btn-dark { background: var(--sapphire); color: var(--white); }
.btn-dark:hover { background: #253753; }
.btn-outline { border-color: var(--white); color: var(--white); margin-left: 14px; }
.btn-outline:hover { background: rgba(255,255,255,.08); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-white { background: var(--white); }
.section-ivory { background: var(--ivory); }
.section-sapphire { background: var(--sapphire); color: var(--white); }
.section-sapphire h2 { color: var(--white); }
.section-sapphire p { color: var(--ivory); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 2.2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 2.2rem; }

.card {
  background: var(--white); border-top: 3px solid var(--slate);
  padding: 30px 28px;
}
.section-white .card { background: var(--ivory); }
.card h3 { color: var(--sapphire); }
.card p { font-size: .96rem; margin-bottom: 0; }

.num {
  font-family: var(--heading); font-size: 2rem; color: var(--slate);
  display: block; margin-bottom: .4rem;
}

/* ---------- 5P strip (flip cards) ---------- */
.fivep { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 2.2rem; }
.fivep .p-letter { font-family: var(--heading); font-size: 1.9rem; color: var(--slate); display: block; }
.fivep .p-name { font-weight: 400; letter-spacing: .06em; font-size: .95rem; }
.flip-card {
  background: none; border: none; padding: 0; cursor: pointer; font-family: var(--body);
  perspective: 900px; min-height: 150px; width: 100%; color: var(--sapphire); text-align: center;
}
.flip-inner {
  display: block; position: relative; width: 100%; height: 150px;
  transition: transform .55s; transform-style: preserve-3d;
}
.flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.flip-front, .flip-back {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px 14px;
}
.flip-front { background: var(--white); border-top: 3px solid var(--slate); }
.flip-back {
  background: var(--sapphire); color: var(--ivory); transform: rotateY(180deg);
  font-size: .82rem; line-height: 1.5; font-weight: 300;
}
.flip-hint { font-size: .78rem; color: var(--slate); margin-top: .6rem; letter-spacing: .04em; }

/* ---------- Stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 2.2rem; }
.stat-tile { background: var(--ivory); padding: 24px 16px; text-align: center; }
.section-ivory .stat-tile { background: var(--white); border-top: 3px solid var(--slate); }
.stat-value { font-family: var(--heading); font-size: 2rem; color: var(--sapphire); display: block; }
.stat-label { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sapphire); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Module table ---------- */
.module-table td:first-child { white-space: nowrap; font-weight: 400; }
.module-table .m-hours { display: block; font-size: .8rem; color: var(--slate); font-weight: 300; }
@media (max-width: 860px) {
  .module-table thead { display: none; }
  .module-table tr { display: block; border-bottom: 2px solid var(--ivory); padding: 8px 0; }
  .module-table td { display: block; border-bottom: none; }
  .module-table td:first-child { white-space: normal; }
}

/* ---------- Engagement structure list ---------- */
.structure { list-style: none; margin: 2rem 0 0; }
.structure li {
  background: var(--white); border-left: 3px solid var(--slate);
  padding: 22px 26px; margin-bottom: 14px; display: flex; gap: 20px; align-items: baseline;
}
.structure .s-num { font-family: var(--heading); font-size: 1.5rem; color: var(--slate); min-width: 2rem; }

/* ---------- Quote / statement band ---------- */
.statement { text-align: center; }
.statement p { font-family: var(--heading); font-size: clamp(1.3rem, 2.6vw, 1.7rem); max-width: 820px; margin: 0 auto; color: var(--sapphire); }
.section-sapphire .statement p, .section-sapphire.statement p { color: var(--ivory); }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; margin-top: 1.6rem; background: var(--white); }
th { background: var(--slate); color: var(--sapphire); font-weight: 400; letter-spacing: .04em; text-align: left; padding: 12px 16px; font-size: .9rem; }
td { padding: 12px 16px; border-bottom: 1px solid var(--ivory); font-size: .95rem; }

/* ---------- Forms ---------- */
form { max-width: 640px; }
label { display: block; font-size: .85rem; font-weight: 400; letter-spacing: .05em; margin: 1.2rem 0 .4rem; }
input, textarea, select {
  width: 100%; padding: 12px 14px; font-family: var(--body); font-size: .95rem;
  border: 1px solid var(--slate); background: var(--white); color: var(--sapphire);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--sapphire); }

/* ---------- Footer ---------- */
footer { background: var(--sapphire); color: var(--ivory); padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; align-items: start; }
footer img { height: 52px; width: auto; margin-bottom: 18px; }
footer h4 { color: var(--white); font-size: 1rem; margin-bottom: .8rem; }
footer p, footer a, footer li { color: var(--ivory); font-size: .88rem; }
footer ul { list-style: none; }
footer li { margin-bottom: .5rem; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(148,177,204,.35); margin-top: 40px; padding-top: 22px; font-size: .8rem; color: var(--slate); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3, .grid-2, .fivep, .footer-grid { grid-template-columns: 1fr; }
  .fivep { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; }
  nav { display: none; width: 100%; }
  nav.open { display: block; }
  nav ul { flex-direction: column; gap: 0; padding: 10px 0; }
  nav li { border-top: 1px solid var(--ivory); }
  nav a { display: block; padding: 12px 4px; border-bottom: none; }
  .nav-wrap { flex-wrap: wrap; }
  .hero { padding: 64px 0 56px; }
  .btn-outline { margin-left: 0; margin-top: 12px; }
  .brand-name { font-size: .95rem; }
}
