/* Shared refinements and the homepage layout. */
:root {
  --ink: #142531;
  --deep: #102d38;
  --line: #d9e3e8;
  --warm: #e87851;
}

body { background: #f8faf9; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #e87851; outline-offset: 4px; }
.skip-link { position: fixed; z-index: 2000; top: .75rem; left: .75rem; padding: .75rem 1rem; border-radius: .6rem; color: #fff; background: #102d38; font-weight: 700; text-decoration: none; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.navbar { background: rgba(250, 252, 250, .94); border-bottom-color: var(--line); }
.nav-container { max-width: 1240px; display: flex; justify-content: space-between; gap: 1.5rem; padding: .9rem 1.5rem; }
.site-brand { color: var(--ink); text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: .65rem; white-space: nowrap; }
.brand-mark { width: 2.35rem; height: 2.35rem; display: inline-grid; place-items: center; border-radius: .7rem; background: var(--deep); color: #fff; font-size: .85rem; letter-spacing: -.04em; }
.nav-links { align-items: center; gap: 1.1rem; flex-wrap: nowrap; }
.nav-links li a { font-size: .86rem; color: #44545e; white-space: nowrap; }
.nav-links li a[aria-current="page"] { color: #c44e2f; }
.nav-links li:last-child a { border: 1px solid #cad9db; border-radius: 999px; padding: .55rem .9rem; color: var(--ink); }
.menu-toggle { border: 0; background: transparent; padding: .4rem .6rem; border-radius: .5rem; }

.home-page { color: var(--ink); }
.home-page .ambient { opacity: .45; }
.home-page .container { max-width: 1240px; }
.home-hero { position: relative; overflow: hidden; background: radial-gradient(circle at 76% 13%, #e5f2ef 0%, transparent 34%), linear-gradient(135deg, #fbfcf9 0%, #eff5f2 100%); border-bottom: 1px solid var(--line); }
.home-hero:before { content: ""; position: absolute; width: 660px; height: 660px; border-radius: 50%; border: 1px solid #bfd1cf; opacity: .4; right: -230px; top: -360px; }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .8fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-top: clamp(5rem, 8vw, 8rem); padding-bottom: 5rem; }
.home-hero-copy { max-width: 680px; }
.eyebrow, .section-kicker { color: #bc5435; font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: .65rem; }
.eyebrow-line { width: 24px; height: 1px; background: currentColor; }
.home-hero h1 { font-family: Fraunces, Georgia, serif; font-size: clamp(3.8rem, 7vw, 7.4rem); line-height: 1.03; letter-spacing: -.055em; margin: 1.3rem 0 1.6rem; font-weight: 500; }
.home-hero h1 em, .home-about h2 em { color: #d96542; font-style: normal; }
.home-lede { font-size: clamp(1.05rem, 1.4vw, 1.22rem); line-height: 1.8; max-width: 590px; color: #465860; }
.home-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.primary-action, .secondary-action { display: inline-flex; align-items: center; justify-content: center; gap: .85rem; min-height: 52px; padding: .8rem 1.25rem; border-radius: .75rem; font-weight: 700; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.primary-action { color: #fff !important; background: #183e48; box-shadow: 0 14px 30px rgba(24, 62, 72, .16); }
.secondary-action { color: #183e48 !important; border: 1px solid #c4d5d7; background: rgba(255,255,255,.7); }
.primary-action:hover, .secondary-action:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(24, 62, 72, .13); }
.hero-social { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.2rem; }
.hero-social a { color: #53646b; text-decoration: none; font-size: .88rem; font-weight: 600; }
.hero-social a:hover { color: #c44e2f; }
.hero-social i { margin-right: .3rem; }
.hero-feature { display: flex; min-height: 495px; flex-direction: column; justify-content: space-between; padding: 2rem; border-radius: 1.4rem; background: radial-gradient(circle at 85% 10%, rgba(79, 153, 154, .26), transparent 38%), linear-gradient(145deg, #173e48, #102831); color: #fff; box-shadow: 0 26px 55px rgba(27, 62, 70, .2); position: relative; overflow: hidden; }
.hero-feature:after { content: ""; position: absolute; width: 290px; height: 290px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; right: -95px; bottom: 80px; box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.02); }
.feature-topline, .feature-bottom { display: flex; align-items: center; gap: .7rem; z-index: 1; }
.feature-topline { color: #b6d7d6; font-size: .72rem; letter-spacing: .16em; font-weight: 700; }
.signal-dot { background: #95d2ae; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 5px rgba(149,210,174,.13); }
.feature-index { margin-left: auto; color: #84aeb3; }
.feature-center { z-index: 1; max-width: 330px; }
.feature-symbol { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 1rem; margin-bottom: 1.8rem; color: #f4a585; background: rgba(255,255,255,.08); font-size: 1.45rem; }
.feature-label { color: #abcccf; font-size: .84rem; font-weight: 700; margin-bottom: .7rem; }
.feature-center h2 { font-family: Fraunces, Georgia, serif; font-size: clamp(2rem, 2.65vw, 2.4rem); line-height: 1.2; font-weight: 500; letter-spacing: -.025em; margin-bottom: 1.2rem; }
.feature-center > p:last-child { color: #b5cccd; font-size: .9rem; }
.feature-bottom { flex-wrap: wrap; }
.feature-bottom span { border: 1px solid rgba(255,255,255,.17); color: #c9dddf; font-size: .73rem; padding: .3rem .6rem; border-radius: 99px; }
.hero-scroll { display: flex; gap: .7rem; align-items: center; color: #81939a; text-transform: uppercase; font-size: .68rem; font-weight: 700; letter-spacing: .16em; padding-top: 0; padding-bottom: 2.5rem; }
.hero-scroll span:last-child { font-size: 1.25rem; line-height: 0; }

.home-section { padding-top: clamp(4rem, 7vw, 7rem); padding-bottom: clamp(4rem, 7vw, 7rem); }
.home-page section { margin-top: 0; }
.home-section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2.3rem; }
.home-section-head h2, .home-about h2, .home-contact h2 { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: clamp(2.5rem, 4.2vw, 4.4rem); letter-spacing: -.04em; line-height: 1.12; margin-top: .8rem; }
.home-section-head > p { color: #617178; max-width: 390px; }
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.impact-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.5rem, 2vw, 2rem); display: flex; flex-direction: column; min-height: 275px; box-shadow: 0 12px 35px rgba(26, 56, 61, .04); }
.impact-number { color: #d46341; font-family: Fraunces, Georgia, serif; font-size: clamp(3.2rem, 5vw, 5rem); letter-spacing: -.06em; line-height: 1.1; }
.impact-number span { font-size: .55em; }
.impact-degree { font-size: clamp(3rem, 4vw, 4.2rem); }
.impact-card h3 { font-size: 1.08rem; margin: 1rem 0 .5rem; }
.impact-card p { color: #607077; font-size: .91rem; line-height: 1.65; }
.impact-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 1.4rem; color: #68817f; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }

.home-work { background: #eaf1ef; border-top: 1px solid #dae6e2; border-bottom: 1px solid #dae6e2; }
.text-link { display: inline-flex; align-items: center; gap: .7rem; color: #b94c2e; font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link:hover { color: #86391f; }
.featured-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.featured-card { background: #fff; border: 1px solid #d6e3df; border-radius: 1rem; overflow: hidden; box-shadow: 0 18px 40px rgba(31, 69, 70, .06); }
.featured-media { height: 265px; position: relative; overflow: hidden; background: #172e31; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; transition: transform .4s ease; }
.featured-card:hover .featured-media img { transform: scale(1.035); }
.media-tag { position: absolute; bottom: 1rem; left: 1rem; color: #fff; background: rgba(15, 38, 44, .88); border: 1px solid rgba(255,255,255,.15); border-radius: 99px; padding: .4rem .7rem; font-size: .68rem; font-weight: 700; letter-spacing: .04em; }
.churn-media { display: grid; place-items: center; background: radial-gradient(circle at center, #2d6d6e, #183c45 60%, #102e39); }
.churn-orbit { position: absolute; border: 1px solid rgba(216, 247, 237, .35); border-radius: 50%; }
.orbit-one { width: 240px; height: 240px; }
.orbit-two { width: 390px; height: 390px; }
.churn-orbit:before, .churn-orbit:after { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #ed9c79; box-shadow: 0 0 0 7px rgba(237,156,121,.12); }
.churn-orbit:before { top: 12%; left: 14%; }
.churn-orbit:after { right: 9%; bottom: 16%; background: #a4dfc7; }
.churn-core { width: 105px; height: 105px; border-radius: 50%; display: grid; place-items: center; background: #e8f2eb; color: #24535c; font-size: 2rem; z-index: 1; box-shadow: 0 0 0 20px rgba(255,255,255,.05); }
.featured-content { padding: 1.6rem 1.75rem 1.8rem; }
.featured-top { display: flex; justify-content: space-between; gap: .75rem; font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: #6c8285; text-transform: uppercase; }
.featured-content h3 { font-family: Fraunces, Georgia, serif; font-size: 1.65rem; font-weight: 500; letter-spacing: -.025em; margin: .8rem 0 .55rem; }
.featured-content p { color: #607077; font-size: .92rem; line-height: 1.7; min-height: 70px; }
.featured-content a { display: inline-flex; align-items: center; gap: .5rem; color: #b94c2e; text-decoration: none; font-weight: 700; margin-top: 1rem; }

.journey-list { border-top: 1px solid var(--line); }
.journey-row { display: grid; grid-template-columns: 150px 1.25fr 1fr 20px; align-items: center; gap: 1.25rem; color: var(--ink); padding: 1.35rem .25rem; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s ease, padding .2s ease; }
.journey-row:hover { background: #eef5f2; padding-left: .8rem; padding-right: .8rem; }
.journey-date { font-size: .82rem; color: #b65133; font-weight: 700; }
.journey-row strong, .journey-row small { display: block; }
.journey-row strong { font-size: 1rem; }
.journey-row small, .journey-row > span:nth-child(3) { color: #63757c; font-size: .85rem; }
.journey-row i { color: #b65133; }
.home-about { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; border-top: 1px solid var(--line); }
.home-about p:not(.section-kicker) { color: #53666d; font-size: 1.05rem; line-height: 1.8; margin-bottom: 1rem; }
.home-about .text-link { margin-top: .8rem; }
.home-contact { color: #fff; background: #153743; }
.home-contact-inner { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding-top: 5rem; padding-bottom: 5rem; }
.home-contact .section-kicker { color: #f09a78; }
.home-contact h2 { margin-bottom: 1rem; }
.home-contact p:not(.section-kicker) { color: #bed2d5; max-width: 540px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.home-contact .primary-action { color: #153743 !important; background: #efad8d; }
.home-contact .secondary-action { color: #fff !important; background: transparent; border-color: #739096; }
.home-page footer { background: #102e38; color: #bdd2d3; }
.home-page footer a { color: #fff; }

.case-repo-link { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.4rem; color: #b94c2e; font-weight: 700; text-decoration: none; }
.case-repo-link:hover { color: #86391f; }
.case-screenshot { margin: 0; overflow: hidden; border-radius: 1rem; border: 1px solid var(--line); background: #fff; }
.case-screenshot img { display: block; width: 100%; height: 190px; object-fit: cover; object-position: left top; }
.case-screenshot figcaption { font-size: .75rem; font-weight: 700; color: #667b80; padding: .6rem .8rem; }
.case-screenshot a { display: block; color: #28535e; }
.case-screenshot a:hover { color: #b94c2e; }
.case-screenshot a img { transition: opacity .2s ease; }
.case-screenshot a:hover img { opacity: .9; }
.cta-actions .primary-action { min-height: 44px; }
.contact-card a { overflow-wrap: anywhere; }
button:disabled { opacity: .65; cursor: wait; }

@media (max-width: 1080px) {
  .nav-links { gap: .65rem; }
  .nav-links li a { font-size: .76rem; }
  .site-brand > span:last-child { display: none; }
}
@media (max-width: 900px) {
  .home-hero-grid { grid-template-columns: 1fr; gap: 3rem; padding-top: 5rem; }
  .hero-feature { min-height: 380px; }
  .home-section-head { align-items: start; flex-direction: column; gap: .8rem; }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-card:last-child { grid-column: span 2; }
  .home-about { gap: 2.5rem; }
  .home-contact-inner { align-items: start; flex-direction: column; }
}
@media (max-width: 768px) {
  .nav-container { padding: .7rem 1rem; }
  .site-brand > span:last-child { display: inline; }
  .menu-toggle { display: inline-grid; place-items: center; margin-left: auto; }
  .nav-links { top: 100%; left: 0; width: 100%; padding: .65rem 1rem 1rem; box-shadow: 0 16px 25px rgba(16,45,56,.12); border-bottom: 1px solid var(--line); gap: 0; }
  .nav-links li { padding: 0; text-align: left; }
  .nav-links li a, .nav-links li:last-child a { display: block; padding: .8rem .6rem; border: 0; font-size: .96rem; }
  .home-hero h1 { font-size: clamp(3.4rem, 14vw, 5.5rem); }
  .home-hero-grid { padding-top: 3.5rem; }
  .hero-feature { min-height: 370px; }
  .hero-scroll { display: none; }
  .impact-grid, .featured-grid, .home-about { grid-template-columns: 1fr; }
  .impact-card:last-child { grid-column: auto; }
  .journey-row { grid-template-columns: 100px 1fr 20px; }
  .journey-row > span:nth-child(3) { display: none; }
  .home-contact-inner { padding-top: 4rem; padding-bottom: 4rem; }
}
@media (max-width: 480px) {
  .home-actions, .contact-actions { flex-direction: column; align-items: stretch; }
  .home-actions a, .contact-actions a { width: 100%; }
  .hero-social { gap: .8rem 1.2rem; }
  .featured-media { height: 210px; }
  .featured-top { flex-direction: column; gap: .2rem; }
  .journey-row { grid-template-columns: 1fr 20px; }
  .journey-date { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .primary-action, .secondary-action, .journey-row, .featured-media img { transition: none; }
}
