/* AlayaSetu homepage refinement. Loaded after existing homepage styles. */
.home-page {
  --maroon: #263c37;
  --green: #305c52;
  --gold: #b78d4d;
  --ink: #253b36;
  --muted: #62736b;
  --line: #e3dfd4;
  --paper: #fbf9f4;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}

.home-page .home-pad { padding: clamp(42px, 3.8vw, 68px) clamp(15px, 1.6vw, 30px); }
.home-page .home-eyebrow { font-size: 12px; line-height: 1.7; letter-spacing: .12em; color: #a17535; }
.home-page .home-lead { font-size: clamp(15px, 1.16vw, 19px); line-height: 1.85; color: #62716b; }
.home-page .home-note { font-size: 12px; line-height: 1.75; }
.home-page h1 { font-size: clamp(38px, 3.7vw, 66px); line-height: 1.43; }
.home-page h2 { font-size: clamp(31px, 2.9vw, 48px); line-height: 1.48; }
.home-page h3 { line-height: 1.45; }

/* A more legible, restrained header. */
.home-page .home-header {
  background: rgba(255, 253, 248, .96);
  border-bottom-color: #e4d8c4;
  box-shadow: 0 5px 22px rgba(38, 50, 43, .045);
}
.home-page .home-brand { font-size: 30px; }
.home-page .home-nav a { font-size: 14px; font-weight: 600; }
.home-page .home-tools #language { font-size: 12px; padding: 9px 12px; }

/* Hero: readable editorial typography, one strong photograph and useful actions. */
.home-page .home-hero {
  min-height: min(760px, 87svh);
  padding-top: clamp(26px, 3.6vw, 62px);
  padding-bottom: clamp(34px, 4vw, 65px);
  background: radial-gradient(circle at 86% 14%, #f8eeda 0, transparent 35%), #fbf9f4;
  grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr);
  gap: clamp(26px, 4.1vw, 72px);
}
.home-page .hero-art {
  height: clamp(420px, 41vw, 690px);
  border: 1px solid #e3d4b9;
  border-radius: 22px;
  box-shadow: 0 30px 66px rgba(76, 61, 39, .16);
}
.home-page .hero-details h1 { margin: 15px 0 18px; }
.home-page .hero-details h1 em { color: #305a4e; }
.home-page .hero-details .home-lead { max-width: 62ch; }
.home-page .home-search {
  margin-top: 25px;
  padding: 7px 7px 7px 18px;
  border-color: #d7d3c7;
  border-radius: 14px;
  box-shadow: 0 12px 34px rgba(48, 56, 46, .07);
}
.home-page .home-search input { font-size: 15px; padding: 12px 0; }
.home-page .home-search button { border-radius: 9px; font-size: 14px; padding: 13px 21px; background: #284d44; }
.home-page .service-shortcuts { gap: 10px; margin-top: 18px; }
.home-page .service-shortcuts a {
  border: 1px solid #e2dccc;
  border-radius: 13px;
  padding: 12px 8px;
  background: #fffefb;
  box-shadow: 0 6px 14px rgba(45, 55, 43, .045);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.home-page .service-shortcuts a:first-child { padding-left: 8px; }
.home-page .service-shortcuts a:last-child { border: 1px solid #e2dccc; padding-right: 8px; }
.home-page .service-shortcuts a:hover { transform: translateY(-2px); border-color: #c6ad7b; box-shadow: 0 12px 20px rgba(45,55,43,.09); }
.home-page .shortcut-symbol { font-size: 26px; }
.home-page .home-hero .home-note { margin-top: 15px !important; }

/* Scroll-story: one reserved visual stage, so sections never acquire empty holes. */
.scroll-story {
  position: relative;
  border-top: 1px solid #d9e3db;
  border-bottom: 1px solid #d9e3db;
  background: linear-gradient(140deg, #eaf2eb 0%, #f5f7ee 56%, #eaf1e9 100%);
}
.story-pin {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
  align-items: center;
  gap: clamp(26px, 5vw, 90px);
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: clamp(38px, 4vw, 70px) clamp(15px, 3vw, 58px);
}
.story-visual {
  position: relative;
  width: 100%;
  height: clamp(340px, 34vw, 580px);
  overflow: hidden;
  border-radius: 24px;
  background: #cdd8cf;
  isolation: isolate;
  box-shadow: 0 26px 60px rgba(28, 60, 46, .16);
}
.story-photo { position: absolute; overflow: hidden; margin: 0; border: 3px solid rgba(255,255,255,.94); border-radius: 18px; box-shadow: 0 8px 22px rgba(0,0,0,.14); }
.story-photo img { width: 100%; height: 100%; object-fit: cover; }
.story-photo-one { left: 0; top: 0; width: 48%; height: 48%; }
.story-photo-two { left: 52%; top: 0; width: 48%; height: 48%; }
.story-photo-three { left: 0; bottom: 0; width: 100%; height: 48%; }
.story-photo-one img { object-position: center 25%; }
.story-photo-two img { object-position: center; }
.story-photo-three img { object-position: center 52%; }
.story-caption { position: absolute; bottom: 15px; left: 17px; z-index: 4; padding: 5px 11px; background: #fcfaf1ed; border-radius: 30px; font-size: 11px; font-weight: 700; color: #345c50; }
.story-copy { position: relative; display: grid; gap: 18px; }
.story-step {
  position: relative;
  border: 1px solid #d9e5da;
  border-radius: 18px;
  padding: clamp(22px, 2.2vw, 38px);
  background: #fffffff0;
  box-shadow: 0 10px 24px rgba(53, 79, 60, .045);
}
.story-index { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 17px; color: #9b793f; font-size: 13px; font-weight: 800; letter-spacing: .11em; }
.story-index::before { content: ''; width: 24px; height: 1px; background: #b99557; }
.story-step h2 { margin: 10px 0 16px; font-size: clamp(29px, 2.65vw, 46px); }
.story-step .home-lead { max-width: 55ch; }
.story-step .home-button { margin-top: 24px; }
.story-step .home-note { margin-top: 14px !important; }
.story-step .home-text-link { margin-top: 16px; }
.story-step .preview-badge { font-size: 12px; padding: 6px 13px; background: #f7f2e5; }
.story-step .home-button { background: #2f594e; border-color: #2f594e; font-size: 14px; border-radius: 10px; }
.story-step .outline-button { background: #fff; color: #2e554a; }
.story-note { display: block; margin-top: 15px; color: #648072; font-size: 12px; }
.story-darshan-anchor, .story-seva-anchor { position: absolute; left: 0; width: 1px; height: 1px; scroll-margin-top: 100px; }
.story-darshan-anchor { top: 22%; }
.story-seva-anchor { top: 46%; }

/* Enhanced mode is enabled only for desktop users without reduced-motion settings. */
.scroll-story.story-enhanced { height: 290vh; }
.scroll-story.story-enhanced .story-pin {
  position: sticky;
  top: 78px;
  height: calc(100svh - 78px);
  min-height: 0;
  overflow: hidden;
}
.scroll-story.story-enhanced .story-visual {
  height: min(580px, 34vw, calc(100svh - 138px));
}
.scroll-story.story-enhanced .story-photo-one { width: 100%; height: 100%; }
.scroll-story.story-enhanced .story-photo-two,
.scroll-story.story-enhanced .story-photo-three { opacity: 0; }
.scroll-story.story-enhanced .story-copy { height: min(560px, calc(100svh - 138px)); display: block; }
.scroll-story.story-enhanced .story-step { position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(16px); transition: opacity .32s ease, transform .32s ease, visibility .32s; }
.scroll-story.story-enhanced .story-step.is-active { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }

@media (min-width: 801px) and (max-height: 719px) {
  .scroll-story.story-enhanced .story-pin { padding-block: 12px; }
  .scroll-story.story-enhanced .story-visual,
  .scroll-story.story-enhanced .story-copy { height: calc(100svh - 112px); }
  .scroll-story.story-enhanced .story-step { padding: clamp(14px, 2vh, 22px); }
  .scroll-story.story-enhanced .story-step h2 { font-size: clamp(25px, 3.4vh, 33px); margin-block: 4px 9px; }
  .scroll-story.story-enhanced .story-step .home-lead { font-size: 13px; line-height: 1.6; }
  .scroll-story.story-enhanced .story-step .home-button { margin-top: 12px; }
}

/* Discovery cards: distinct surfaces rather than a flat list of images. */
.home-page .discovery-section { background: #f9f5ec; border-top-color: #e3dbc9; }
.home-page .section-heading h2 { margin-top: 7px; }
.home-page .section-sub { font-size: 13px; line-height: 1.6; margin-top: 13px !important; }
.home-page .temple-previews { gap: clamp(14px, 1.8vw, 28px); margin-top: 26px; }
.home-page .temple-preview { overflow: hidden; border-radius: 18px; border: 1px solid #e2d7c5; background: white; box-shadow: 0 14px 34px rgba(67,55,35,.07); transition: transform .2s ease, box-shadow .2s ease; }
.home-page .temple-preview:hover { transform: translateY(-4px); box-shadow: 0 24px 42px rgba(67,55,35,.11); }
.home-page .temple-preview > img { height: clamp(190px, 18vw, 300px); border-radius: 0; }
.home-page .temple-preview > div { padding: clamp(18px, 1.7vw, 26px); }
.home-page .temple-preview p { font-size: 13px; }
.home-page .temple-preview h3 { font-size: clamp(19px, 1.7vw, 25px); margin-top: 6px; }
.home-page .temple-preview button { margin-top: 12px; font-size: 14px; font-weight: 700; }

/* A strong contrast break makes events feel like a new chapter. */
.home-page .events-section { background: #24483f; color: #fff9ed; border-color: #24483f; }
.home-page .events-section h2 { color: #fff9ed; }
.home-page .events-section .home-eyebrow { color: #e1be7d; }
.home-page .events-section .home-note { color: #d7e4dc; }
.home-page .event-previews { gap: 14px; margin-top: 24px; }
.home-page .event-preview { border: 1px solid #577368; background: #31564c; border-radius: 15px; padding: 24px; color: white; transition: transform .2s ease, background .2s ease; }
.home-page .event-preview:hover { background: #396357; color: white; transform: translateY(-2px); }
.home-page .event-preview .event-symbol { color: #eac68c; font-size: 34px; }
.home-page .event-preview small { color: #e2c18a; font-size: 10px; }
.home-page .event-preview strong { font-size: clamp(16px, 1.3vw, 20px); color: #fffdf6; }

/* End on a calm, warm message. */
.home-page .about-section { background: radial-gradient(circle at 50% 0, #f8ead1, #fbf7ed 65%); border-top: 1px solid #e6dcc8; }
.home-page .about-section h2 { max-width: 900px; margin: 12px auto 18px; }
.home-page .about-section .home-lead { max-width: 790px; }
.home-page .about-section .home-text-link { margin-top: 22px; font-size: 14px; font-weight: 700; }
.home-page .site-footer { background: #1b3832; border-top: 3px solid #b99355; }
.home-page .site-footer strong, .home-page .site-footer h3 { color: #fffbf2; }
.home-page .site-footer a { color: #e2eee5; }
.home-page .site-footer p, .home-page .site-footer .foot-bottom { color: #c1d2c8; }

@media (max-width: 1100px) {
  .home-page .home-hero { gap: 27px; }
  .home-page .home-nav a { font-size: 12px; }
  .story-pin { gap: 27px; }
  .story-step { padding: 22px; }
  .story-step h2 { font-size: 32px; }
}

@media (max-width: 800px) {
  .home-page .home-hero { min-height: auto; }
  .scroll-story.story-enhanced { height: auto; }
  .scroll-story.story-enhanced .story-pin { position: relative; top: auto; height: auto; min-height: 0; overflow: visible; }
  .story-pin { grid-template-columns: 1fr; padding: 36px 16px; }
  .story-visual { height: clamp(300px, 52vw, 460px); }
  .story-copy { gap: 15px; }
  .story-step h2 { font-size: 32px; }
  .story-darshan-anchor, .story-seva-anchor { position: static; }
}

@media (max-width: 700px) {
  .home-page .home-pad { padding: 32px 14px; }
  .home-page .home-header { padding-inline: 14px; }
  .home-page .home-brand { font-size: 25px; }
  .home-page .home-hero { padding-top: 17px; padding-bottom: 30px; gap: 22px; }
  .home-page .hero-art { height: 310px; border-radius: 16px; }
  .home-page h1 { font-size: clamp(34px, 7.3vw, 45px); }
  .home-page h2 { font-size: 31px; }
  .home-page .home-lead { font-size: 15px; line-height: 1.8; }
  .home-page .home-eyebrow { font-size: 10px; }
  .home-page .home-search input { font-size: 13px; }
  .home-page .home-search button { font-size: 12px; padding: 12px; }
  .home-page .service-shortcuts a { font-size: 11px; padding: 9px 6px; }
  .home-page .service-shortcuts a:first-child { padding-left: 6px; }
  .home-page .service-shortcuts a:last-child { padding-right: 6px; }
  .home-page .shortcut-symbol { font-size: 23px; }
  .story-pin { padding: 30px 14px; }
  .story-visual { height: 300px; border-radius: 15px; }
  .story-step { padding: 22px; }
  .story-step h2 { font-size: 30px; }
  .home-page .temple-previews { gap: 18px; }
  .home-page .temple-preview > img { height: 225px; }
  .home-page .temple-preview h3 { font-size: 22px; }
  .home-page .event-previews { gap: 12px; }
  .home-page .event-preview { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .temple-preview, .home-page .event-preview, .home-page .service-shortcuts a { transition: none; transform: none !important; }
}

/* Mobile version of the three-photo Alayala Kathalu scroll story. */
@media (max-width: 800px) and (min-height: 580px) {
  .scroll-story.story-mobile-enhanced {
    height: 235svh;
    overflow: clip;
  }
  .scroll-story.story-mobile-enhanced .story-pin {
    position: sticky;
    top: 78px;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: calc(100svh - 78px);
    min-height: 0;
    padding: 12px 14px;
    gap: 12px;
    overflow: hidden;
  }
  .scroll-story.story-mobile-enhanced .story-visual {
    flex: 0 0 auto;
    width: 100%;
    height: clamp(170px, 31svh, 280px);
    border-radius: 15px;
    box-shadow: 0 12px 27px rgba(28, 60, 46, .13);
  }
  .scroll-story.story-mobile-enhanced .story-photo {
    border-width: 2px;
    border-radius: 11px;
  }
  .scroll-story.story-mobile-enhanced .story-photo-one {
    width: 100%;
    height: 100%;
  }
  .scroll-story.story-mobile-enhanced .story-photo-two,
  .scroll-story.story-mobile-enhanced .story-photo-three { opacity: 0; }
  .scroll-story.story-mobile-enhanced .story-caption {
    bottom: 9px;
    left: 9px;
    max-width: calc(100% - 18px);
    font-size: 9px;
    padding: 4px 8px;
  }
  .scroll-story.story-mobile-enhanced .story-copy {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    flex: 1;
  }
  .scroll-story.story-mobile-enhanced .story-step {
    position: absolute;
    inset: 0;
    padding: clamp(13px, 3.5vw, 20px);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .scroll-story.story-mobile-enhanced .story-step.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .scroll-story.story-mobile-enhanced .story-index {
    font-size: 11px;
    margin-bottom: 6px;
  }
  .scroll-story.story-mobile-enhanced .story-step h2 {
    margin: 3px 0 9px;
    font-size: clamp(23px, 5.7vw, 32px);
    line-height: 1.42;
  }
  .scroll-story.story-mobile-enhanced .story-step .home-lead {
    font-size: 12px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  .scroll-story.story-mobile-enhanced .story-step .home-button {
    margin-top: 11px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
  }
  .scroll-story.story-mobile-enhanced .story-step .home-note {
    margin-top: 7px !important;
    font-size: 10px;
    line-height: 1.55;
  }
  .scroll-story.story-mobile-enhanced .story-step .home-text-link {
    margin-top: 6px;
    font-size: 11px;
  }
  .scroll-story.story-mobile-enhanced .story-step .preview-badge {
    padding: 2px 8px;
    font-size: 10px;
  }
  .scroll-story.story-mobile-enhanced .story-note {
    font-size: 10px;
    margin-top: 8px;
  }
  .scroll-story.story-mobile-enhanced .story-darshan-anchor {
    position: absolute;
    top: 32%;
    left: 0;
    scroll-margin-top: 78px;
  }
  .scroll-story.story-mobile-enhanced .story-seva-anchor {
    position: absolute;
    top: 56%;
    left: 0;
    scroll-margin-top: 78px;
  }
}
@media (max-width: 700px) and (min-height: 580px) {
  .scroll-story.story-mobile-enhanced .story-pin {
    top: 70px;
    height: calc(100svh - 70px);
  }
  .scroll-story.story-mobile-enhanced .story-darshan-anchor,
  .scroll-story.story-mobile-enhanced .story-seva-anchor { scroll-margin-top: 70px; }
}
@media (max-width: 800px) and (min-height: 580px) and (max-height: 679px) {
  .scroll-story.story-mobile-enhanced .story-visual { height: clamp(145px, 26svh, 175px); }
  .scroll-story.story-mobile-enhanced .story-step h2 { font-size: clamp(22px, 5.2vw, 27px); }
  .scroll-story.story-mobile-enhanced .story-step .home-lead { font-size: 11.5px; line-height: 1.55; }
  .scroll-story.story-mobile-enhanced .story-step .home-button { margin-top: 8px; padding: 7px 12px; }
}
