/* =====================================================================
   PITANGA WEALTH — BECOME A MUTUAL FUND DISTRIBUTOR / PARTNER
   Page-scoped stylesheet.

   HOW THIS FILE IS BUILT
   - Reuses the existing theme design tokens (--deep-green, --brand-green,
     --soft-sage, --ivory, --muted, --border, --ease, --shadow-*, etc.)
     so the page inherits the brand automatically.
   - Every rule is scoped to a .pw-* class. No global selector, no
     element reset, no utility class is redefined or overridden.
   - No external fonts, no imports, no animation libraries.
   - Breakpoints match the theme: 1120px / 900px / 820px / 600px.
   ===================================================================== */

/* ---------- SCROLL ANCHORS ---------- */
.pw-anchor { scroll-margin-top: 120px; }

/* ---------- 01 · HERO ---------- */
.pw-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 26px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--border);
}
.pw-trust li { display: flex; align-items: center; }
.pw-trust li:not(:last-child)::after {
  content: "";
  width: 4px; height: 4px;
  margin: 0 13px;
  border-radius: 50%;
  background: var(--brand-green);
  opacity: .6;
}
.pw-trust b {
  color: var(--deep-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.pw-trust span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
}

.pw-hero-media {
  position: relative;
  min-height: clamp(330px, 40vw, 468px);
  overflow: hidden;
  border-radius: 30px;
  background: var(--deep-green);
  box-shadow: 0 34px 86px rgba(8, 61, 45, .18);
}
.pw-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.pw-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 38, 28, .76), transparent 54%);
  pointer-events: none;
}
/* Match the existing .hero-art-card entrance on inner pages. */
.inner-page .page-hero .pw-hero-media {
  animation: inner-rise .8s var(--ease) both;
  animation-delay: .12s;
}
.pw-hero-media:hover img { transform: scale(1.03); }
.pw-hero-media-copy {
  position: absolute;
  z-index: 1;
  inset: auto 28px 28px;
  color: #fff;
}
.pw-hero-media-copy span {
  color: #b1e2bf;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.pw-hero-media-copy strong {
  display: block;
  max-width: 17ch;
  margin-top: 10px;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(23px, 2.3vw, 30px);
  font-weight: 400;
  line-height: 1.12;
}

/* ---------- EDITORIAL NUMBERED INDEX (hairline ledger) ---------- */
.pw-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 68px);
  border-top: 1px solid var(--border);
}
.pw-index-item {
  padding: 26px 0 24px;
  border-bottom: 1px solid var(--border);
  transition: transform .3s var(--ease);
}
.pw-index-item .pw-num {
  display: block;
  margin-bottom: 12px;
  color: var(--brand-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}
.pw-index-item h3 {
  margin: 0 0 8px;
  color: var(--deep-green);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.pw-index-item p {
  max-width: 46ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.72;
}
@media (hover: hover) {
  .pw-index-item:hover { transform: translateX(6px); }
}

/* ---------- 08 · PARTNER PHILOSOPHY (statement band) ---------- */
.pw-manifesto {
  position: relative;
  overflow: hidden;
  padding: clamp(62px, 8vw, 106px) 0;
  background: var(--deep-green);
  color: #fff;
}
.pw-manifesto::before,
.pw-manifesto::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.pw-manifesto::before {
  right: -130px; bottom: -200px;
  width: 440px; height: 440px;
  border: 1px solid rgba(168, 226, 189, .16);
  box-shadow: 0 0 0 46px rgba(255, 255, 255, .025), 0 0 0 96px rgba(255, 255, 255, .016);
}
.pw-manifesto::after {
  left: -100px; top: -160px;
  width: 320px; height: 320px;
  border: 1px solid rgba(168, 226, 189, .12);
}
.pw-manifesto > .container { position: relative; z-index: 1; }
.pw-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #9fe0b5;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.pw-kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: .6;
}
.pw-statement {
  max-width: 17ch;
  margin: 24px 0 0;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.pw-statement em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-style: italic;
}
.pw-manifesto-grid {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: clamp(32px, 6vw, 84px);
  margin-top: clamp(34px, 4.5vw, 58px);
  align-items: start;
}
.pw-manifesto-copy p {
  color: rgba(255, 255, 255, .72);
  line-height: 1.8;
}
.pw-manifesto-copy p + p { margin-top: 16px; }
.pw-principles { border-top: 1px solid rgba(255, 255, 255, .16); }
.pw-principle {
  display: flex;
  align-items: baseline;
  gap: 15px;
  padding: 19px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.pw-principle b {
  color: #9fe0b5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  transition: transform .3s var(--ease);
}
@media (hover: hover) {
  .pw-principle:hover b { transform: translateX(4px); }
}
.pw-manifesto-foot {
  margin: 0;
  padding-top: clamp(30px, 4vw, 48px);
  color: #a8e2bd;
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(20px, 2.4vw, 28px);
  font-style: italic;
  line-height: 1.2;
}

/* ---------- 06 / 11 · FOUR-UP CARD ROWS ----------
   The theme sets both card grids to 3 columns:
     .number-grid          { grid-template-columns: repeat(3,1fr); gap:16px }
     .service-process-grid { grid-template-columns: repeat(3,1fr); gap:16px }
   Four cards in a 3-up grid leaves a single orphan on a second row. These two
   sections carry exactly 4 cards each, so put all four on one row where there
   is room for them, then step down 4 -> 2 -> 1.

   Breakpoints:
     >=1200px  4 columns  (container >=1152px, so each card >=276px)
     601-1199  2 columns  (a clean 2x2)
     <=600px   1 column

   partner-page.css is enqueued with pitanga-inner as a dependency, so it is
   printed after inner-pages.css and wins at equal specificity. */
.pw-four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1199px) {
  .pw-four-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The theme stretches the final process card across the whole row below
     900px, which assumes a 3-card grid. Undo it so four cards read 2x2. */
  .pw-four-up .service-process-card:last-child {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .pw-four-up {
    grid-template-columns: 1fr;
  }
}

/* .number-card tints are keyed to nth-child(3n…) because the theme grid is
   3 wide. In a 4-up row that cycle lands arbitrarily, so re-map the tint to
   each position to keep the row reading as deliberate: dark hero card, then
   pattern / gradient / pattern. Colour values are the theme's own. */
@media (min-width: 1200px) {
  .pw-four-up .number-card:nth-child(2) {
    background-color: #f8fbf7;
    background-image: linear-gradient(135deg, rgba(23, 138, 69, .045) 25%, transparent 25%),
                      linear-gradient(315deg, rgba(23, 138, 69, .045) 25%, transparent 25%);
    background-position: 0 0, 14px 14px;
    background-size: 28px 28px;
  }
  .pw-four-up .number-card:nth-child(3) {
    background: linear-gradient(155deg, #f7fbf7, #e4f2e7);
  }
  .pw-four-up .number-card:nth-child(4) {
    background-color: #f8fbf7;
    background-image: linear-gradient(135deg, rgba(23, 138, 69, .045) 25%, transparent 25%),
                      linear-gradient(315deg, rgba(23, 138, 69, .045) 25%, transparent 25%);
    background-position: 0 0, 14px 14px;
    background-size: 28px 28px;
  }
}

/* ---------- 06 · TWO PARTNERSHIP PATHS ---------- */
.pw-path-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.pw-path {
  --card-x: 78%;
  --card-y: 18%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.4vw, 42px);
  border: 1px solid var(--border);
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #f1f7f1);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.pw-path::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--card-x) var(--card-y), rgba(72, 187, 108, .13), transparent 32%);
  transition: opacity .25s var(--ease);
}
.pw-path > * { position: relative; z-index: 1; }
.pw-path:hover::after { opacity: 1; }
.pw-path:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(23, 138, 69, .22);
}
.pw-path .pw-num {
  color: var(--brand-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}
.pw-path h3 {
  margin: 16px 0 12px;
  color: var(--deep-green);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.18;
  letter-spacing: -.025em;
}
.pw-path p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.pw-path .btn { margin-top: 28px; align-self: flex-start; }
.pw-path-note {
  max-width: 74ch;
  margin-top: 24px;
  padding: 19px 21px;
  border: 1px solid rgba(8, 61, 45, .1);
  border-radius: 14px;
  background: #f6f9f4;
  color: #5f6b64; /* AA on #f6f9f4 (5.24:1) — lighter greys fail at this size */
  font-size: 11.5px;
  line-height: 1.75;
}
.pw-path-note b { color: var(--deep-green); }

/* ---------- 04 · PARTNER ENQUIRY FORM ---------- */
.pw-form-note {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* Theme (inner-pages.css) draws .contact-list rows with:
     .contact-list a, .contact-list div { padding:17px; border:1px solid …;
                                          border-radius:14px; background:#fff }
   Those are descendant selectors, so they also hit the inline links nested
   inside a row's <strong> ("Mutual Funds & SIP", "Visit AMFI"). An inline box
   with padding paints outside its line box, which drew a stray rounded
   14px-radius border on top of the surrounding copy.
   Reset the row chrome for nested links only and style them as inline links.
   Specificity (0,2,2) beats the theme's (0,1,1); nothing outside
   .pw-enquiry-aside is touched. */
.pw-enquiry-aside .contact-list strong a {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  /* --brand-green on white is only 4.36:1 at this size; --deep-green is 11.76:1.
     The underline (always on) is what marks it as a link, not the colour. */
  color: var(--deep-green);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness .2s var(--ease);
}
@media (hover: hover) {
  .pw-enquiry-aside .contact-list strong a:hover { text-decoration-thickness: 2px; }
}
.pw-enquiry-aside .contact-list strong a:focus-visible {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Choice groups (ARN / experience) — keyboard accessible radio pills */
.pw-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-choice label { position: relative; display: inline-flex; }
.pw-choice input {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  opacity: 0;
}
.pw-choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid #ced8d1;
  border-radius: 999px;
  background: #fbfcfa;
  color: var(--charcoal);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
@media (hover: hover) {
  .pw-choice label:hover span { border-color: var(--brand-green); color: var(--brand-green); }
}
.pw-choice input:checked + span {
  border-color: var(--deep-green);
  background: var(--deep-green);
  color: #fff;
}
.pw-choice input:focus-visible + span {
  outline: 2px solid var(--brand-green);
  outline-offset: 2px;
}

.pw-field-error {
  display: block;
  color: #b3261e;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
}
.pw-field-error:empty { display: none; }
.pw-form .form-field.is-error input,
.pw-form .form-field.is-error select,
.pw-form .form-field.is-error textarea {
  border-color: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .1);
}
.pw-form .form-field.is-error .pw-choice span { border-color: #b3261e; }
.pw-form .form-consent.is-error span { color: #b3261e; }
.pw-form .form-consent.is-error input { border-color: #b3261e; }

/* Server-rendered outcome notice (no-JavaScript submission path) */
.pw-notice {
  margin: 0 0 22px;
  padding: 15px 18px;
  border: 1px solid rgba(23, 138, 69, .28);
  border-left: 3px solid var(--brand-green);
  border-radius: 12px;
  background: rgba(234, 244, 236, .7);
  color: var(--deep-green);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.65;
}
.pw-notice p { margin: 0; color: inherit; }
.pw-notice.is-error {
  border-color: rgba(179, 38, 30, .28);
  border-left-color: #b3261e;
  background: rgba(179, 38, 30, .05);
  color: #8f1d17;
}

.pw-form .form-status {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}
.pw-form .form-status.is-success { color: var(--brand-green); }
.pw-form .form-status.is-error { color: #b3261e; }

.pw-form [type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.pw-form [type="submit"]:disabled { opacity: .55; cursor: progress; }

.pw-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* Success state */
.pw-success { display: none; }
.pw-success.is-visible { display: block; }
.pw-success-panel {
  padding: clamp(26px, 3.4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #eef7f0);
}
.pw-success-mark {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--soft-sage);
  color: var(--brand-green);
  font-size: 20px;
  line-height: 1;
}
.pw-success-panel h3 {
  margin: 18px 0 10px;
  color: var(--deep-green);
  font-size: clamp(20px, 2.2vw, 25px);
  letter-spacing: -.025em;
  line-height: 1.2;
}
.pw-success-panel p {
  max-width: 56ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.pw-success-panel .btn { margin-top: 24px; }

/* ---------- 13 · COMPLIANCE ---------- */
.pw-compliance-wrap { max-width: 920px; }
.pw-compliance {
  padding: clamp(24px, 3.4vw, 38px);
  border: 1px solid rgba(8, 61, 45, .1);
  border-radius: 20px;
  background: #f6f9f4;
}
.pw-compliance h2 {
  margin: 0 0 16px;
  color: var(--deep-green);
  font-size: clamp(19px, 2.1vw, 25px);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.pw-compliance p {
  color: #5f6b64; /* AA on #f6f9f4 (5.24:1) */
  font-size: 11.5px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.pw-compliance p + p { margin-top: 12px; }
.pw-compliance b { color: var(--deep-green); }
.pw-compliance a {
  color: var(--deep-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pw-compliance-reg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.pw-compliance-reg li {
  padding: 7px 13px;
  border: 1px solid rgba(8, 61, 45, .12);
  border-radius: 999px;
  background: #fff;
  color: var(--deep-green);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- 12 · FAQ — accessibility hardening ----------
   The theme accordion collapses answers with max-height:0, which leaves the
   text in the accessibility tree and focusable. With .pw-faq we drop it out of
   the tree until the item is open, using the same 350ms max-height transition
   so the visual behaviour is unchanged. */
.pw-faq .faq-answer {
  visibility: hidden;
  transition: max-height .35s var(--ease), visibility 0s linear .35s;
}
.pw-faq .faq-item.open > .faq-answer {
  visibility: visible;
  transition: max-height .35s var(--ease), visibility 0s;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .pw-index { grid-template-columns: 1fr; }
  .pw-path-grid { grid-template-columns: 1fr; }
  .pw-manifesto-grid { grid-template-columns: 1fr; gap: 34px; }
  .pw-hero-media { min-height: 320px; border-radius: 24px; }
}

@media (max-width: 600px) {
  .pw-trust li:not(:last-child)::after { margin: 0 10px; }
  .pw-index-item { padding: 22px 0 20px; }
  .pw-index-item h3 { font-size: 18px; }
  .pw-index-item p { font-size: 13px; }
  .pw-hero-media { min-height: 268px; border-radius: 20px; }
  .pw-hero-media-copy { inset: auto 20px 20px; }
  .pw-path { padding: 24px 20px; border-radius: 20px; }
  .pw-path .btn { align-self: stretch; justify-content: center; }
  .pw-manifesto { padding: 54px 0; }
  .pw-principle { font-size: 15px; padding: 16px 0; }
  .pw-compliance { padding: 22px 18px; border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .inner-page .page-hero .pw-hero-media { animation: none; }
  .pw-index-item,
  .pw-path,
  .pw-hero-media img,
  .pw-principle b { transition: none; }
  .pw-index-item:hover,
  .pw-path:hover,
  .pw-hero-media:hover img,
  .pw-principle:hover b { transform: none; }
}
