/* Interactive Textbooks - brand stylesheet */

:root {
  --brand-charcoal: #4A4A4A;
  --brand-teal: #4EC3C7;
  --brand-green: #8BCB7A;
  --brand-grey-light: #D9D9D9;
  --brand-white: #FFFFFF;

  --teal-dark: #3A9BA0;
  --teal-light: #A7E7E9;

  --green-dark: #6FAE5F;
  --green-light: #C7EAC1;

  --grey-mid: #7A7A7A;
  --grey-offwhite: #F5F5F5;

  --action-primary: #4EC3C7;
  --action-secondary: #8BCB7A;
  --success: #8BCB7A;
  --warning: #E6B85C;
  --error: #D96A6A;
  --info: #4EC3C7;

  --text-heading: #4A4A4A;
  --text-body: #5A5A5A;
  --text-muted: #7A7A7A;
  --text-inverse: #FFFFFF;

  --maxw: 1100px;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(74, 74, 74, 0.08);
  --shadow-strong: 0 10px 34px rgba(74, 74, 74, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-body);
  background: var(--brand-white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  color: var(--text-heading);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--brand-grey-light);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  color: var(--text-heading);
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 9px; }
.brand span b { color: var(--teal-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border-radius: 9px;
  color: var(--text-body);
  font-weight: 700;
  font-size: 0.97rem;
}
.nav-links a:hover { background: var(--grey-offwhite); text-decoration: none; }
.nav-links a.active { color: var(--teal-dark); background: var(--teal-light); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--brand-grey-light);
  border-radius: 9px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-heading);
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--brand-white);
    border-bottom: 1px solid var(--brand-grey-light);
    padding: 0.5rem 1rem 0.9rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 0.6rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 800;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-size: 1rem;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand-teal); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { background: var(--brand-green); color: #fff; box-shadow: var(--shadow); }
.btn-secondary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--teal-dark); border-color: var(--brand-teal); }
.btn-ghost:hover { background: var(--teal-light); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--grey-offwhite) 0%, #fff 55%);
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--brand-grey-light);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}
.hero p.lead { font-size: 1.2rem; color: var(--text-body); max-width: 40ch; }
.hero-logo {
  width: 230px; height: 230px; margin: 0 auto;
  border-radius: 28px; box-shadow: var(--shadow-strong);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--teal-dark);
  margin-bottom: 0.6rem;
}
.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.4rem; }

@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-logo { width: 170px; height: 170px; }
  .hero-cta { justify-content: center; }
}

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section.alt { background: var(--grey-offwhite); }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 2.5rem; }
.section-head p { color: var(--text-muted); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--brand-grey-light);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-strong); }
.card h3 { margin-bottom: 0.35rem; }
.card .muted { color: var(--text-muted); font-size: 0.95rem; }

.principle { text-align: left; }
.principle .icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 0.9rem; color: #fff;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}
.badge-teal { background: var(--teal-light); color: var(--teal-dark); }
.badge-green { background: var(--green-light); color: var(--green-dark); }
.badge-soon { background: var(--brand-grey-light); color: var(--grey-mid); }

/* ---------- Sub-brand banners ---------- */
.subbrand {
  border-radius: var(--radius);
  padding: 2rem;
  color: #fff;
  box-shadow: var(--shadow);
}
.subbrand h2 { color: #fff; }
.subbrand.learn { background: linear-gradient(135deg, var(--brand-teal), var(--teal-dark)); }
.subbrand.lifestyle { background: linear-gradient(135deg, var(--brand-green), var(--green-dark)); }
.subbrand .btn { background: #fff; color: var(--text-heading); }
.subbrand .btn:hover { background: var(--grey-offwhite); }

/* ---------- App page ---------- */
.page-hero {
  background: var(--grey-offwhite);
  border-bottom: 1px solid var(--brand-grey-light);
  padding: 2.8rem 0;
}
.app-head { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.app-head img { width: 92px; height: 92px; border-radius: 20px; box-shadow: var(--shadow); }
.breadcrumb { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--text-muted); }

.screens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}
.screen-ph {
  aspect-ratio: 9 / 16;
  border: 2px dashed var(--brand-grey-light);
  border-radius: 18px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 1rem;
}
.screenshot {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--brand-grey-light);
  box-shadow: var(--shadow);
}

.appstore-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--brand-charcoal); color: #fff;
  padding: 0.7rem 1.3rem; border-radius: 12px; font-weight: 800;
}
.appstore-link:hover { text-decoration: none; background: #333; }

.callout {
  background: var(--teal-light);
  border-left: 5px solid var(--brand-teal);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
}
.callout.green { background: var(--green-light); border-left-color: var(--brand-green); }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 700; color: var(--text-heading); margin-bottom: 0.35rem; }
.form-field input, .form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--brand-grey-light);
  border-radius: 10px;
  font: inherit;
  color: var(--text-body);
  background: #fff;
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px var(--teal-light);
}
.form-note { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-charcoal);
  color: #d7d7d7;
  padding: 3rem 0 2rem;
  margin-top: 1rem;
}
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 0.8rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.45rem; }
.footer-grid a { color: #d7d7d7; font-size: 0.95rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.8rem; }
.footer-brand img { width: 40px; height: 40px; border-radius: 9px; }
.footer-brand b { color: #fff; font-size: 1.1rem; }
.footer-bottom {
  border-top: 1px solid #5e5e5e;
  margin-top: 2rem; padding-top: 1.3rem;
  font-size: 0.88rem; color: #b5b5b5;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.prose { max-width: 75ch; }
.prose h2 { margin-top: 1.6rem; }
.tag-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.6rem 0 0; }
.center { text-align: center; }
.mt-2 { margin-top: 1.5rem; }
