/* ==========================================================================
   pages.css — Page-specific overrides
   ========================================================================== */

/* --- Home page --- */
.page-home .hero {
  padding: var(--space-32) 0 var(--space-32);
}

.page-home .hero__image {
  min-height: 480px;
}

@media (max-width: 768px) {
  .page-home .hero {
    padding: var(--space-20) 0 var(--space-16);
  }

  .page-home .hero__image {
    min-height: 260px;
  }
}

/* --- Story / Contrast Components (homepage "why we're different") --- */

/* Centered approach statement */
.approach-block {
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
  text-align: center;
}

.approach-block p {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-muted);
  margin-bottom: 0;
}

.story-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

/* Side-by-side contrast card: "their way" vs "our way" */
.story-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  max-width: 900px;
  margin-inline: auto;
}

.story-card__contrast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
}

.story-card__contrast p {
  color: var(--color-muted);
  margin-bottom: 0;
}

.story-card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: var(--space-3);
}

.story-card__label--them {
  color: var(--color-muted);
}

.story-card__label--us {
  color: var(--color-primary);
}

/* Highlight the "our approach" side */
.story-card__contrast:last-child {
  border-color: var(--color-accent);
  background: var(--color-surface-raised);
}

.story-card__contrast:last-child p {
  color: var(--color-text);
}

/* Three pillars below the contrast card */
.story-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.story-pillar {
  text-align: center;
  padding: var(--space-6);
}

.story-pillar h4 {
  margin-bottom: var(--space-3);
  font-size: var(--text-lg);
}

.story-pillar p {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin-bottom: 0;
  line-height: var(--leading-normal);
}

@media (max-width: 768px) {
  .story-card {
    grid-template-columns: 1fr;
  }

  .story-pillars {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .story-pillar {
    text-align: left;
  }
}

/* --- About / Our Story page --- */

/* Timeline */
.timeline {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
  padding-left: var(--space-10);
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 18px;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--color-accent) 0%,
    var(--color-primary) 100%
  );
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-10);
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-10) + 12px);
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-bg);
  z-index: 1;
}

.timeline__year {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  padding-top: 2px;
}

.timeline__content h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.timeline__content p {
  font-size: var(--text-base);
  color: var(--color-muted);
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .timeline {
    padding-left: var(--space-8);
  }

  .timeline__item {
    grid-template-columns: 1fr;
  }

  .timeline__item::before {
    left: calc(-1 * var(--space-8) + 12px);
  }
}

/* Affiliate grid */
.affiliate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.affiliate-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}

.affiliate-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
  transform: translateY(-4px);
}

.affiliate-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.affiliate-card__role {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.affiliate-card p:last-child {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: var(--leading-normal);
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .affiliate-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Service detail page --- */
.service-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.service-features li {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--color-text);
}

.service-features li::before {
  content: "✓";
  color: var(--color-primary);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .service-features {
    grid-template-columns: 1fr;
  }
}

/* --- Advisor detail page --- */
.advisor-profile {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-10);
  align-items: start;
}

.advisor-profile__photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-6xl);
  color: var(--color-primary);
  border: 4px solid var(--color-border);
}

.advisor-profile__photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}

.advisor-profile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

@media (max-width: 768px) {
  .advisor-profile {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .advisor-profile__photo {
    width: 160px;
    height: 160px;
  }
}

/* --- Legal pages --- */
.legal-content {
  max-width: var(--container-narrow);
  margin-inline: auto;
}

.legal-content h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.legal-content h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

/* --- Disclosure table --- */
.disclosure-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-6);
}

.disclosure-table th,
.disclosure-table td {
  text-align: left;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

.disclosure-table th {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #6b7280);
}

.disclosure-table td a {
  font-weight: var(--weight-semibold);
}

/* --- Editorial image accent (contained, tasteful) --- */
.editorial {
  display: grid;
  grid-template-columns: 1fr 0.55fr;
  gap: var(--space-10);
  align-items: start;
  max-width: 960px;
  margin-inline: auto;
}

.editorial__text h2 {
  margin-bottom: var(--space-4);
}

.editorial__text p {
  color: var(--color-muted);
  line-height: var(--leading-relaxed);
}

.editorial__figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin-top: var(--space-2);
}

.editorial__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Subtle gold border accent on editorial images */
.editorial__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(232, 201, 122, 0.2);
  pointer-events: none;
}

@media (max-width: 768px) {
  .editorial {
    grid-template-columns: 1fr;
  }

  .editorial__figure {
    max-width: 320px;
    aspect-ratio: 3 / 2;
  }
}

/* --- Inline accent image (small contained image within a section) --- */
.accent-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 720px;
  margin-inline: auto;
  margin-top: var(--space-16);
  margin-bottom: var(--space-16);
  aspect-ratio: 16 / 9;
}

.accent-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.accent-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(232, 201, 122, 0.15);
  pointer-events: none;
}

/* --- Contact card (centered, no background image) --- */
.contact-centered {
  max-width: 480px;
  margin-inline: auto;
}

.contact-centered .contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  box-shadow: var(--shadow-md);
}

.contact-card h3 {
  margin-bottom: var(--space-2);
}

.contact-card__role {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-6);
}

.contact-card__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.contact-card__info a {
  color: var(--color-primary);
  font-weight: var(--weight-medium);
}

/* --- Detail hero with background image --- */
.detail-hero--has-image {
  position: relative;
  overflow: hidden;
  height: 420px;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-12);
}

.detail-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.detail-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.detail-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(1, 31, 23, 0.92) 0%,
    rgba(18, 71, 52, 0.65) 40%,
    rgba(18, 71, 52, 0.35) 100%
  );
}

/* (contact styles moved to .contact-centered above) */

/* --- Contact form --- */
.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-group label {
  display: block;
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.form-group .required {
  color: #c0392b;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(18, 71, 52, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  display: block;
  color: #c0392b;
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

.form-consent {
  margin-bottom: var(--space-6);
}
