/* ============================================
   Purpose Driven AI - Global Styles
   Fonts: Merriweather (headings), Poppins (body)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand Colors (palette 2026-07-12: yellow, black, green, navy) */
  --navy: #22315E;
  --navy-dark: #161F3D;
  --navy-link: #2E4380;
  --lavender: #9DA5FE;
  --green: rgb(103, 227, 159);
  --yellow: rgb(255, 200, 3);
  --black: rgb(0, 0, 0);
  --near-black: rgb(29, 30, 32);
  --white: #ffffff;
  --gray-light: rgb(240, 240, 240);
  --gray-contrast: rgb(224, 224, 224);

  /* Typography */
  --font-heading: 'Merriweather', serif;
  --font-body: 'Poppins', sans-serif;

  /* Layout */
  --max-width: 1224px;
  --section-padding: 80px 24px;
  --section-padding-mobile: 56px 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

h1 { font-size: 64px; line-height: 1.0; }
h2 { font-size: 56px; }
h3 { font-size: 48px; }
h4 { font-size: 40px; }
h5 { font-size: 32px; }
h6 { font-size: 24px; }

.body-large { font-size: 18px; line-height: 1.5; }
.body-small { font-size: 14px; font-weight: 500; line-height: 1.5; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 700; }

.text-white { color: var(--white); }
.text-navy { color: var(--navy); }
.text-green { color: var(--green); }

/* ---------- Container ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: normal;
  padding: 16px 40px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--navy-dark);
}

.btn-secondary {
  background: var(--white);
  color: var(--black);
}
.btn-secondary:hover {
  background: var(--gray-light);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 3px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 3px solid var(--white);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--black);
}

/* ---------- Sections ---------- */
.section {
  padding: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.section--white { background: var(--white); color: var(--black); }
.section--navy {
  background: var(--navy) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--white);
}
.section--green {
  background: var(--green) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--black);
}
.section--yellow {
  background: var(--yellow) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--black);
}
.section--lavender {
  background: var(--lavender) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--black);
}

.section .container { position: relative; z-index: 2; }
section { scroll-margin-top: 90px; }

/* ---------- Polish layer (2026-07-12 sweep) ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

.card--green {
  background: var(--green) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--black);
}
.card--navy {
  background: var(--navy) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--white);
}

/* Angled section edges: colored sections cut on a slight diagonal.
   Direction and depth alternate by position; negative margins overlap
   adjacent colored sections so no white gap appears between them. */
.section--navy,
.section--green,
.section--yellow,
.section--lavender {
  clip-path: polygon(0 0, 100% 32px, 100% 100%, 0 calc(100% - 32px));
  margin-top: -32px;
  padding-top: 104px;
  padding-bottom: 104px;
}
section.section--navy:nth-of-type(even),
section.section--green:nth-of-type(even),
section.section--yellow:nth-of-type(even),
section.section--lavender:nth-of-type(even) {
  clip-path: polygon(0 44px, 100% 0, 100% calc(100% - 20px), 0 100%);
  margin-top: -44px;
}
section.hero {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%) !important;
  margin-top: 0 !important;
}
/* Colored section directly after another colored section: overlap fully, no white gap */
section:is(.section--navy, .section--green, .section--yellow, .section--lavender) + section:is(.section--navy, .section--green, .section--yellow, .section--lavender) {
  margin-top: -76px;
}
section:is(.section--navy, .section--green, .section--yellow, .section--lavender) + footer.footer {
  margin-top: -64px;
}
.footer {
  clip-path: polygon(0 32px, 100% 0, 100% 100%, 0 100%);
  margin-top: -32px;
  padding-top: 96px;
}

/* Word-by-word headline rise (site-fx.js splits the words) */
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: var(--wd, 0s);
}
.words-in .word { opacity: 1; transform: translateY(0); }

/* Case study images breathe in their frame */
.case-study > div:first-child { overflow: hidden; border-radius: 20px; }
.case-study__img { transition: transform .5s ease; }
.case-study > div:first-child:hover .case-study__img { transform: scale(1.05); }

.bio-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 24px;
  margin-bottom: 20px;
}

/* Flow timeline: steps on a line, hover reveals purpose + actions */
.flow {
  display: flex;
  justify-content: space-between;
  position: relative;
  max-width: 900px;
  margin: 160px auto 0;
}
.flow::before {
  content: "";
  position: absolute;
  left: 60px;
  right: 60px;
  top: 14px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}
.flow-step {
  position: relative;
  flex: 1;
  text-align: center;
  padding-top: 48px;
  cursor: default;
}
.flow-step .dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  transition: transform .25s ease;
}
.flow-step:hover .dot { transform: translateX(-50%) scale(1.3); }
.flow-step .label {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
}
.flow-card {
  position: absolute;
  bottom: calc(100% + 20px);
  left: 50%;
  transform: translate(-50%, 8px);
  width: 280px;
  background: var(--white);
  color: var(--black);
  border-radius: 20px;
  padding: 22px 24px;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 5;
}
.flow-card p { font-size: 14px; margin-bottom: 8px; }
.flow-card p:last-child { margin-bottom: 0; }
.flow-step:hover .flow-card,
.flow-step:focus-within .flow-card {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Light flow variant for white sections (product pages) */
.flow--light::before { background: rgba(34, 49, 94, 0.2); }
.flow--light .label { color: var(--black); }
.flow--light .flow-card {
  background: var(--green) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--black);
}

/* Per-product colors: each build card matches its page's flow */
.product-card.product-card--yellow,
.flow--yellow .dot,
.flow--yellow .flow-card {
  background: var(--yellow) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--black);
}
.product-card.product-card--navy,
.flow--navy .dot,
.flow--navy .flow-card {
  background: var(--navy) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
}
.product-card.product-card--navy, .flow--navy .flow-card { color: var(--white); }
.product-card.product-card--navy .when { color: var(--gray-light); }
.product-card.product-card--navy .btn-primary { background: var(--white); color: var(--navy); }
.product-card.product-card--lavender,
.flow--lavender .dot,
.flow--lavender .flow-card {
  background: var(--lavender) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--black);
}

/* Values cards read black on their light backgrounds */
.values-grid .card { color: var(--black); }

/* Tag pills for the "for example, used in" lists */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tags--center { justify-content: center; margin-bottom: 24px; }
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--black);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
}

/* Spotlight: hover one build, the others step back */
.product-grid:has(.product-card:hover) .product-card:not(:hover) { opacity: .55; }
.product-card { transition: transform .25s ease, opacity .3s ease; }
.product-card:hover { transform: translateY(-8px); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .word { opacity: 1; transform: none; transition: none; }
  .btn:hover, .product-card:hover, .flow-step:hover .dot { transform: none; }
  .flow-step .dot { transition: none; }
  .case-study__img { transition: none; }
}

@media (max-width: 768px) {
  .section--navy,
  .section--green,
  .section--yellow,
  .section--lavender {
    clip-path: polygon(0 0, 100% 16px, 100% 100%, 0 calc(100% - 16px));
    margin-top: -16px;
    padding-top: 72px;
    padding-bottom: 72px;
  }
  section.section--navy:nth-of-type(even),
  section.section--green:nth-of-type(even),
  section.section--yellow:nth-of-type(even),
  section.section--lavender:nth-of-type(even) {
    clip-path: polygon(0 22px, 100% 0, 100% calc(100% - 12px), 0 100%);
    margin-top: -22px;
  }
  section:is(.section--navy, .section--green, .section--yellow, .section--lavender) + section:is(.section--navy, .section--green, .section--yellow, .section--lavender) {
    margin-top: -40px;
  }
  section:is(.section--navy, .section--green, .section--yellow, .section--lavender) + footer.footer {
    margin-top: -34px;
  }
  .footer { clip-path: polygon(0 16px, 100% 0, 100% 100%, 0 100%); margin-top: -16px; }
  .flow { flex-direction: column; gap: 32px; margin-top: 48px; }
  .flow::before { display: none; }
  .flow-step { padding-top: 0; padding-left: 44px; text-align: left; }
  .flow-step .dot { left: 0; top: 2px; transform: none; }
  .flow-card {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    width: 100%;
    margin-top: 12px;
  }
}

/* ---------- Header / Nav ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.header__logo img {
  height: 48px;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__nav a {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--navy);
  transition: color 0.2s ease;
}
.header__nav a:hover {
  color: var(--navy-dark);
}

.header__nav .dropdown {
  position: relative;
}

.header__nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 16px;
  overflow: hidden;
  min-width: 200px;
  padding: 8px 0;
  z-index: 101;
}

.header__nav .dropdown:hover .dropdown-menu {
  display: block;
}

.header__nav .dropdown-menu a {
  display: block;
  padding: 8px 20px;
  font-size: 15px;
}
.header__nav .dropdown-menu a:hover {
  background: var(--gray-light);
}

.header__cta .btn {
  font-size: 14px;
  padding: 12px 28px;
}

/* Mobile nav */
.header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.header__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: 0.3s;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 200;
  padding: 80px 24px 40px;
  flex-direction: column;
  gap: 24px;
}
.mobile-nav.active { display: flex; }
.mobile-nav a {
  font-size: 20px;
  color: var(--navy);
  font-family: var(--font-body);
}
.mobile-nav .close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: 120px 24px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero p {
  font-size: 18px;
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero .btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Two-Column Layout ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.two-col--reverse { direction: rtl; }
.two-col--reverse > * { direction: ltr; }

.two-col__text h2,
.two-col__text h3 {
  margin-bottom: 16px;
}
.two-col__text p {
  margin-bottom: 16px;
}

/* ---------- Three-Column Cards ---------- */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card {
  padding: 40px 32px;
  text-align: left;
  border-radius: 20px;
}

.card h3, .card h4, .card h5 {
  margin-bottom: 12px;
}

.card p {
  margin-bottom: 16px;
}

/* ---------- Testimonial ---------- */
.testimonial {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: center;
}

.testimonial__img {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
}

.testimonial__quote {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 16px;
}

.testimonial__author {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
}

/* ---------- Case Study Cards ---------- */
.case-study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 48px;
}

.case-study__img {
  width: 100%;
  border: none;
  border-radius: 20px;
}

.case-study__content h6 {
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.case-study__company {
  font-size: 20px;
  font-weight: 600;
  font-family: var(--font-heading);
  margin-bottom: 16px;
}

.case-study__content ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
}
.case-study__content ul li {
  padding: 4px 0;
}

/* ---------- Product Cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.product-card {
  padding: 40px 32px;
  border: none;
  border-radius: 20px;
  background: var(--green) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
}

.product-card h4 {
  margin-bottom: 8px;
}

.product-card .when {
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 12px;
  color: var(--near-black);
}

.product-card p {
  margin-bottom: 20px;
}

/* ---------- Pricing Tiers ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pricing-card {
  padding: 40px 32px;
  border: none;
  border-radius: 20px;
  background: var(--green) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  text-align: center;
}

.pricing-card h4 {
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 36px;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: 24px;
}

.pricing-card ul {
  text-align: left;
  margin-bottom: 32px;
}
.pricing-card ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-light);
}
.pricing-card ul li:last-child {
  border-bottom: none;
}

/* ---------- Divider Strip ---------- */
.divider-strip {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Checklist ---------- */
.checklist li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
}
.checklist li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-dark) url('assets/texture-concrete.jpg') center / cover;
  background-blend-mode: overlay;
  color: var(--white);
  padding: 64px 24px 40px;
}

.footer .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.footer h5 {
  margin-bottom: 8px;
  font-size: 24px;
}

.footer p {
  font-size: 14px;
  opacity: 0.8;
}

.footer__tagline {
  margin-bottom: 32px;
}

.footer__support h6 {
  font-size: 16px;
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer__email {
  color: var(--navy-link);
}

.footer__legal {
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.6;
}

.footer__right {
  text-align: right;
}

.footer__logo {
  height: 60px;
  width: auto;
  margin-bottom: 24px;
  margin-left: auto;
}

.footer__links {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer__links a {
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.footer__links a:hover { opacity: 1; }

/* ---------- Note/Callout Box ---------- */
.note {
  background: var(--gray-light);
  padding: 24px 32px;
  font-weight: 500;
  margin: 24px 0;
  border-radius: 20px;
}

.note--dark {
  background: var(--navy-dark);
  color: var(--white);
}

/* ---------- Section Header (centered) ---------- */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 48px;
}

.section-header h2 {
  margin-bottom: 16px;
}

/* ---------- Values Grid ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.value-card h4 {
  margin-bottom: 8px;
  font-size: 24px;
}

/* ---------- Blog Article ---------- */
.article {
  max-width: 780px;
  margin: 0 auto;
}

.article h1 {
  margin-bottom: 16px;
}

.article h2 {
  font-size: 36px;
  margin: 48px 0 16px;
}

.article h3 {
  font-size: 28px;
  margin: 36px 0 12px;
}

.article p {
  margin-bottom: 16px;
}

.article ul, .article ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { padding: 4px 0; }

.article blockquote {
  border-left: 4px solid var(--navy);
  padding: 16px 24px;
  margin: 24px 0;
  font-style: italic;
  background: var(--gray-light);
}

.article .meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 32px;
}

/* ---------- Video Embed ---------- */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 32px 0;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 40px; }
  h3 { font-size: 36px; }
  h4 { font-size: 28px; }
  h5 { font-size: 24px; }

  .two-col,
  .case-study,
  .testimonial { grid-template-columns: 1fr; }

  .three-col,
  .values-grid { grid-template-columns: 1fr; }

  .product-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }

  .footer .container { grid-template-columns: 1fr; }
  .footer__right { text-align: left; }
  .footer__logo { margin-left: 0; }
  .footer__links { justify-content: flex-start; }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 56px 16px;
  }

  h1 { font-size: 40px; }
  h2 { font-size: 36px; }
  h3 { font-size: 32px; }
  h4 { font-size: 24px; }
  h5 { font-size: 24px; }
  h6 { font-size: 20px; }

  .header__nav { display: none; }
  .header__cta { display: none; }
  .header__hamburger { display: flex; }

  .hero { padding: 80px 16px 64px; }
  .hero h1 { font-size: 36px; }

  .btn { padding: 14px 36px; }

  .container { padding: 0 16px; }
}
