/*
  SHEMA styles.css — working draft (canvas)
  Goal: DRY + safe tweaks without visual changes.

  Change Log (2025-08-08)
  - Added container side padding for small screens (and generally).
  - Introduced spacing/radius tokens (non-breaking, optional use).
  - Normalized heading sizes with clamp() (keeps current look, smoother ramps).
  - Fixed h3 desktop mismatch (18px).
  - Consolidated button hover rules; added :focus-visible outline.
  - Added prefers-reduced-motion for product-screens.
  - Added .text-wraper alias to avoid breakage from typo.
  - Kept all class names as-is; no DOM changes required.
*/

:root {
  /* colors */
  --color-link: #0080ff; /* hsba(210, 100%, 100%, 1) */
  --color-black: #141414; /* hsba(0, 0%, 8%, 1) */
  --color-white: #f5f5f5; /* hsba(0, 0%, 96%, 1) */
  --color-bg-secondary: #eaeaea; /* hsba(0, 0%, 92%, 1) */
  --color-logo: #dc9949; /* hsba(33, 67%, 86%, 1) */
  --color-text-faded: #f5f5f544; /*hsba(0, 0%, 96%, 0.5)*/

  /* spacing + radius (optional; start using gradually) */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius-4: 0.25rem;
  --radius-8: 0.5rem;
  --radius-16: 1rem;

  /* layout */
  --container: 70rem;
}

/* Scales between 14px and 16px based on viewport width */
html {
  font-size: clamp(14px, 1.2vw + 12px, 16px);
  overflow-x: hidden;
}

/* iOS dynamic-viewport & safe-area / footer gap fix */
html,
body {
  height: 100%;
}
body {
  min-height: 100dvh;
  min-height: 100vh; /* fallback */
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-overflow-scrolling: touch;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "IBM Plex Sans", Inter, sans-serif, Arial;
  color: var(--color-black);
  background: var(--color-white);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* generic container with safe gutters */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Typography */
h1,
h2,
h3,
p {
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.8rem);
  line-height: 1.25;
  font-weight: 700;
  max-width: 45rem;
}

.h1-subtitle {
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.5rem);
  line-height: 1.5;
  font-weight: 400; /* matches original mobile; smooth ramp to 500 feel */
  max-width: 45rem;
}

h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
  line-height: 1.35;
  font-weight: 600;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 1rem;
}

.h2-subtitle {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  line-height: 1.5;
  font-weight: 500;
  text-align: center;
  max-width: 45rem;
  margin: 0 auto 2rem;
}

.article-title {
  font-size: clamp(1.5rem, 1rem + 0.5vw, 1.25rem);
  line-height: 1.5;
  font-weight: 600;
  text-align: center;
  max-width: 45rem;
}

h3 {
  font-size: 1.125rem; /* 18px */
  line-height: 1.4;
  font-weight: 600;
  max-width: 45rem;
  margin: 0 auto 2rem;
}

.h3-card-subtitle {
  font-size: 1rem; /* 16px */
  line-height: 1.6;
  font-weight: 400;
}

p {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
}

.p-large {
  max-width: 45rem;
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
}

p.small {
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 400;
}

p.xsmall {
  font-size: 0.75rem;
  line-height: 1.5;
  font-weight: 400;
}

/* Buttons */
.button {
  all: unset; /* Remove all default browser styles */
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 2.75rem;
  padding: 0.5rem 2rem;
  border-radius: var(--radius-8);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    outline-color 0.2s ease;
}

/* Primary (filled) buttons */
.button.primary-bk {
  background-color: var(--color-black);
  color: var(--color-white);
  width: 10rem;
}
.button.primary-wh {
  background-color: var(--color-white);
  color: var(--color-black);
  width: 10rem;
}

/* Outline buttons */
.button.outline-bk {
  border: 1px solid var(--color-black);
  color: var(--color-black);
  width: 10rem;
}
.button.outline-wh {
  border: 1px solid var(--color-white);
  color: var(--color-white);
  width: 10rem;
}

/* Shared hovers */
.button.primary-bk:hover,
.button.primary-wh:hover {
  background-color: var(--color-logo);
  color: var(--color-white);
  text-decoration: none;
}

.button.outline-bk:hover {
  outline: 1.5px solid var(--color-black);
  outline-offset: -2px;
  text-decoration: none;
}
.button.outline-wh:hover {
  outline: 1.5px solid var(--color-white);
  outline-offset: -2px;
  text-decoration: none;
}

/* Keyboard focus */
.button:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 2px;
  border-radius: calc(var(--radius-8) + 2px);
}

/* Links */
a {
  color: var(--color-link);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
}

/* Sections */
/*-------------------  Hero Section ----------------*/
.hero {
  display: flex;
  padding: 4rem 0 7rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  gap: 3rem;
}

.hero .container {
  display: flex;
  max-width: 60rem;
  padding: 2rem; /* inner padding specific to hero */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  text-align: center;
}

.buttons-wrapper {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/*-------------------  Product Screens ----------------*/
.product {
  overflow: hidden;
}

.product-screens {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  width: 200%; /* Adjust based on image count */
  animation: scroll 30s linear infinite;
  gap: 0.2rem;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.product-screens img {
  flex: 0 0 auto;
  width: auto;
  height: 30rem;
  object-fit: cover;
}

@media (max-width: 450px) {
  .product-screens img {
    height: 16rem;
    max-width: 100%;
  }
}

@media (max-width: 690px) {
  .product-screens {
    width: 700%; /* Adjust based on image count */
  }
  .product-screens img {
    height: 16rem;
  }
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-screens {
    animation: none;
    transform: none;
  }
}

/* WebKit-prefixed animation for older iOS Safari */
.product-screens {
  -webkit-animation: scroll 30s linear infinite;
  animation: scroll 30s linear infinite;
  will-change: transform;
}
@-webkit-keyframes scroll {
  0% {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
  100% {
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
  }
}

/*------------------- Core Features ----------------*/
.core-features {
  margin: 0;
  height: auto;
  padding: 7rem 0 8rem;
  align-items: center;
  background-color: var(--color-bg-secondary);
}

.core-features .container {
  display: flex;
  height: auto;
  gap: 3rem;
  padding: 1.5rem;
  text-align: center;
  flex-direction: column;
  flex-wrap: wrap;
}

.core-features .cards-wrapper {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: auto;
  width: 100%;
  flex-wrap: wrap;
}

/* Feature card base (shared) */
.feature-card-1,
.feature-card-2,
.feature-card-3,
.feature-card-4,
.feature-card-5,
.feature-card-6,
.feature-card-7,
.feature-card-8 {
  display: flex;
  min-width: 20rem;
  min-height: 35rem;
  padding: 2rem 1.5rem;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 1.5rem;
  flex: 1 0 0;
  color: var(--color-white);
  text-align: center;
  border-radius: var(--radius-16);
  background: linear-gradient(0deg, #000 -6.6%, rgba(0, 0, 0, 0.3) 100%),
    lightgray 50% / cover no-repeat;
  background-blend-mode: multiply, normal;
}

/* Individual background images (unchanged assets) */
.feature-card-1 {
  background-image: linear-gradient(0deg, #000 -6.6%, rgba(0, 0, 0, 0) 100%),
    url(/images/pages/home/feature-card-1.png);
}
.feature-card-2 {
  background-image: linear-gradient(0deg, #000 -6.6%, rgba(0, 0, 0, 0) 100%),
    url(/images/pages/home/feature-card-2.png);
}
.feature-card-3 {
  background-image: linear-gradient(0deg, #000 -6.6%, rgba(0, 0, 0, 0) 100%),
    url(/images/pages/home/feature-card-3.png);
}
.feature-card-4 {
  background-image: linear-gradient(0deg, #000 -6.6%, rgba(0, 0, 0, 0) 100%),
    url(/images/pages/home/feature-card-4.png);
}
.feature-card-5 {
  background-image: linear-gradient(0deg, #000 -6.6%, rgba(0, 0, 0, 0.3) 100%),
    url(/images/pages/home/feature-card-5.png);
}
.feature-card-6 {
  background-image: linear-gradient(0deg, #000 -6.6%, rgba(0, 0, 0, 0.3) 100%),
    url(/images/pages/home/feature-card-6.png);
}
.feature-card-7 {
  background-image: linear-gradient(0deg, #000 -6.6%, rgba(0, 0, 0, 0.3) 100%),
    url(/images/pages/home/feature-card-7.png);
}
.feature-card-8 {
  background-image: linear-gradient(0deg, #000 -6.6%, rgba(0, 0, 0, 0.3) 100%),
    url(/images/pages/home/feature-card-9.png);
}

.feature-card-1 p,
.feature-card-2 p,
.feature-card-3 p,
.feature-card-4 p,
.feature-card-5 p,
.feature-card-6 p,
.feature-card-7 p,
.feature-card-8 p {
  max-width: 25rem;
}

/*-------------------  Journey ----------------*/
.journey {
  display: flex;
  flex-direction: column;
  max-width: 70rem;
  margin: 0 auto;
  padding: 7rem 0 5rem;
  text-align: center;
}

.journey .container {
  width: 100%;
  max-width: 70rem;
  position: relative;
  text-align: center;
  overflow-x: visible;
}

.journey .cards-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: stretch;
  justify-content: center; /* centers smaller cards nicely */
}

/* Make journey cards shorter */
.journey .cards-wrapper > * {
  min-height: 14rem; /* adjust as needed for your content */
  padding: 2rem 1rem;
}

.journey .cards-wrapper p {
  max-width: 18rem; /* smaller than 25rem for tighter cards */
}

.journey-icons img {
  height: 8rem; /* reduced from 10rem */
}

/*-------------------  Main Card ----------------*/
.support {
  padding: 0 1rem 7rem;
}

.feature-card-main {
  display: flex;
  min-width: 20rem;
  max-width: 70rem;
  margin: 0 auto;
  flex-shrink: inherit;
  padding: 4rem 3rem 5rem;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  border-radius: 1rem;
  color: var(--color-white);
  background: var(--color-black);
}

.feature-card-main .button.primary-wh {
  width: 10rem;
}

/*------------------- Partners ----------------*/
.partners {
  display: flex;
  padding: 4rem 1rem;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  align-self: stretch;
  background-color: var(--color-bg-secondary);
}

.partners .container {
  max-width: 70rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

img[alt="logo-placeholder"] {
  display: none;
}

/*-------------------  FAQ ----------------*/
.faq {
  padding: 3rem 0 7rem;
}

.faq .container {
  max-width: 45rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.faq h2 {
  margin: 3rem;
}

.faq h3,
.faq .h3 {
  margin: 0rem;
  padding: 0;
}

.faq > .h3-card-subtitle {
  margin: 0;
  padding: 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.5rem 1rem;
}

.faq details {
  margin-bottom: 1rem;
  border: 1px solid hsl(0, 0%, 80%);
  border-radius: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: none;
  display: inline-block;
  transition: transform 0.3s;
}

.faq summary:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

.faq details[open] > *:not(summary) {
  padding: 1rem;
}

/* stop using flex so text can wrap naturally */
.blog-link {
  display: inline; /* was: flex */
  color: var(--color-link);
  font-weight: 500;
  text-underline-offset: 2px;
  cursor: pointer;
}

.blog-link:hover {
  text-decoration: underline;
}

/*-------------------  cta ----------------*/
.cta {
  padding: 7rem 0;
  background-color: var(--color-bg-secondary);
}

.cta .container {
  display: flex;
  flex-direction: column;
  max-width: 45rem;
  margin: 0 auto;
  gap: 2rem;
}

.waitlist-form {
  display: flex;
  padding: 4rem;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  border-radius: 1rem;
  border: 3px solid hsl(0, 0%, 80%);
  background: var(--color-white);
  flex-wrap: wrap;
  max-width: 45rem;
  min-height: 20rem;
}

/* typo-safe alias: support both spellings */
.cta .text-wrapper > p,
.text-wrapper ul {
  max-width: 35rem;
  font-size: 1.125rem; /* 18px */
  line-height: 1.5;
  font-weight: 600;
  padding-left: 0;
}

.form-wrap > p {
  font-size: 1.125rem;
  line-height: 1.5;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
}

form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

form label {
  display: flex;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  padding-left: 0.25rem;
}

input {
  margin: 0 0 2rem;
  border: 1px solid hsl(0, 0%, 80%);
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-size: 1.1rem;
  color: var(--color-black);
  background-color: var(--color-white);
  width: 100%;
}

select {
  margin: 0 0 2rem;
  border: 1px solid hsl(0, 0%, 80%);
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-size: 1.1rem;
  color: var(--color-black);
  background-color: var(--color-white);
  width: 100%;
}

input::placeholder {
  color: hsl(0, 0%, 60%);
  font-size: 1rem;
  font-weight: 300;
}

select {
  color: hsl(0, 0%, 60%); /* gray for placeholder */
  font-size: 1rem;
  font-weight: 300;
  padding: 0.8rem 2.5rem 0.8rem 1rem; /* right padding for arrow space */
  border: 1px solid hsl(0, 0%, 80%);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: url("data:image/svg+xml;utf8,<svg fill='gray' height='16' viewBox='0 0 20 20' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M5.516 7.548a.75.75 0 0 1 1.06 0L10 10.972l3.424-3.424a.75.75 0 1 1 1.06 1.06l-3.954 3.954a.75.75 0 0 1-1.06 0L5.516 8.608a.75.75 0 0 1 0-1.06z'/></svg>")
    no-repeat right 1rem center/1rem 1rem;
}

select:focus,
select:active,
select option:not([value=""]) {
  color: var(--color-black); /* black for selected */
}

/* For options (some browsers support this) */
select option {
  color: var(--color-black);
}
select option[value=""] {
  color: hsl(0, 0%, 60%);
}

textarea {
  margin: 0 0 2rem;
  border: 1px solid hsl(0, 0%, 80%);
  border-radius: 4px;
  padding: 0.6rem 1rem;
  font-size: 1.1rem;
  color: var(--color-black);
  background-color: var(--color-white);
  width: 100%;
  font-family: "IBM Plex Sans", Inter, sans-serif, Arial;
}

.form-wrap {
  width: fill;
}

.form-wrap .buttons-wrapper {
  margin-top: 3rem;
}

/* Misc */
img {
  max-width: 100%;
  height: auto;
}

/* Mobile refinements */
@media (max-width: 690px) {
  .hero {
    padding: 4rem 0;
  }

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

  .product-screens {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 700%;
  }

  .product-screens img {
    flex: 0 0 auto;
    height: 16rem;
    max-width: 100%;
  }

  .button.outline-bk {
    width: 10rem;
  }

  .journey {
    display: flex;
    max-width: 70rem;
    margin: 0 auto;
    padding: 4rem 0 3rem;
    text-align: center;
    flex-direction: column;
  }

  .feature-card-main {
    padding: 4rem 1.5rem 5rem;
    text-align: center;
  }

  .partners .container {
    max-width: 70rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .faq {
    padding: 1rem 0 4rem;
  }

  .cta {
    padding: 3rem 0 4rem;
  }

  .hero .container {
    padding: 0 1rem; /* inner padding specific to hero */
  }

  .waitlist-form {
    padding: 3rem 1.5rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    border-radius: 1rem;
    border: 3px solid hsl(0, 0%, 80%);
    background: var(--color-white);
    flex-wrap: wrap;
    max-width: 90%;
    min-height: 20rem;
  }

  .waitlist-form ul {
    margin-left: 1rem;
  }
}

/* Make .h3 utility text look like an h3 (used inside <summary>) */
.h3 {
  font-size: 1.125rem;
  line-height: 1.4;
  font-weight: 600;
}

/* Respect [hidden] on the mobile menu */
[hidden] {
  display: none !important;
}

/* Guard the carousel from horizontal scroll (if not already present) */
.product {
  overflow: hidden;
}

/* Remove all outlines by default */
:focus {
  outline: none;
}

/* Show focus outlines only for keyboard users */
.keyboard-nav a:focus,
.keyboard-nav button:focus {
  outline: 2px solid var(--color-logo);
  outline-offset: 3px;
  border-radius: 8px;
}

/* Coming soon styling for placeholder content */
.coming-soon {
  color: var(--color-text-muted, #6b7280);
  font-style: italic;
  cursor: default;
  text-decoration: none;
  margin-top: auto;
}
.coming-soon:hover,
.coming-soon:focus {
  text-decoration: none;
}

/* Accessibility utilities */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  padding: 0.5rem 0.75rem;
  background: #000;
  color: #fff;
  z-index: 1000;
  border-radius: 0.5rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
