/**
 * ARNI Inner Page Shell — reusable foundation for all future CMS templates.
 *
 * Load AFTER /assets/css/hero-option-d.css
 *
 * Rules for future templates:
 * - Consume ip-* + existing zx-* / od-* chrome only
 * - No random paddings: use --ip-sec-y and gap tokens
 * - No duplicate button/card CSS per template
 * - First real page (condition) = content + composition only
 *
 * Namespace: ip-* (inner-page). Homepage visual CSS is untouched.
 */

/* —— 1. Tokens (locked to homepage geometry) —— */
:root {
  --ip-max: 1460px;
  --ip-wide: 1180px;
  --ip-read: 720px;

  --ip-pad: 32px;
  --ip-pad-lg: 40px;
  --ip-pad-md: 28px;
  --ip-pad-sm: 20px;

  --ip-sec-y: 112px;
  --ip-sec-y-md: 88px;
  --ip-sec-y-sm: 72px;

  --ip-gap-lg: 32px;
  --ip-gap-md: 20px;
  --ip-gap-sm: 12px;

  --ip-rhythm-eb: 14px;
  --ip-rhythm-lead: 24px;
  --ip-rhythm-block: 28px;

  --ip-r-sm: 8px;
  --ip-r-md: 14px;
  --ip-r-lg: 22px;
  --ip-r-xl: 30px;

  --ip-border: rgba(34, 34, 34, 0.1);
  --ip-border-strong: rgba(34, 34, 34, 0.16);
  --ip-surface-ivory: var(--paper);
  --ip-surface-white: #fff;
  --ip-surface-teal: var(--teal-deep);
  --ip-surface-deep: #05403f;
  --ip-accent-gold: var(--gold);

  --ip-ease: var(--ease);
  --ip-lift: translateY(-2px);
  --ip-stagger: 70ms;
  --ip-hdr-h: 78px;
}

@media (min-width: 1280px) {
  :root { --ip-pad: var(--ip-pad-lg); }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  :root { --ip-pad: var(--ip-pad-md); }
}
@media (max-width: 959px) {
  :root { --ip-pad: var(--ip-pad-sm); }
}
@media (max-width: 1279px) {
  :root { --ip-sec-y: var(--ip-sec-y-md); }
}
@media (max-width: 700px) {
  :root { --ip-sec-y: var(--ip-sec-y-sm); }
}

/* —— 2. Page chrome offsets —— */
body.arni-inner {
  padding-top: 0;
}
/*
 * Sticky float:
 * - With homepage-style [data-od-hero]: float arms after scroll (hero-option-d.js)
 * - Without hero (scaffold-only pages): float always on desktop
 */
@media (min-width: 960px) {
  body.arni-inner:not(:has([data-od-hero])) {
    padding-top: var(--ip-hdr-h);
  }
  body.arni-inner:not(:has([data-od-hero])) .od-float {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}
@media (max-width: 959px) {
  body.arni-inner {
    padding-bottom: 72px; /* room for zx-mbar */
  }
}

/* —— 3. Containers —— */
.ip-in {
  width: 100%;
  max-width: var(--ip-max);
  margin-inline: auto;
  padding-inline: var(--ip-pad);
}
.ip-in--wide {
  max-width: var(--ip-wide);
}
.ip-in--read {
  max-width: var(--ip-read);
}
.ip-stack {
  display: flex;
  flex-direction: column;
  gap: var(--ip-gap-md);
}
.ip-stack--lg { gap: var(--ip-gap-lg); }
.ip-stack--sm { gap: var(--ip-gap-sm); }

.ip-sec {
  padding-block: var(--ip-sec-y);
}
.ip-sec--tight {
  padding-block: calc(var(--ip-sec-y) * 0.65);
}

.ip-grid {
  display: grid;
  gap: var(--ip-gap-lg);
}
.ip-grid--2 {
  grid-template-columns: 1fr;
}
.ip-grid--3 {
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .ip-grid--2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .ip-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* —— 4. Typography —— */
.ip-eb,
.ip-eb.zx-eb {
  margin: 0 0 var(--ip-rhythm-eb);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-family: var(--font);
}
.ip-eb--on-dark { color: var(--gold); }

.ip-h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 18ch;
}
.ip-h1--on-dark { color: #fff; }

.ip-h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 22ch;
}
.ip-h2--on-dark { color: #fff; }

.ip-h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.ip-body-lg {
  margin: 0;
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.6;
  color: rgba(34, 34, 34, 0.72);
  max-width: 38rem;
}
.ip-body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(34, 34, 34, 0.68);
  max-width: 40rem;
}
.ip-mute {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(34, 34, 34, 0.52);
}
.ip-label {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(34, 34, 34, 0.48);
}
.ip-meta {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(34, 34, 34, 0.55);
}
.ip-cta-label {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.ip-lead-gap { margin-top: var(--ip-rhythm-lead); }
.ip-block-gap { margin-top: var(--ip-rhythm-block); }

/* —— 5. Breadcrumb —— */
.ip-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: rgba(34, 34, 34, 0.45);
}
.ip-crumb a {
  color: rgba(34, 34, 34, 0.55);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ip-ease), border-color 0.2s var(--ip-ease);
}
.ip-crumb a:hover {
  color: var(--teal);
  border-color: rgba(0, 128, 128, 0.35);
}
.ip-crumb a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}
.ip-crumb [aria-current="page"] {
  color: rgba(34, 34, 34, 0.72);
}
.ip-crumb-sep {
  color: rgba(34, 34, 34, 0.28);
  user-select: none;
}

.ip-hero--condition .ip-crumb,
.ip-hero--service .ip-crumb,
.ip-hero--exam .ip-crumb,
.ip-hero--online .ip-crumb {
  color: rgba(255, 252, 247, 0.5);
}
.ip-hero--condition .ip-crumb a,
.ip-hero--service .ip-crumb a,
.ip-hero--exam .ip-crumb a,
.ip-hero--online .ip-crumb a {
  color: rgba(255, 252, 247, 0.62);
}
.ip-hero--condition .ip-crumb a:hover,
.ip-hero--service .ip-crumb a:hover,
.ip-hero--exam .ip-crumb a:hover,
.ip-hero--online .ip-crumb a:hover {
  color: var(--gold);
  border-color: rgba(200, 163, 92, 0.4);
}
.ip-hero--condition .ip-crumb [aria-current="page"],
.ip-hero--service .ip-crumb [aria-current="page"],
.ip-hero--exam .ip-crumb [aria-current="page"],
.ip-hero--online .ip-crumb [aria-current="page"] {
  color: rgba(255, 252, 247, 0.85);
}
.ip-hero--condition .ip-crumb-sep,
.ip-hero--service .ip-crumb-sep,
.ip-hero--exam .ip-crumb-sep,
.ip-hero--online .ip-crumb-sep {
  color: rgba(255, 252, 247, 0.28);
}

/* —— 6. Inner hero base —— */
.ip-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--ip-r-xl);
  background: var(--ip-surface-ivory);
  color: var(--ink);
}
.ip-hero--condition,
.ip-hero--service,
.ip-hero--exam,
.ip-hero--online {
  background: var(--teal-deep);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(200, 163, 92, 0.14);
}
.ip-hero--institutional {
  background: var(--ip-surface-white);
  border: 1px solid var(--ip-border);
}

.ip-hero-inner {
  display: grid;
  gap: var(--ip-gap-lg);
  padding: clamp(36px, 5vw, 64px) clamp(24px, 4vw, 56px);
  align-items: center;
}
@media (min-width: 960px) {
  .ip-hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 48px;
    min-height: 420px;
  }
  .ip-hero--institutional .ip-hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  }
}
@media (max-width: 959px) {
  .ip-hero-inner {
    grid-template-columns: 1fr;
    padding: 28px 20px 32px;
  }
  .ip-hero-media { order: -1; }
}

.ip-hero-copy {
  max-width: 640px;
}
.ip-hero .ip-h1 {
  max-width: 16ch;
}
.ip-hero--condition .ip-h1,
.ip-hero--service .ip-h1,
.ip-hero--exam .ip-h1,
.ip-hero--online .ip-h1 {
  color: #fff;
}
.ip-hero-intro {
  margin: var(--ip-rhythm-lead) 0 0;
  font-size: clamp(16.5px, 1.3vw, 18.5px);
  line-height: 1.58;
  max-width: 36rem;
  color: rgba(34, 34, 34, 0.68);
}
.ip-hero--condition .ip-hero-intro,
.ip-hero--service .ip-hero-intro,
.ip-hero--exam .ip-hero-intro,
.ip-hero--online .ip-hero-intro {
  color: rgba(255, 252, 247, 0.78);
}

.ip-hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 28px;
}
.ip-hero-cta .zx-btn {
  min-height: 52px;
  min-width: 44px;
}
.ip-hero-cta .zx-btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}
.ip-hero--institutional .ip-hero-cta .zx-btn-ghost {
  border-color: rgba(34, 34, 34, 0.22);
  color: var(--ink);
}
.ip-hero--institutional .ip-hero-cta .zx-btn-ghost:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: transparent;
}

.ip-hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(34, 34, 34, 0.1);
}
.ip-hero--condition .ip-hero-trust,
.ip-hero--service .ip-hero-trust,
.ip-hero--exam .ip-hero-trust,
.ip-hero--online .ip-hero-trust {
  border-top-color: rgba(255, 252, 247, 0.14);
}
.ip-hero-trust-item {
  font-size: 13.5px;
  font-weight: 550;
  color: rgba(34, 34, 34, 0.58);
}
.ip-hero--condition .ip-hero-trust-item,
.ip-hero--service .ip-hero-trust-item,
.ip-hero--exam .ip-hero-trust-item,
.ip-hero--online .ip-hero-trust-item {
  color: rgba(255, 252, 247, 0.7);
}

.ip-hero-media {
  position: relative;
  border-radius: var(--ip-r-lg);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.08);
  aspect-ratio: 4 / 3;
  min-height: 200px;
}
.ip-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ip-hero-media-ph {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 200px;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(34, 34, 34, 0.35);
}
.ip-hero--condition .ip-hero-media-ph,
.ip-hero--service .ip-hero-media-ph,
.ip-hero--exam .ip-hero-media-ph,
.ip-hero--online .ip-hero-media-ph {
  color: rgba(255, 252, 247, 0.35);
}

/* —— 7. Shared UI tokens —— */
.ip-surface-ivory { background: var(--ip-surface-ivory); }
.ip-surface-white { background: var(--ip-surface-white); }
.ip-surface-teal { background: var(--ip-surface-teal); color: #fff; }
.ip-surface-deep { background: var(--ip-surface-deep); color: #fff; }

.ip-card {
  background: #fff;
  border: 1px solid var(--ip-border);
  border-radius: var(--ip-r-lg);
  padding: 24px 26px;
  transition: border-color 0.35s var(--ip-ease), transform 0.35s var(--ip-ease);
}
.ip-card:hover {
  border-color: rgba(0, 128, 128, 0.35);
  transform: var(--ip-lift);
}
.ip-card:focus-within {
  border-color: var(--teal);
}

.ip-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--ip-border);
  background: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(34, 34, 34, 0.65);
}
.ip-pill--teal {
  border-color: rgba(0, 128, 128, 0.28);
  color: var(--teal-deep);
  background: rgba(0, 128, 128, 0.06);
}
.ip-pill--gold {
  border-color: rgba(200, 163, 92, 0.4);
  color: var(--gold-deep);
  background: rgba(200, 163, 92, 0.1);
}

.ip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 2px;
  transition: color 0.25s var(--ip-ease), border-color 0.25s var(--ip-ease);
}
.ip-link .ip-arr,
.ip-link .zx-arr {
  display: inline-block;
  transition: transform 0.25s var(--ip-ease);
}
.ip-link:hover {
  color: var(--teal);
  border-color: var(--teal);
}
.ip-link:hover .ip-arr,
.ip-link:hover .zx-arr {
  transform: translateX(4px);
}
.ip-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 2px;
}

.ip-img {
  display: block;
  width: 100%;
  border-radius: var(--ip-r-lg);
  overflow: hidden;
}
.ip-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Accordion shell — compose with zx-faqx mechanics when needed */
.ip-acc {
  border-top: 1px solid var(--ip-border);
}
.ip-acc-item {
  border-bottom: 1px solid var(--ip-border);
}
.ip-acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 56px;
  padding: 16px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-family: var(--display);
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--ink);
  cursor: pointer;
}
.ip-acc-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
.ip-acc-ico {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  position: relative;
}
.ip-acc-ico::before,
.ip-acc-ico::after {
  content: "";
  position: absolute;
  background: var(--teal);
  transition: transform 0.3s var(--ip-ease);
}
.ip-acc-ico::before {
  inset: 8px 0 auto;
  height: 1.5px;
}
.ip-acc-ico::after {
  inset: 0 auto 0 8px;
  width: 1.5px;
}
.ip-acc-item.is-open .ip-acc-ico::after {
  transform: scaleY(0);
}
.ip-acc-panel {
  display: none;
  padding: 0 0 18px;
}
.ip-acc-item.is-open .ip-acc-panel {
  display: block;
}

/* —— 8. Bottom component shells —— */
.ip-shell-label {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: var(--ip-r-sm);
  background: rgba(0, 128, 128, 0.08);
  color: var(--teal-deep);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ip-related {
  display: grid;
  gap: var(--ip-gap-md);
}
@media (min-width: 700px) {
  .ip-related { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .ip-related { grid-template-columns: repeat(3, 1fr); }
}
.ip-related a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}
.ip-related-title {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.2;
}
.ip-related-x {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(34, 34, 34, 0.58);
}

.ip-team-teaser {
  display: grid;
  gap: var(--ip-gap-lg);
}
@media (min-width: 900px) {
  .ip-team-teaser {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
}
.ip-team-teaser-photo {
  border-radius: var(--ip-r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: rgba(0, 0, 0, 0.06);
  min-height: 240px;
}
.ip-team-teaser-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ip-contact-compact {
  display: grid;
  gap: var(--ip-gap-md);
  padding: 28px 28px;
  border-radius: var(--ip-r-lg);
  background: #fff;
  border: 1px solid var(--ip-border);
}
@media (min-width: 800px) {
  .ip-contact-compact {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 36px 40px;
  }
}
.ip-contact-compact-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}

/* Specimens strip (scaffold only) */
.ip-specimen {
  display: grid;
  gap: 28px;
}
.ip-specimen-row {
  display: grid;
  gap: 10px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ip-border);
}
.ip-specimen-name {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(34, 34, 34, 0.4);
}

/* —— 9. Motion hooks —— */
html.zx-js [data-ip-mask] {
  clip-path: inset(8% 8% 8% 8% round 18px);
  opacity: 0.55;
  transform: scale(1.02);
  transition:
    clip-path 0.9s var(--ip-ease),
    opacity 0.7s var(--ip-ease),
    transform 0.9s var(--ip-ease);
}
html.zx-js [data-ip-mask].ip-in-view {
  clip-path: inset(0 0 0 0 round 0);
  opacity: 1;
  transform: none;
}

html.zx-js [data-ip-line] {
  overflow: hidden;
}
html.zx-js [data-ip-line] > span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 0.75s var(--ip-ease),
    opacity 0.55s var(--ip-ease);
}
html.zx-js [data-ip-line].ip-in-view > span {
  transform: none;
  opacity: 1;
}

[data-ip-stagger] > * {
  transition-delay: calc(var(--ip-i, 0) * var(--ip-stagger));
}

/* —— 10. Accessibility —— */
.arni-inner :focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
.arni-inner .zx-btn:focus-visible,
.arni-inner .od-float-book:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}
.arni-inner a,
.arni-inner button {
  -webkit-tap-highlight-color: transparent;
}
.arni-inner .zx-btn,
.arni-inner .ip-acc-btn,
.arni-inner .zx-mbar-item {
  min-height: 44px;
}

@media (prefers-reduced-motion: reduce) {
  html.zx-js [data-ip-mask],
  html.zx-js [data-ip-mask].ip-in-view,
  html.zx-js [data-ip-line] > span,
  html.zx-js [data-ip-line].ip-in-view > span {
    clip-path: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .ip-card:hover,
  .ip-link:hover .ip-arr,
  .ip-link:hover .zx-arr {
    transform: none;
  }
}

/* —— 11. Breakpoint helpers —— */
.ip-hide-mobile { display: none; }
.ip-hide-desktop { display: block; }
@media (min-width: 960px) {
  .ip-hide-mobile { display: block; }
  .ip-hide-desktop { display: none; }
}

/* Scaffold banner — not for production templates */
.ip-devbar {
  background: #05403f;
  color: rgba(255, 252, 247, 0.85);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.02em;
  padding: 10px var(--ip-pad);
  text-align: center;
}
.ip-devbar strong {
  color: var(--gold);
  font-weight: 650;
}
