/* ================================================================
   SHARED PAGE STYLES
   Used by: platform.html, capabilities.html, industries.html
================================================================ */

/* ---- Page Hero ---- */
.page-hero {
  padding: calc(var(--space-xl) + 4.5rem) var(--space-md) var(--space-lg);
  position: relative;
  overflow: hidden;
}

/* Default subtle backdrop — kept as fallback for pages without a modifier */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: image-set(
    url('/static/images/image-03.avif') type('image/avif'),
    url('/static/images/image-03.webp') type('image/webp'),
    url('/static/images/image-03.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center 35%;
  opacity: 0.05;
  mix-blend-mode: luminosity;
  pointer-events: none;
}

/* Per-page photo modifier — stronger presence, themed image */
.page-hero--photo {
  isolation: isolate;
}

.page-hero--photo::before {
  opacity: 0.32;
  mix-blend-mode: normal;
  filter: saturate(0.75) brightness(0.65) contrast(1.05);
}

.page-hero--photo .page-hero__photo-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(var(--bg-base-rgb), 0.55) 0%, rgba(var(--bg-base-rgb), 0.7) 60%, var(--bg-base) 100%),
    radial-gradient(ellipse 55% 70% at 30% 50%, rgba(var(--bg-base-rgb), 0.55), transparent 70%);
}

.page-hero--photo-01::before {
  background-image: image-set(
    url('/static/images/image-01.avif') type('image/avif'),
    url('/static/images/image-01.webp') type('image/webp'),
    url('/static/images/image-01.jpg') type('image/jpeg')
  );
  background-position: center 30%;
}

.page-hero--photo-02::before {
  background-image: image-set(
    url('/static/images/image-02.avif') type('image/avif'),
    url('/static/images/image-02.webp') type('image/webp'),
    url('/static/images/image-02.jpg') type('image/jpeg')
  );
  background-position: center 40%;
}

.page-hero--photo-03::before {
  background-image: image-set(
    url('/static/images/image-03.avif') type('image/avif'),
    url('/static/images/image-03.webp') type('image/webp'),
    url('/static/images/image-03.jpg') type('image/jpeg')
  );
  background-position: center 35%;
}

.page-hero--photo-04::before {
  background-image: image-set(
    url('/static/images/image-04.avif') type('image/avif'),
    url('/static/images/image-04.webp') type('image/webp'),
    url('/static/images/image-04.jpg') type('image/jpeg')
  );
  background-position: center 60%;
}

.page-hero--photo-05::before {
  background-image: image-set(
    url('/static/images/image-05.avif') type('image/avif'),
    url('/static/images/image-05.webp') type('image/webp'),
    url('/static/images/image-05.jpg') type('image/jpeg')
  );
  background-position: center 55%;
}

.page-hero--photo-06::before {
  background-image: image-set(
    url('/static/images/image-06.avif') type('image/avif'),
    url('/static/images/image-06.webp') type('image/webp'),
    url('/static/images/image-06.jpg') type('image/jpeg')
  );
  background-position: center;
}

.page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bg-border), transparent);
}

.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--teal-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.page-hero__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.page-hero__breadcrumb a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.page-hero__breadcrumb a:hover {
  color: var(--green-soft);
}

.page-hero__breadcrumb-sep {
  color: var(--bg-border);
}

.page-hero__heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.page-hero__heading em {
  font-style: normal;
  background: linear-gradient(120deg, var(--green-soft) 0%, var(--teal-soft) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero__sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  font-weight: 300;
  max-width: 58ch;
}

/* ---- Page section base ---- */
.page-section {
  padding: var(--space-xl) var(--space-md);
}

.page-section--alt {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
}

.page-section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.page-section__inner--narrow {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.page-section__header {
  max-width: 680px;
  margin-bottom: 3rem;
}

.page-section__eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--green-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.page-section__heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
}

.page-section__sub {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.75;
  font-weight: 300;
  max-width: 54ch;
}

/* ---- Card grid ---- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background-color: var(--bg-border);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 540px) {
  .cards-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 860px) {
  .cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 540px) {
  .cards-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .cards-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background-color: var(--bg-surface);
  padding: 2rem;
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.card:hover {
  background-color: var(--bg-elevated);
}

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}

/* ================================================================
   CAPABILITY ROWS — stacked full-width rows with large alternating visuals
================================================================ */
.capability-rows {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.capability-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 860px) {
  .capability-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 4rem;
  }

  .capability-row--reverse .capability-row__text {
    order: 2;
  }
  .capability-row--reverse .capability-row__visual {
    order: 1;
  }
}

.capability-row__text {
  display: flex;
  flex-direction: column;
}

.capability-row__tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--green-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
  opacity: 0.85;
}

.capability-row__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.9rem;
  line-height: 1.15;
}

.capability-row__desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 1.25rem;
}

.capability-row__bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.capability-row__bullets li {
  font-size: 0.92rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.55;
}

.capability-row__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--green-primary);
  opacity: 0.7;
}

.capability-row__visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2.25rem);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 20px 50px rgba(0, 0, 0, 0.25);
}

.capability-row__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 20%, rgba(77, 170, 98, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(42, 157, 143, 0.06), transparent 70%);
  pointer-events: none;
}

.capability-row__visual svg {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.capability-row:hover .capability-row__visual svg {
  filter: drop-shadow(0 0 16px rgba(77, 170, 98, 0.18));
  transition: filter 0.5s ease;
}

@media (max-width: 859px) {
  .capability-row__visual {
    max-width: 480px;
    margin: 0 auto;
  }
}

.card__tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--green-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  opacity: 0.7;
}

.card__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-weight: 300;
  flex: 1;
}

.card__bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.75rem;
}

.card__bullets li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.card__bullets li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--green-primary);
}

/* ---- Questions block ---- */
.questions-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .questions-block {
    grid-template-columns: repeat(2, 1fr);
  }
}

.question-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.question-item:hover {
  border-color: var(--green-muted);
  background-color: var(--bg-elevated);
}

.question-item__q {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--green-primary);
  flex-shrink: 0;
  padding-top: 0.15rem;
  opacity: 0.7;
}

.question-item__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  font-weight: 400;
}

/* ---- Principles list ---- */
.principles-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background-color: var(--bg-border);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .principles-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.principle-item {
  background-color: var(--bg-surface);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.principle-item__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--green-muted);
  padding-top: 0.1rem;
  flex-shrink: 0;
}

.principle-item__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 400;
}

/* ---- Segment cards (Industries page) ---- */
.segment-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.segment-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  transition: border-color 0.2s ease;
}

.segment-card:hover {
  border-color: var(--green-muted);
}

@media (min-width: 700px) {
  .segment-card {
    grid-template-columns: 260px 1fr;
  }
}

.segment-card__left {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.segment-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.4rem;
}

.segment-card__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.segment-card__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-weight: 300;
}

.segment-card__right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
}

.segment-card__why-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-primary);
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

.segment-card__why-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.segment-card__why-list li {
  font-size: 0.86rem;
  color: var(--text-secondary);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.5;
  font-weight: 300;
}

.segment-card__why-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--green-muted);
  font-size: 0.75rem;
}

.segment-card__badge {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-primary);
  background: var(--green-glow);
  border: 1px solid var(--green-muted);
  padding: 2px 8px;
  border-radius: 99px;
  margin-left: 0.5rem;
  vertical-align: middle;
  line-height: 1.4;
}

.segment-card__cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--green-primary);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.segment-card__cta:hover {
  opacity: 0.75;
}

/* ---- Page CTA ---- */
.page-cta {
  padding: var(--space-xl) var(--space-md);
  text-align: center;
}

.page-cta__inner {
  max-width: 560px;
  margin: 0 auto;
}

.page-cta__heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.page-cta__sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
  line-height: 1.7;
  font-weight: 300;
}

.page-cta__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- SaaS points (Platform page) ---- */
.saas-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background-color: var(--bg-border);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 640px) {
  .saas-points {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .saas-points {
    grid-template-columns: repeat(3, 1fr);
  }
}

.saas-point {
  background-color: var(--bg-surface);
  padding: 1.75rem 2rem;
  transition: background-color 0.2s ease;
}

.saas-point:hover {
  background-color: var(--bg-elevated);
}

.saas-point__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.saas-point__desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-weight: 300;
}

/* ---- Reveal animation (shared with index) ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   BLOG (Field Notes)
================================================================ */
.blog {
  padding: var(--space-xl) var(--space-md);
}

.blog__inner {
  max-width: 880px;
  margin: 0 auto;
}

.blog__empty {
  text-align: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
}

.blog__empty-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.blog__empty-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 300;
  max-width: 52ch;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.blog__empty-note {
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.blog__empty-note a {
  color: var(--green-soft);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.blog__empty-note a:hover {
  border-bottom-color: var(--green-soft);
}

.blog__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .blog__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.blog-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
  border-color: var(--green-primary);
  transform: translateY(-2px);
}

.blog-card__link {
  display: block;
  padding: 1.5rem;
}

.blog-card__date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.blog-card__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.5rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.blog-card__excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-weight: 300;
}

/* ================================================================
   LIGHT THEME OVERRIDES — page-hero photo backdrop tuning
================================================================ */
:root[data-theme="light"] .page-hero--photo::before {
  opacity: 0.22;
  filter: saturate(0.65) brightness(1.05) contrast(0.95);
}

:root[data-theme="light"] .page-hero--photo .page-hero__photo-overlay {
  background:
    linear-gradient(180deg, rgba(var(--bg-base-rgb), 0.4) 0%, rgba(var(--bg-base-rgb), 0.6) 60%, var(--bg-base) 100%),
    radial-gradient(ellipse 55% 70% at 30% 50%, rgba(var(--bg-base-rgb), 0.4), transparent 70%);
}

/* image-02 (Earth at night) is intrinsically dark — pull it further back on light theme */
:root[data-theme="light"] .page-hero--photo-02::before {
  opacity: 0.14;
}

/* image-01 (hands holding soil) — dramatic dark backdrop, dial back on light */
:root[data-theme="light"] .page-hero--photo-01::before {
  opacity: 0.18;
}

