/* =============================================
   StrayBlocks Landing Page Styles
   Design tokens extracted from Figma node 46:439
   ============================================= */

/* --- Variables --- */
:root {
  --color-primary:        #96b48e;
  --color-primary-light:  rgba(168, 197, 160, 0.2);
  --color-primary-mid:    #a8c5a0;
  --color-text:           #1f1f1f;
  --color-text-secondary: #808080;
  --color-text-nav:       #4a5565;
  --color-brand-dark:     #151e0b;
  --color-bg:             #ffffff;
  --color-bg-alt:         rgba(245, 245, 240, 0.3);
  --color-border:         #f3f4f6;
  --content-width:        1128px;
  --section-padding-y:    100px;
  --font:                 'Inter', sans-serif;
  --nav-height:           73px;
}

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

html {
  scroll-behavior: smooth;
  /* Reserve scrollbar gutter so centering is stable on Windows (visible scrollbars) */
  scrollbar-gutter: stable;
  /* Prevent horizontal scroll on all viewport sizes */
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Full width so centering uses the real viewport width */
  width: 100%;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Body line-height: UX Pro Max — 1.5–1.75 for readability */
p { line-height: 1.65; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* --- Container — single source of truth for horizontal centering --- */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* =============================================
   Navigation
   ============================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(7.5px);
  -webkit-backdrop-filter: blur(7.5px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: flex-end;
  padding-bottom: 1px;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 16px 0;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
  cursor: pointer;
  /* Touch target: min 44px */
  min-height: 44px;
}

.nav__logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}

.nav__logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand-dark);
  letter-spacing: -0.3125px;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}

.nav__links a {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Touch target: min 44×44px */
  padding: 10px 12px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-nav);
  letter-spacing: -0.3125px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
  border-radius: 6px;
  outline-offset: 2px;
}

/* Visible focus ring for keyboard navigation */
.nav__links a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.nav__links a:hover,
.nav__link--active {
  color: var(--color-primary) !important;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-nav);
  border-radius: 2px;
  transition: all 0.2s;
}

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
  border: none;
  /* Touch target: min 44px tall */
  min-height: 44px;
  outline-offset: 2px;
}

.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }

/* Focus ring for keyboard users */
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--color-primary);
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.06px;
  line-height: 24px;
  padding: 16px 21px;
  border-radius: 8px;
  width: 220px;
  white-space: nowrap;
}

.btn--secondary {
  background: none;
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.06px;
  line-height: 24px;
  padding: 8px;
  align-self: flex-start;
  white-space: nowrap;
}

/* =============================================
   Sections – shared layout
   ============================================= */
.section {
  /* Full viewport width — horizontal centering by .container inside */
  width: 100%;
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__heading {
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.144px;
  color: var(--color-text);
  white-space: nowrap;
}

/* =============================================
   Hero – Our Mission
   ============================================= */
.section--hero {
  position: relative;
  overflow: hidden;
  min-height: 470px;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 64px;
  max-width: 576px;
  position: relative;
  z-index: 1;
}

.hero__heading {
  font-size: 64px;
  font-weight: 600;
  line-height: 1.24;
  color: var(--color-text);
}

.hero__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.06px;
  color: var(--color-text);
}

.hero__body strong {
  font-weight: 700;
  letter-spacing: -0.048px;
}

/* Hero illustration – absolute positioned to the right of the container */
.hero__illustration {
  position: absolute;
  width: 410px;
  height: 290px;
  /* 167px from Figma section top − 100px section padding = 67px from container top */
  top: 67px;
  right: 0;
  overflow: hidden;
  pointer-events: none;
}

/* img inside illustration — already sized via width/height attrs */

/* =============================================
   Values / Features
   ============================================= */
.values__grid {
  display: flex;
  gap: 44px;
  align-items: flex-start;
}

.value-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  min-width: 0;
  padding: 4px;
  border-radius: 12px;
  transition: background-color 0.2s ease;
}

.value-card:hover {
  background-color: rgba(168, 197, 160, 0.08);
}

.value-card__icon-wrap {
  width: 48px;
  height: 48px;
  background: var(--color-primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.value-card__icon-wrap img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.value-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.value-card__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  letter-spacing: -0.06px;
  color: var(--color-text);
}

.value-card__desc {
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.064px;
  color: var(--color-text-secondary);
}

/* =============================================
   Product
   ============================================= */
.section--product {
  position: relative;
  overflow: hidden;
  min-height: 516px;
}

.product__content {
  display: flex;
  flex-direction: column;
  gap: 64px;
  max-width: 576px;
  position: relative;
  z-index: 1;
}

.product__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.06px;
  color: var(--color-text);
}

/* Product illustration – absolute positioned to the right of the container */
.product__illustration {
  position: absolute;
  width: 399px;
  height: 260px;
  /* 29.14% × 716px section height − 100px padding = ~109px from container top */
  top: 109px;
  right: 0;
  overflow: hidden;
  pointer-events: none;
}

/* img inside illustration — already sized via width/height attrs */

/* =============================================
   Team
   ============================================= */
.team__grid {
  display: flex;
  gap: 96px;
  align-items: flex-start;
  margin-top: 64px;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

.team-card__header {
  display: flex;
  align-items: center;
  gap: 24px;
}

.team-card__photo {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  overflow: hidden;
}

.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.team-card__name {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.06px;
  color: var(--color-text);
  white-space: nowrap;
}

.team-card__role {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.06px;
  color: var(--color-primary-mid);
}

.team-card__bio {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.064px;
  color: var(--color-text);
}

/* =============================================
   Blog
   ============================================= */
.blog__list {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 64px;
}

.blog-post {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  padding-bottom: 24px;
  padding-top: 4px;
  border-bottom: 1px solid var(--color-border);
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.blog-post:hover {
  opacity: 0.85;
}

.blog-post__thumb {
  width: 192px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  align-self: stretch;
  max-height: 211px;
}

.blog-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-post__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.blog-post__date {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.048px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.blog-post__text {
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
  letter-spacing: -0.06px;
  color: var(--color-text);
}

.blog-post__text strong {
  display: block;
  margin-bottom: 0;
}

/* =============================================
   Footer
   ============================================= */
.footer {
  border-top: 1px solid var(--color-border);
  /* Horizontal centering handled by .container inside */
  padding-top: 80px;
  padding-bottom: 20px;
}

.footer__top {
  display: flex;
  gap: 120px;
  align-items: flex-start;
  margin-bottom: 48px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 264px;
  flex-shrink: 0;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
}

.footer__logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer__logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-brand-dark);
  letter-spacing: -0.3125px;
  white-space: nowrap;
}

.footer__tagline {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: var(--color-text-nav);
  white-space: nowrap;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.footer__col-heading {
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.3125px;
  color: var(--color-brand-dark);
  white-space: nowrap;
}

.footer__col-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.footer__col-list li,
.footer__col-list a {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: var(--color-text-nav);
  white-space: nowrap;
  transition: color 0.2s ease;
  cursor: pointer;
}

.footer__col-list a:hover {
  color: var(--color-primary);
}

.footer__col-list a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer__bottom {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.1504px;
  color: var(--color-text-nav);
}

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

/* Tablets / small desktops: hide illustrations, adjust layout */
@media (max-width: 1100px) {
  .hero__illustration,
  .product__illustration {
    display: none;
  }

  .hero__content,
  .product__content {
    max-width: 100%;
  }

  .values__grid {
    gap: 32px;
  }

  .team__grid {
    gap: 48px;
  }

  .footer__top {
    gap: 48px;
    flex-wrap: wrap;
  }

  .footer__brand {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding-y: 60px;
  }

  .hero__heading {
    font-size: 40px;
    line-height: 1.2;
  }

  .section__heading {
    font-size: 32px;
  }

  .hero__body,
  .product__body {
    font-size: 17px;
  }

  .values__grid {
    flex-direction: column;
    gap: 40px;
  }

  .team__grid {
    flex-direction: column;
    gap: 40px;
  }

  .blog-post {
    flex-direction: column;
    gap: 24px;
  }

  .blog-post__thumb {
    width: 100%;
    max-height: 180px;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 24px 20px;
    gap: 4px;
  }

  .nav__links.nav__links--open {
    display: flex;
  }

  .nav__hamburger {
    display: flex;
  }

  .footer__top {
    flex-direction: column;
    gap: 32px;
  }

  .footer__brand { width: auto; }
}

@media (max-width: 480px) {
  .hero__heading { font-size: 32px; }
  .section__heading { font-size: 28px; }
  .btn--primary { font-size: 17px; width: auto; padding: 14px 20px; }
  .btn--secondary { font-size: 17px; }
  .blog-post__text { font-size: 17px; }
}
