:root {
  color-scheme: light;
  --green: #004b31;
  --deep: #062c23;
  --darker: #031e18;
  --gold: #f5ca53;
  --cream: #f8f6ed;
  --leaf: #e8eee2;
  --ink: #152d23;
  --muted: #42564b;
  --rule: #cbd6c9;
  --header: 72px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: calc(var(--header) + 1rem); }
body.sunlife-home { margin: 0; background: var(--cream); color: var(--ink); font: 1rem/1.55 var(--sans); }
.sunlife-home :is(p, h1, h2, h3, figure, blockquote, ol, ul) { margin: 0; }
.sunlife-home img { display: block; max-width: 100%; }
.sunlife-home a { color: inherit; }
.sunlife-home button { font: inherit; }
.sunlife-home :focus-visible { outline: 3px solid #ae7600; outline-offset: 4px; }
.home-wrap { width: min(100% - var(--gutter) * 2, 1250px); margin-inline: auto; }
.home-skip { position: fixed; z-index: 30; top: .5rem; left: 1rem; padding: .65rem 1rem; background: white; transform: translateY(-150%); }
.home-skip:focus { transform: none; }
.sunlife-home :is(h1, h2, h3) { font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }
.sunlife-home h2 { font-size: clamp(2.35rem, 5.1vw, 4.75rem); }
.sunlife-home h3 { font-size: clamp(1.8rem, 4.2vw, 3.8rem); }
.home-kicker { color: var(--green); font-size: .76rem; font-weight: 800; letter-spacing: .14em; line-height: 1.4; text-transform: uppercase; }
.home-lede { color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.2rem); max-width: 49ch; }
.home-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .95rem 1.4rem; }
.home-button { display: inline-flex; justify-content: center; align-items: center; gap: .8rem; min-height: 45px; padding: .64rem 1rem; border: 1px solid transparent; border-radius: .2rem; font-weight: 750; line-height: 1.25; text-decoration: none; }
.home-button:hover { filter: brightness(.94); }
.home-button-gold { background: var(--gold); color: var(--darker) !important; }
.home-text-link { display: inline-flex; gap: .4rem; align-items: center; min-height: 44px; font-weight: 700; text-underline-offset: .25em; }

.home-header { position: sticky; top: 0; z-index: 20; background: #fffef9; border-bottom: 1px solid var(--rule); }
.home-header-inner { min-height: calc(var(--header) - 1px); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.home-logo { flex: none; }
.home-logo img { width: clamp(8.2rem, 13.5vw, 12.5rem); height: auto; }
.home-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: clamp(.55rem, 1.45vw, 1.6rem); }
.home-nav a:not(.home-button) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: .9rem; text-decoration: none; }
.home-nav a:not(.home-button):hover { text-decoration: underline; text-underline-offset: .25em; }
.home-nav .home-language { border-left: 1px solid var(--rule); padding-left: .85rem; }
.home-nav .nav-quote { background: var(--green); color: #fff; }
.home-menu-toggle { display: none; }

.home-hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: min(760px, calc(100svh - var(--header))); overflow: clip; background: #284c3d; color: var(--cream); }
.home-hero::after { position: absolute; inset: 0; z-index: 1; pointer-events: none; content: ""; background: linear-gradient(90deg, rgba(3, 30, 24, .68) 0%, rgba(3, 30, 24, .42) 32%, rgba(3, 30, 24, .12) 56%, transparent 76%); }
.home-hero-copy { position: relative; z-index: 2; display: grid; gap: clamp(.9rem, 2vw, 1.7rem); justify-items: start; width: min(100% - var(--gutter) * 2, 1250px); min-width: 0; margin-inline: auto; padding-block: clamp(3rem, 8vh, 6rem); }
.home-hero .home-kicker, .home-contact .home-kicker { color: var(--gold); }
.home-hero .home-kicker { text-shadow: 0 .1rem .32rem rgba(0,0,0,.58); }
.home-hero h1 { max-width: 10.5ch; font-size: clamp(3.2rem, 6.2vw, 6.7rem); text-shadow: 0 .12rem .45rem rgba(0,0,0,.35); }
html[lang="es"] .home-hero h1 { max-width: 11.5ch; font-size: clamp(3rem, 5.8vw, 6.2rem); }
.home-hero-lede { color: #f3f6ef; max-width: 40ch; font-size: clamp(1.04rem, 1.55vw, 1.22rem); font-weight: 650; text-shadow: 0 .1rem .35rem rgba(0,0,0,.42); }
.home-hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #284c3d; }
.home-hero-frames { position: absolute; inset: 0; }
.home-hero-frame { position: absolute; inset: 0; opacity: 0; visibility: hidden; }
.home-hero-frame.is-current { opacity: 1; }
.home-animated .home-hero-frame { transition: opacity 780ms ease, visibility 0s linear 780ms; }
.home-animated .home-hero-frame.is-current { visibility: visible; transition: opacity 780ms ease; }
.home-hero-frame:first-child { visibility: visible; }
.home-hero-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.035); }
.home-animated .home-hero-frame.is-current img { animation: home-hero-zoom 6000ms linear both; }
.home-hero-media.is-paused .home-hero-frame img { animation-play-state: paused; }
.home-hero-frame:first-child img { object-position: 72% center; }
.home-hero-frame:nth-child(2) img { object-position: 72% center; }
.home-hero-frame:nth-child(3) img { object-position: 28% center; }
.home-hero-controls { position: absolute; z-index: 3; right: max(var(--gutter), calc((100vw - 1250px) / 2)); bottom: clamp(1rem, 3vw, 2rem); display: flex; align-items: center; gap: .05rem; padding: .05rem .25rem; border: 1px solid #ffffff63; border-radius: 999px; background: rgba(6, 44, 35, .78); color: white; backdrop-filter: blur(10px); }
.home-hero-controls button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; background: transparent; color: inherit; cursor: pointer; }
.home-hero-controls button[data-home-slide-select]::after { content: ""; width: .55rem; height: .55rem; border: 1px solid white; border-radius: 50%; }
.home-hero-controls button[aria-pressed="true"]::after { background: var(--gold); border-color: var(--gold); }
.home-chevron { width: .68rem; height: .68rem; border-top: 2px solid currentColor; border-right: 2px solid currentColor; }
.home-chevron-prev { transform: rotate(-135deg); }
.home-chevron-next { transform: rotate(45deg); }
.home-playback-icon { position: relative; display: block; width: .72rem; height: .86rem; }
.home-playback[data-playing="true"] .home-playback-icon::before,
.home-playback[data-playing="true"] .home-playback-icon::after { position: absolute; top: 0; width: 2px; height: 100%; background: currentColor; content: ""; }
.home-playback[data-playing="true"] .home-playback-icon::before { left: .14rem; }
.home-playback[data-playing="true"] .home-playback-icon::after { right: .14rem; }
.home-playback[data-playing="false"] .home-playback-icon::before { position: absolute; inset: 0; width: 0; height: 0; margin: auto; border-block: .43rem solid transparent; border-left: .68rem solid currentColor; content: ""; }
@keyframes home-hero-zoom { from { transform: scale(1.035); } to { transform: scale(1.115); } }

.home-intro { padding: clamp(3.5rem, 8vw, 8rem) 0; }
.home-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); gap: clamp(2rem, 6vw, 6.5rem); align-items: center; }
.home-intro-media { position: relative; background: var(--leaf); }
.home-intro-media::after { position: absolute; inset: .75rem .75rem -.75rem -.75rem; z-index: -1; content: ""; border: 1px solid #a0ad97; }
.home-intro-media img { width: 100%; height: auto; }
.home-intro-copy, .home-section-heading { display: grid; gap: 1rem; justify-items: start; }
.home-proof { list-style: none; padding: 0; width: 100%; border-block: 1px solid var(--rule); }
.home-proof li { display: flex; align-items: baseline; gap: .55rem; padding: .46rem 0; font-size: .9rem; font-weight: 700; }
.home-proof li::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--green); flex: none; }
.home-review { display: grid; gap: .25rem; font-size: .87rem; }
.home-stars { color: #865b08; letter-spacing: .14em; }
.home-review blockquote { font: italic 1.25rem/1.25 var(--serif); }
.home-review p { color: var(--muted); }

.home-services { background: var(--leaf); padding: clamp(3.5rem, 7vw, 7rem) 0; }
.home-service-stack { display: grid; gap: 1rem; margin-top: clamp(1.8rem, 4vw, 3rem); }
.home-service-card { --stack-index: 0; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: stretch; background: #fffdf5; border: 1px solid #c4cebf; border-radius: .45rem; overflow: clip; }
.home-service-card:nth-child(2) { --stack-index: 1; background: #f2ead7; }
.home-service-card:nth-child(3) { --stack-index: 2; background: #e1eadf; }
.home-service-media { display: grid; place-items: center; min-width: 0; min-height: 0; background: #263f32; }
.home-service-media img { width: 100%; height: 100%; object-fit: contain; }
.home-service-copy { align-self: center; padding: clamp(1.25rem, 3.7vw, 3.5rem); display: grid; justify-items: start; gap: clamp(.55rem, 2vw, 1.2rem); }
.home-service-copy p { max-width: 37ch; font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--muted); }
.home-service-copy a { color: var(--green); }
.home-animated .home-service-stack { gap: max(88px, 12svh); padding-bottom: max(88px, 12svh); }
.home-animated .home-service-card {
  position: sticky;
  top: calc(var(--header) + 10px + var(--stack-index) * 16px);
  z-index: calc(var(--stack-index) + 1);
  min-height: min(24rem, calc(100svh - var(--header) - 54px - var(--stack-index) * 16px));
  transform: translateY(var(--stack-lift, 42px)) scale(var(--stack-scale, .972));
  transform-origin: top center;
}

.home-process { background: #f8f2e3; }
.home-signature { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "copy lane"; min-height: 31rem; overflow: clip; }
.home-signature-lane { grid-area: lane; position: relative; display: grid; place-items: center; min-width: 0; overflow: clip; pointer-events: none; background: radial-gradient(ellipse at center, #dce9d5, #cbdcc7 66%, #c5d7c2); }
.home-signature-object { width: min(69%, 28rem); position: relative; z-index: 1; }
.home-signature-object img { width: 100%; height: auto; }
.home-animated .home-signature-object { transform: translate(var(--signature-x, 0px), var(--signature-y, 0px)) rotate(var(--signature-angle, 0deg)); }
.home-signature-copy { grid-area: copy; z-index: 2; min-width: 0; padding: clamp(2.5rem, 6.8vw, 6rem) clamp(1.4rem, 4vw, 4.2rem) clamp(2.5rem, 6.8vw, 6rem) max(var(--gutter), calc((100vw - 1250px) / 2)); align-self: center; display: grid; gap: 1rem; }
.home-signature-steps { display: grid; gap: .2rem; width: min(100%, 37rem); padding: .6rem 0 0; list-style: none; }
.home-signature-steps li { display: grid; grid-template-columns: 2.3rem 1fr; align-items: baseline; gap: .55rem; padding: .55rem 0; border-top: 1px solid var(--rule); }
.home-signature-steps span { color: var(--green); font-size: .78rem; font-weight: 850; letter-spacing: .12em; }
.home-signature-steps strong { font-size: .97rem; }

.home-contact { position: relative; z-index: 4; padding: clamp(3.4rem, 8vw, 7.5rem) 0; background: var(--green); color: var(--cream); }
.home-contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 1.75rem 3rem; align-items: end; }
.home-contact-inner > div:first-child { display: grid; gap: 1rem; }
.home-contact .home-lede { color: #e0eee1; }
.home-footer { padding: clamp(2.5rem, 5vw, 4.75rem) 0 1rem; color: #f7f7eb; background: var(--darker); }
.home-footer-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 1.25rem 3rem; }
.home-footer h2 { font: 800 .82rem/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--gold); margin-bottom: .7rem; }
.home-footer-logo img { width: min(100%, 12rem); }
.home-footer-links { display: grid; justify-items: start; }
.home-footer-links a { overflow-wrap: anywhere; }
.home-footer-bottom { display: flex; flex-wrap: wrap; gap: .75rem 1.4rem; justify-content: space-between; border-top: 1px solid #546c5e; padding-top: 1rem; margin-top: 2rem; color: #d8e0d8; font-size: .85rem; }

.home-animated [data-home-reveal] {
  --entry-x: -16px;
  --entry-y: 0px;
  opacity: 0;
  transform: translate(var(--entry-x), var(--entry-y));
  transition: opacity 820ms var(--ease), transform 820ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.home-animated [data-motion-stack] [data-home-reveal] { --entry-x: 0px; --entry-y: 16px; }
.home-animated [data-home-reveal].home-revealed,
.home-animated [data-home-reveal]:focus-visible { opacity: 1; transform: none; }
.home-resetting [data-home-reveal] { transition: none !important; }

@media (max-width: 960px) {
  .home-contact-inner { grid-template-columns: 1fr; }
  .home-service-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 840px) {
  :root { --header: 64px; }
  .home-header-inner { flex-wrap: wrap; }
  .home-header:not(.home-nav-enabled) .home-nav { width: 100%; justify-content: flex-start; padding-bottom: .6rem; }
  .home-nav-enabled .home-menu-toggle { display: grid; align-content: center; gap: 4px; width: 48px; height: 44px; border: 1px solid var(--rule); border-radius: .2rem; background: #fffef9; padding: 0 12px; cursor: pointer; }
  .home-menu-toggle span { width: 100%; height: 2px; background: var(--green); }
  .home-nav-enabled .home-nav { position: absolute; inset: 100% 0 auto; display: none; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; background: #fffef9; padding: .8rem var(--gutter) 1.2rem; border-bottom: 1px solid var(--rule); box-shadow: 0 .6rem 1.2rem #062c2326; max-height: calc(100dvh - var(--header)); overflow: auto; }
  .home-nav-enabled .home-nav.is-open { display: flex; }
  .home-nav-enabled .home-nav a:not(.home-button) { border: 0; border-bottom: 1px solid var(--rule); padding: .45rem 0; }
  .home-nav-enabled .nav-quote { align-self: start; margin-top: .65rem; }
}

@media (max-width: 767px) {
  .home-animated [data-home-reveal] { --entry-x: -13px; transition-duration: 680ms; }
  .home-animated [data-motion-stack] [data-home-reveal] { --entry-x: 0px; --entry-y: 13px; }
  .home-intro-grid { grid-template-columns: 1fr; }
  .home-intro-media { width: min(100%, 32rem); }
  .home-service-card { grid-template-columns: 1fr; grid-template-rows: minmax(0, min(32svh, 15rem)) auto; }
  .home-animated .home-service-card { min-height: 0; }
  .home-signature { grid-template-columns: 1fr; grid-template-areas: "copy" "lane"; min-height: 0; }
  .home-signature-copy { padding: 3.1rem var(--gutter) 2.35rem; }
  .home-signature-lane { min-height: clamp(15rem, 65vw, 22rem); }
  .home-signature-object { width: min(48%, 12rem); }
  .home-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .home-hero { min-height: calc(100svh - var(--header)); }
  .home-hero::after { background: linear-gradient(180deg, rgba(3, 30, 24, .64) 0%, rgba(3, 30, 24, .42) 42%, rgba(3, 30, 24, .12) 64%, transparent 82%); }
  .home-hero-copy { align-self: start; gap: .9rem; padding-block: clamp(2.4rem, 7vh, 4rem) 7rem; }
  .home-hero h1 { max-width: 100%; font-size: clamp(2.2rem, 9.15vw, 3.75rem); }
  html[lang="es"] .home-hero h1 { max-width: 100%; font-size: clamp(2.15rem, 9vw, 3.65rem); }
  .home-hero-lede { max-width: 32ch; }
  .home-hero .home-actions { align-items: flex-start; flex-direction: column; gap: .3rem; }
  .home-hero-frame:first-child img { object-position: 58% center; }
  .home-hero-frame:nth-child(2) img,
  .home-hero-frame:nth-child(3) img { object-position: center; }
  .home-hero-controls { right: 50%; bottom: 1rem; transform: translateX(50%); }
}

@media (max-width: 380px) {
  .home-actions { gap: .35rem .8rem; }
  .home-service-card { grid-template-rows: minmax(0, min(28svh, 14rem)) auto; }
}

@media (max-height: 560px) {
  .home-animated .home-service-card { position: static; transform: none; }
  .home-animated .home-service-stack { gap: 1rem; padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sunlife-home *, .sunlife-home *::before, .sunlife-home *::after { animation: none !important; transition: none !important; }
}

.home-hero-frame picture { display: block; width: 100%; height: 100%; }
.home-service-media picture { display: block; width: 100%; height: 100%; min-height: 0; }
.home-signature-object picture { display: block; }
.home-signature-lane { grid-row: 1; }
@media (max-width: 767px) { .home-signature-lane { grid-row: 2; } }
@media (max-width: 700px) {
  .home-service-media picture { max-height: min(32svh, 15rem); }
}
