/* ===========================
   Nutropic AI — Styles
   =========================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: #e5e5e5;
  background-color: #00162b;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #43b3bf;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #5cc8d4;
}

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

/* --- Typography --- */
h1, h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  line-height: 1.25;
  color: #e5e5e5;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  max-width: 30ch;
  margin-bottom: 1rem;
}

.kicker {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: clamp(0.75rem, 1vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(67, 179, 191, 0.7);
  margin-bottom: 1rem;
}

.deck {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.65;
  color: #a0b0be;
  max-width: 50ch;
  margin-bottom: 2.5rem;
}

.prose p {
  color: #8899aa;
  line-height: 1.75;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: 720px;
  text-align: center;
}

.container--narrow .kicker,
.container--narrow .deck {
  margin-left: auto;
  margin-right: auto;
}

.container--narrow h2 {
  max-width: none;
}

.section {
  padding: 6rem 0;
  background-color: #00162b;
}

.section--alt {
  background-color: #0a1f35;
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #43b3bf 30%, #b52868 70%, transparent 100%);
  opacity: 0.3;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: #00162b;
  border-bottom: 1px solid rgba(67, 179, 191, 0.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__logo .logo-svg {
  height: 28px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links a {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 400;
  color: #8899aa;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav__links a:hover {
  color: #e5e5e5;
}

/* Hamburger */
.nav__toggle-input {
  display: none;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1003;
  position: relative;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: #e5e5e5;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Hero --- */
.section--hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
}

.hero__headline {
  margin-bottom: 1.25rem;
}

.section--hero .deck {
  max-width: 44ch;
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.hero__social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero__social a {
  color: #8899aa;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

.hero__social a:hover {
  color: #e5e5e5;
}

/* --- Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn--primary {
  background-color: #b52868;
  color: #e5e5e5;
}

.btn--primary:hover {
  background-color: #c93278;
  color: #ffffff;
  transform: translateY(-1px);
}

/* --- Grids --- */
.grid--3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
}

.card-grid--3x2 {
  grid-template-columns: 1fr;
}

.card-grid--4x2 {
  grid-template-columns: 1fr;
}

.card-grid--methodology {
  grid-template-columns: 1fr;
}

.card {
  background-color: #0d2844;
  border: 1px solid rgba(67, 179, 191, 0.08);
  border-radius: 8px;
  padding: 1.75rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(67, 179, 191, 0.2);
  box-shadow: 0 0 20px rgba(67, 179, 191, 0.04);
}

.card__kicker {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(67, 179, 191, 0.7);
  margin-bottom: 0.625rem;
}

.card__desc {
  color: #8899aa;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- Contact --- */
.section--contact {
  padding-bottom: 4rem;
}

.contact__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.contact__email {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: #e5e5e5;
  transition: color 0.2s ease;
}

.contact__email:hover {
  color: #43b3bf;
}

.contact__social {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.contact__social a {
  color: #8899aa;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.contact__social a:hover {
  color: #e5e5e5;
}

/* --- Footer --- */
.footer {
  background-color: #00162b;
  border-top: 1px solid rgba(67, 179, 191, 0.08);
  padding: 3rem 0;
  text-align: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.footer__links a {
  display: flex;
  align-items: center;
  color: #8899aa;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: #e5e5e5;
}

.footer__links a svg {
  display: block;
}

.footer__email {
  display: inline-block;
  font-size: 0.875rem;
  color: #8899aa;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.footer__email:hover {
  color: #e5e5e5;
}

.footer__copy {
  font-size: 0.8rem;
  color: #556677;
}

/* ===========================
   Responsive — Tablet (640px+)
   =========================== */
@media (min-width: 640px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

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

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

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

/* ===========================
   Responsive — Desktop (960px+)
   =========================== */
@media (min-width: 960px) {
  .section {
    padding: 7rem 0;
  }

  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .card-grid--3x2 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid--4x2 {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid--methodology {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Methodology last row centering on desktop */
@media (min-width: 960px) {
  .card-grid--methodology {
    justify-items: center;
  }

  .card-grid--methodology .card:nth-child(4),
  .card-grid--methodology .card:nth-child(5) {
    /* Center the last two cards under the three above */
  }

  .card-grid--methodology {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
  }

  .card-grid--methodology .card:nth-child(1) {
    grid-column: 1 / 3;
  }

  .card-grid--methodology .card:nth-child(2) {
    grid-column: 3 / 5;
  }

  .card-grid--methodology .card:nth-child(3) {
    grid-column: 5 / 7;
  }

  .card-grid--methodology .card:nth-child(4) {
    grid-column: 2 / 4;
  }

  .card-grid--methodology .card:nth-child(5) {
    grid-column: 4 / 6;
  }
}

/* Wide screens — methodology 5-across */
@media (min-width: 1280px) {
  .card-grid--methodology {
    grid-template-columns: repeat(5, 1fr);
  }

  .card-grid--methodology .card:nth-child(1),
  .card-grid--methodology .card:nth-child(2),
  .card-grid--methodology .card:nth-child(3),
  .card-grid--methodology .card:nth-child(4),
  .card-grid--methodology .card:nth-child(5) {
    grid-column: auto;
  }
}

/* ===========================
   Responsive — Mobile Nav
   =========================== */
@media (max-width: 639px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 260px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 5rem 2rem 2rem;
    background-color: rgba(0, 22, 43, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1002;
  }

  .nav__links a {
    font-size: 1rem;
    padding: 0.75rem 0;
    color: #8899aa;
    width: 100%;
    border-bottom: 1px solid rgba(67, 179, 191, 0.06);
  }

  .nav__toggle-input:checked ~ .nav__links {
    transform: translateX(0);
  }

  /* Animate hamburger to X */
  .nav__toggle-input:checked ~ .nav__toggle span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle-input:checked ~ .nav__toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle-input:checked ~ .nav__toggle span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .section--hero {
    min-height: 90vh;
  }

  h1 {
    font-size: clamp(2rem, 7vw, 2.75rem);
  }

  .section {
    padding: 4rem 0;
  }
}

/* Overlay behind mobile nav */
@media (max-width: 639px) {
  .nav__toggle-input:checked ~ .nav__links::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 260px;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
  }
}

/* ===========================
   Section–specific card backgrounds
   =========================== */

/* Cards on alt backgrounds get the primary bg */
.section--alt .card {
  background-color: rgba(0, 22, 43, 0.5);
}

/* ===========================
   Selection colour
   =========================== */
::selection {
  background-color: rgba(67, 179, 191, 0.2);
  color: #e5e5e5;
}
