/* Esther Intelligence readability layer
   Keep the futuristic identity for headings and controls.
   Use a clean business font for paragraph/body reading. */

:root {
  --esther-readable-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --esther-display-font: "Rajdhani", "Orbitron", ui-sans-serif, system-ui, sans-serif;
}

/* Normal reading text */
body,
main,
main p:not(.heading-futuristic),
main li,
main span:not(.heading-futuristic),
main small,
input,
textarea,
select {
  font-family: var(--esther-readable-font) !important;
}

/* Preserve Esther futuristic identity */
h1,
h2,
h3,
h4,
.heading-futuristic,
.esther-global-nav a,
.esther-mobile-menu a,
.esther-terminal-btn,
button,
.section-kicker,
[class*="tracking-"][class*="uppercase"] {
  font-family: var(--esther-display-font) !important;
}

/* Main paragraphs: larger, cleaner, less cramped */
main p:not(.heading-futuristic):not(.section-kicker) {
  font-size: clamp(1.05rem, 0.98rem + 0.28vw, 1.22rem) !important;
  line-height: 1.72 !important;
  letter-spacing: 0.005em !important;
  color: rgba(226, 232, 240, 0.88) !important;
  font-weight: 500 !important;
}

/* Card descriptions */
.system-node p:not(.heading-futuristic),
.metric-chip p:not(.heading-futuristic),
.home-panel p:not(.heading-futuristic):not(.section-kicker),
.rounded-2xl span,
.rounded-2xl p {
  font-family: var(--esther-readable-font) !important;
  letter-spacing: 0.005em !important;
  line-height: 1.65 !important;
}

/* Small card text should not look tiny */
.system-node p:not(.heading-futuristic),
.metric-chip p:not(.heading-futuristic),
.rounded-2xl span {
  font-size: clamp(0.98rem, 0.92rem + 0.18vw, 1.1rem) !important;
}

/* Keep labels futuristic and controlled */
main p.heading-futuristic,
main .section-kicker,
main .text-cyan-400.heading-futuristic,
main .text-cyan-300.heading-futuristic {
  font-family: var(--esther-display-font) !important;
  letter-spacing: 0.28em !important;
  font-weight: 800 !important;
}

/* Headings stay futuristic, but easier to read */
main h1,
main h2,
main h3 {
  font-family: var(--esther-display-font) !important;
  letter-spacing: 0.02em;
}

/* Footer stays unified with the global shell, but readable */
.esther-global-footer,
.esther-global-footer * {
  font-family: var(--esther-display-font) !important;
}

.esther-footer-copy,
.esther-footer-col a,
.esther-footer-col p {
  letter-spacing: 0.06em !important;
  line-height: 1.75 !important;
}

/* Mobile readability */
@media (max-width: 700px) {
  main p:not(.heading-futuristic):not(.section-kicker) {
    font-size: 1rem !important;
    line-height: 1.68 !important;
  }

  .system-node p:not(.heading-futuristic),
  .metric-chip p:not(.heading-futuristic),
  .rounded-2xl span {
    font-size: 0.96rem !important;
  }
}

/* Final paragraph weight correction */
main p:not(.heading-futuristic):not(.section-kicker),
main li,
main small,
.home-panel p:not(.heading-futuristic):not(.section-kicker),
.system-node p:not(.heading-futuristic),
.metric-chip p:not(.heading-futuristic),
.rounded-2xl p,
.rounded-2xl span {
  font-weight: 400 !important;
}

/* Keep important labels strong */
.heading-futuristic,
.section-kicker,
.esther-global-nav a,
.esther-mobile-menu a,
.esther-terminal-btn,
button,
h1,
h2,
h3,
h4 {
  font-weight: 800 !important;
}

/* Footer paragraph/link text should be readable, not heavy */
.esther-footer-copy,
.esther-footer-col p,
.esther-footer-status {
  font-weight: 400 !important;
}

.esther-footer-col a {
  font-weight: 600 !important;
}

/* Final typography correction: elegant Esther headings, readable body */
main h1,
main h2,
main h3,
main .heading-futuristic {
  font-weight: 400 !important;
  letter-spacing: 0.04em !important;
}

main h1 {
  font-weight: 300 !important;
  letter-spacing: 0.035em !important;
}

main h2 {
  font-weight: 400 !important;
  letter-spacing: 0.045em !important;
}

main h3 {
  font-weight: 500 !important;
  letter-spacing: 0.025em !important;
}

/* Keep section labels strong but not chunky */
main p.heading-futuristic,
main .section-kicker,
main .text-cyan-400.heading-futuristic,
main .text-cyan-300.heading-futuristic {
  font-weight: 700 !important;
  letter-spacing: 0.28em !important;
}

/* Body paragraphs stay clean, normal weight */
main p:not(.heading-futuristic):not(.section-kicker),
main li,
main small,
.home-panel p:not(.heading-futuristic):not(.section-kicker),
.system-node p:not(.heading-futuristic),
.metric-chip p:not(.heading-futuristic),
.rounded-2xl p,
.rounded-2xl span {
  font-weight: 400 !important;
  letter-spacing: 0.005em !important;
}

/* Buttons/nav can stay bold */
.esther-terminal-btn,
.esther-global-nav a,
.esther-mobile-menu a,
button {
  font-weight: 800 !important;
}

/* Homepage hero should stay sharp, not chunky */
main section:first-of-type h1 {
  font-weight: 300 !important;
  letter-spacing: 0.02em !important;
}

main section:first-of-type p {
  font-weight: 400 !important;
}

/* Homepage final scale polish */
.home-page main {
  font-size: 18px;
}

.home-page main section:first-of-type h1 {
  font-size: clamp(4.4rem, 8vw, 8.7rem) !important;
  line-height: 0.92 !important;
  font-weight: 300 !important;
}

.home-page main section:first-of-type p:not(.heading-futuristic):not(.section-kicker) {
  font-size: clamp(1.08rem, 1vw, 1.32rem) !important;
  line-height: 1.75 !important;
  font-weight: 400 !important;
}

.home-page .metric-chip p:not(.heading-futuristic),
.home-page .system-node p:not(.heading-futuristic),
.home-page .rounded-2xl span,
.home-page .rounded-2xl p {
  font-size: 1rem !important;
  line-height: 1.62 !important;
  font-weight: 400 !important;
}

.home-page .system-node h3 {
  font-size: 1.32rem !important;
  line-height: 1.18 !important;
  font-weight: 600 !important;
}

.home-page .home-panel h2 {
  font-size: clamp(2.05rem, 3.2vw, 3.65rem) !important;
  line-height: 1.08 !important;
  font-weight: 400 !important;
}

.home-page .home-panel p:not(.heading-futuristic):not(.section-kicker) {
  font-size: 1.08rem !important;
  line-height: 1.72 !important;
  font-weight: 400 !important;
}

.home-page .esther-terminal-btn,
.home-page main a {
  font-size: 0.98rem !important;
}

@media (max-width: 900px) {
  .home-page main section:first-of-type h1 {
    font-size: clamp(3.2rem, 12vw, 5.4rem) !important;
  }

  .home-page .home-panel h2 {
    font-size: clamp(1.9rem, 7vw, 3rem) !important;
  }
}

/* Homepage final scale pass: stop thumbnail effect */
.home-page main {
  font-size: 20px !important;
}

.home-page main .max-w-7xl {
  max-width: 1240px !important;
}

.home-page main section:first-of-type {
  padding-top: 15rem !important;
  padding-bottom: 4.5rem !important;
}

.home-page main section:first-of-type h1 {
  font-size: clamp(5.2rem, 8.8vw, 9.8rem) !important;
  line-height: 0.9 !important;
  font-weight: 300 !important;
}

.home-page main section:first-of-type .text-cyan-300,
.home-page main section:first-of-type .text-cyan-400 {
  font-size: 1.25rem !important;
}

.home-page main section:first-of-type p:not(.heading-futuristic):not(.section-kicker) {
  font-size: 1.28rem !important;
  line-height: 1.72 !important;
  font-weight: 400 !important;
}

.home-page .metric-chip {
  padding: 1.35rem 1.4rem !important;
}

.home-page .metric-chip p:first-child,
.home-page .system-node p:first-child,
.home-page .home-panel > p:first-child {
  font-size: 0.82rem !important;
  letter-spacing: 0.22em !important;
  font-weight: 800 !important;
}

.home-page .metric-chip p:not(:first-child) {
  font-size: 1.02rem !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
}

.home-page .system-node {
  padding: 1.6rem !important;
}

.home-page .system-node h3 {
  font-size: 1.42rem !important;
  line-height: 1.16 !important;
  font-weight: 600 !important;
}

.home-page .system-node p:not(:first-child) {
  font-size: 1.02rem !important;
  line-height: 1.6 !important;
  font-weight: 400 !important;
}

.home-page .home-panel h2 {
  font-size: clamp(2.55rem, 3.8vw, 4.25rem) !important;
  line-height: 1.02 !important;
  font-weight: 400 !important;
}

.home-page .home-panel p:not(.heading-futuristic):not(.section-kicker) {
  font-size: 1.12rem !important;
  line-height: 1.68 !important;
  font-weight: 400 !important;
}

.home-page .home-panel .rounded-2xl strong {
  font-size: 1rem !important;
}

.home-page .home-panel .rounded-2xl span {
  font-size: 0.98rem !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
}

/* Make CTA section stronger but reduce dead space before footer */
.home-page main section:last-of-type {
  padding-bottom: 8rem !important;
}

.home-page main section:last-of-type .max-w-5xl {
  max-width: 760px !important;
}

.home-page main section:last-of-type h2 {
  font-size: clamp(3rem, 5vw, 5.2rem) !important;
}

.home-page .esther-terminal-btn,
.home-page main a {
  font-size: 0.95rem !important;
  letter-spacing: 0.14em !important;
}

/* Prevent tiny Tailwind utility text on homepage */
.home-page main .text-xs {
  font-size: 0.82rem !important;
}

.home-page main .text-sm {
  font-size: 0.98rem !important;
}

.home-page main .text-base {
  font-size: 1.05rem !important;
}

@media (max-width: 900px) {
  .home-page main section:first-of-type {
    padding-top: 8.5rem !important;
  }

  .home-page main section:first-of-type h1 {
    font-size: clamp(3.6rem, 13vw, 6rem) !important;
  }

  .home-page main section:first-of-type p:not(.heading-futuristic):not(.section-kicker) {
    font-size: 1.05rem !important;
  }

  .home-page .home-panel h2 {
    font-size: clamp(2rem, 8vw, 3.4rem) !important;
  }
}

/* Homepage readable card/body correction */
.home-page main p:not(.heading-futuristic):not(.section-kicker),
.home-page main li,
.home-page .home-panel p:not(.heading-futuristic):not(.section-kicker),
.home-page .metric-chip p:not(.heading-futuristic):not(.section-kicker),
.home-page .system-node p:not(.heading-futuristic):not(.section-kicker),
.home-page .rounded-2xl p:not(.heading-futuristic):not(.section-kicker),
.home-page .rounded-2xl span {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 1.08rem !important;
  line-height: 1.65 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  color: rgba(226, 232, 240, 0.9) !important;
}

/* Hero paragraph slightly stronger */
.home-page main section:first-of-type p:not(.heading-futuristic):not(.section-kicker) {
  font-size: 1.22rem !important;
  line-height: 1.7 !important;
  max-width: 760px;
}

/* Small card labels stay futuristic, but readable */
.home-page .metric-chip p.heading-futuristic,
.home-page .system-node p.heading-futuristic,
.home-page .home-panel p.heading-futuristic,
.home-page main .section-kicker {
  font-family: "Rajdhani", "Orbitron", ui-sans-serif, system-ui, sans-serif !important;
  font-size: 0.86rem !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  letter-spacing: 0.2em !important;
  color: rgb(34, 211, 238) !important;
}

/* Card headings stronger but not oversized */
.home-page .system-node h3,
.home-page .home-panel .rounded-2xl strong {
  font-size: 1.18rem !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

/* Give cards more breathing room */
.home-page .metric-chip,
.home-page .system-node,
.home-page .home-panel .rounded-2xl {
  padding: 1.45rem !important;
}

/* Keep large section headings elegant */
.home-page .home-panel h2 {
  font-weight: 400 !important;
  letter-spacing: 0.035em !important;
}

/* CTA description readable */
.home-page main section:last-of-type p:not(.heading-futuristic):not(.section-kicker) {
  font-size: 1.12rem !important;
  line-height: 1.65 !important;
}

@media (max-width: 900px) {
  .home-page main p:not(.heading-futuristic):not(.section-kicker),
  .home-page .home-panel p:not(.heading-futuristic):not(.section-kicker),
  .home-page .metric-chip p:not(.heading-futuristic):not(.section-kicker),
  .home-page .system-node p:not(.heading-futuristic):not(.section-kicker),
  .home-page .rounded-2xl span {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }
}

/* Homepage section title correction: keep hero large, reduce body section titles */
.home-page main section:nth-of-type(3) .home-panel h2,
.home-page main section:nth-of-type(4) .home-panel h2 {
  font-size: clamp(2.15rem, 2.9vw, 3.35rem) !important;
  line-height: 1.12 !important;
  letter-spacing: 0.035em !important;
  font-weight: 400 !important;
  max-width: 620px !important;
}

/* Problem / Esther Layer cards need balanced text rhythm */
.home-page main section:nth-of-type(3) .home-panel {
  padding: 3rem !important;
}

.home-page main section:nth-of-type(3) .home-panel p:not(.heading-futuristic):not(.section-kicker) {
  font-size: 1.1rem !important;
  line-height: 1.7 !important;
  max-width: 640px !important;
}

/* Operating Engines title should not overpower the card */
.home-page main section:nth-of-type(4) .home-panel h2 {
  font-size: clamp(2.05rem, 2.6vw, 3.1rem) !important;
  max-width: 560px !important;
}

/* Keep CTA title large but not oversized */
.home-page main section:last-of-type h2 {
  font-size: clamp(2.8rem, 4.2vw, 4.4rem) !important;
  line-height: 1.08 !important;
}

/* Mobile correction */
@media (max-width: 900px) {
  .home-page main section:nth-of-type(3) .home-panel h2,
  .home-page main section:nth-of-type(4) .home-panel h2 {
    font-size: clamp(1.85rem, 7vw, 2.6rem) !important;
    line-height: 1.14 !important;
  }

  .home-page main section:nth-of-type(3) .home-panel {
    padding: 2rem !important;
  }
}
