/* Visit section: one card per branch. The booking form is kept hidden here and only shown as a popup. */
.visit__head { max-width: 760px; margin-bottom: clamp(24px, 4vw, 40px); }
.branches { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 36px); align-items: stretch; }
.branch { display: flex; flex-direction: column; background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); border-top: 6px solid var(--vision); }
.branch--hearing { border-top-color: var(--hearing); }
.branch__map { background: var(--line); }
.branch__map iframe { display: block; width: 100%; height: clamp(220px, 26vw, 300px); border: 0; }
.branch__body { display: flex; flex-direction: column; gap: 16px; flex: 1; padding: clamp(20px, 3vw, 32px); }
.branch__name { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.branch__list { display: grid; gap: 14px; }
.branch__list li { display: flex; gap: 12px; align-items: flex-start; }
.branch__list .icon { flex: none; width: 24px; height: 24px; margin-top: 2px; color: var(--brand); }
.branch__list a { font-weight: 700; font-size: 1.125rem; }
.branch__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.btn--ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px #c5ccda; }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
/* The booking form only shows as a popup. */
.booking { display: none; }
body.booking-open .booking { display: block; }
@media (max-width: 860px) {
	.branches { grid-template-columns: 1fr; }
	.branch__actions .btn { flex: 1; text-align: center; }
}

/* hero secondary links: distinct colour per side */
.hero__half--vision .link-quiet { color: #5a2400; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero__half--hearing .link-quiet { color: #ffd479; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* New artwork: keep faces and text in frame, and match backdrops */
#kids .panel__media img, #lenses .panel__media img, #contact-lenses .panel__media img, #sun .panel__media img, #blue-cut .panel__media img { object-position: 50% 50%; }
.twin--hearing #hearing-styles .panel__media { background: #eaf5f7; }
.twin--hearing #hearing-styles .panel__media img { aspect-ratio: 4 / 3; }

/* Brands section (dark showcase) */
.bx { background: #0a0b0f; color: #fff; padding-block: clamp(56px, 7vw, 96px); }
.bx__head { display: flex; align-items: center; gap: clamp(20px, 4vw, 48px); margin-bottom: clamp(32px, 5vw, 56px); }
.bx__icon { flex: none; width: clamp(110px, 16vw, 190px); height: auto; }
.bx__title { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.1; color: #fff; }
.bx__lede { margin-top: 10px; color: rgb(255 255 255 / 72%); max-width: 56ch; font-size: clamp(1rem, 1.2vw, 1.125rem); }
.bg + .bg { margin-top: clamp(40px, 6vw, 72px); }
.bg__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid rgb(255 255 255 / 14%); }
.bg__title { font-size: clamp(1.2rem, 1.8vw, 1.5rem); color: #fff; }
.bg--lens .bg__title { border-left: 5px solid #f0a030; padding-left: 12px; }
.bg--contact .bg__title { border-left: 5px solid #14949b; padding-left: 12px; }
.bg--hearing .bg__title { border-left: 5px solid #e1251b; padding-left: 12px; }
.bg__note { color: rgb(255 255 255 / 62%); font-size: 0.95rem; }
.bg__logos { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.bg__logos li { border-radius: 16px; overflow: hidden; background: #000; border: 1px solid rgb(255 255 255 / 12%); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.bg__logos li:hover { transform: translateY(-4px); border-color: rgb(255 255 255 / 40%); box-shadow: 0 14px 30px -14px rgb(0 0 0 / 80%); }
.bg__logos img { display: block; width: 100%; height: auto; }
.bg__lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: clamp(10px, 1.4vw, 18px); margin-top: clamp(14px, 2vw, 22px); }
.bg__lines > li { background: #14161d; border: 1px solid rgb(255 255 255 / 10%); border-radius: 16px; padding: 0 0 12px; overflow: hidden; }
.bg__lines strong { display: block; padding: 10px 16px; background: var(--b); color: var(--f); font-size: 1rem; letter-spacing: 0.01em; }
.bg__lines ul { margin: 10px 0 0; padding: 0 16px; }
.bg__lines ul li { padding: 8px 0; border-bottom: 1px solid rgb(255 255 255 / 10%); color: #fff; font-weight: 600; font-style: italic; font-size: 1rem; }
.bg__lines ul li:last-child { border-bottom: 0; }
@media (max-width: 900px) {
	.bg__logos { grid-template-columns: repeat(2, 1fr); }
	.bx__head { flex-direction: column; align-items: flex-start; }
}

/* Tagline inside the logo, under the text, as in the original artwork */
.brand { --bh: 72px; display: block; position: relative; text-decoration: none; }
.brand .brand__img { height: var(--bh); width: auto; display: block; }
.brand__tag { position: absolute; left: 36.5%; right: 0; top: 87.5%; display: flex; align-items: center; gap: 4%; margin: 0; font-size: calc(var(--bh) * 0.078); line-height: 1; font-weight: 500; letter-spacing: 0; white-space: nowrap; color: #2b2b2b; }
.brand__tag::before, .brand__tag::after { content: ""; flex: 1 1 0; min-width: 4px; height: 1.5px; background: #d62828; border-radius: 2px; }
.brand__tag span { flex: none; }
@media (max-width: 900px) { .brand { --bh: 62px; } }

/* Brands: soft light background instead of dark */
.bx { background: linear-gradient(180deg, #eef4fb 0%, #f7f3ea 100%); color: var(--ink, #16203a); }
.bx__title, .bg__title { color: var(--ink, #16203a); }
.bx__lede, .bg__note { color: var(--ink-2, #4a5470); }
.bg__head { border-bottom-color: rgb(22 32 58 / 14%); }
.bg__logos li { border-color: rgb(22 32 58 / 10%); box-shadow: 0 8px 22px -14px rgb(22 32 58 / 45%); }
.bg__logos li:hover { border-color: rgb(22 32 58 / 25%); box-shadow: 0 16px 30px -14px rgb(22 32 58 / 55%); }
.bg__lines > li { background: #fff; border-color: rgb(22 32 58 / 10%); box-shadow: 0 8px 22px -16px rgb(22 32 58 / 40%); }
.bg__lines ul li { color: var(--ink, #16203a); border-bottom-color: rgb(22 32 58 / 10%); }
.bx__icon { filter: drop-shadow(0 8px 14px rgb(22 32 58 / 25%)); border-radius: 18px; }
.bg--contact .bg__logos li { background: transparent; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.bg--contact .bg__logos img { border-radius: 20px; box-shadow: 0 10px 24px -14px rgb(22 32 58 / 55%); transition: transform 0.25s; }
.bg--contact .bg__logos li:hover { transform: none; box-shadow: none; }
.bg--contact .bg__logos li:hover img { transform: translateY(-4px); }

/* Brands: smaller logos in a slow scrolling strip (like the first version) */
.bg__marquee { overflow: hidden; padding-block: 8px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.bg__track { display: flex; align-items: center; gap: 14px; width: max-content; animation: bgscroll 44s linear infinite; }
.bg--hearing .bg__track { animation-duration: 52s; }
.bg__marquee:hover .bg__track { animation-play-state: paused; }
@keyframes bgscroll { to { transform: translateX(calc(-50% - 7px)); } }
.bg__track li { flex: none; }
.bg__logos { display: none; }
.bg__track li { border-radius: 12px; overflow: hidden; background: #000; border: 1px solid rgb(22 32 58 / 10%); box-shadow: 0 6px 16px -12px rgb(22 32 58 / 50%); }
.bg__track img { display: block; height: 76px; width: auto; max-width: none; }
.bg--hearing .bg__track img { height: 104px; }
.bg--contact .bg__track li { background: transparent; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.bg--contact .bg__track img { height: 60px; border-radius: 14px; box-shadow: 0 6px 16px -12px rgb(22 32 58 / 50%); }
.bg__lines { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.bg__lines strong { padding: 8px 14px; font-size: 0.95rem; }
.bg__lines ul li { padding: 6px 0; font-size: 0.92rem; }
@media (max-width: 900px) { .bg__track img { height: 60px; } .bg--hearing .bg__track img { height: 84px; } .bg--contact .bg__track img { height: 48px; } }
@media (prefers-reduced-motion: reduce) { .bg__marquee { overflow-x: auto; } .bg__track { animation: none; } }

/* Promise strip: five short items in one row */
:root { --strip-h: 118px; }
.promises__item span { display: block; font-size: 0.875rem; line-height: 1.35; margin-top: 2px; }
.promises__list { grid-template-columns: repeat(5, 1fr); row-gap: 0; }
.promises__item { align-items: center; border-left: 0; }
.promises__item + .promises__item { border-left: 1px solid rgb(255 255 255 / 14%); }
.promises__item p strong { font-size: 1rem; line-height: 1.3; }
.promises__item .icon { color: var(--vision); margin-top: 0; }
.promises__item:nth-child(1) .icon, .promises__item:nth-child(2) .icon, .promises__item:nth-child(5) .icon { color: var(--vision); }
.promises__item:nth-child(3) .icon, .promises__item:nth-child(4) .icon { color: #7fb0ff; }
@media (max-width: 1180px) {
	:root { --strip-h: 150px; }
	.promises__list { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
	.promises__item:nth-child(4) { border-left: 0; }
}
@media (max-width: 700px) {
	:root { --strip-h: 230px; }
	.promises__list { grid-template-columns: 1fr 1fr; }
	.promises__item:nth-child(n) { border-left: 0 !important; }
	.promises__item:last-child { grid-column: 1 / -1; }
}

/* About: our story with archive photographs */
.legacy { background: #f3ebdd; padding-block: clamp(56px, 7vw, 96px); color: #2d2418; }
.legacy__top { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.legacy__kicker { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 800; color: #8a5a1a; margin-bottom: 10px; }
.legacy__title { font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1.08; color: #231a0e; margin-bottom: 18px; }
.legacy__text p { font-size: clamp(1rem, 1.25vw, 1.125rem); line-height: 1.65; margin-bottom: 14px; color: #4a3d2b; max-width: 52ch; }
.legacy figure { margin: 0; }
.legacy__hero { background: #fff; padding: 12px 12px 0; border-radius: 6px; box-shadow: 0 24px 50px -26px rgb(45 36 24 / 70%); transform: rotate(1deg); }
.legacy__hero img, .legacy__grid img { display: block; width: 100%; height: auto; filter: sepia(0.35) contrast(1.02); }
.legacy figcaption { padding: 10px 4px 12px; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.01em; color: #4a3d2b; font-style: italic; }
.legacy__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 26px); margin-top: clamp(32px, 5vw, 56px); }
.legacy__grid figure { background: #fff; padding: 10px 10px 0; border-radius: 6px; box-shadow: 0 16px 34px -22px rgb(45 36 24 / 70%); transition: transform 0.3s; }
.legacy__grid li:nth-child(odd) figure { transform: rotate(-1deg); }
.legacy__grid li:nth-child(even) figure { transform: rotate(1deg); }
.legacy__grid li:hover figure { transform: rotate(0) translateY(-4px); }
@media (max-width: 900px) {
	.legacy__top { grid-template-columns: 1fr; }
	.legacy__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Three branch cards: Kamarajapuram optics, Kamarajapuram hearing aids, Pallikaranai */
.branches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.branch--both { border-top: 0; position: relative; }
.branch--both::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--vision), var(--hearing)); z-index: 1; }
.branch__map iframe { height: clamp(220px, 20vw, 260px); }
.branch__body { gap: 14px; }
.branch__kind { margin: 0 0 -8px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--vision); }
.branch--hearing .branch__kind { color: var(--hearing); }
.branch--both .branch__kind { color: var(--brand); }
@media (max-width: 1099px) { .branches { grid-template-columns: repeat(2, minmax(0, 1fr)); } .branch--both { grid-column: 1 / -1; } }
@media (max-width: 860px) { .branches { grid-template-columns: 1fr; } .branch--both { grid-column: auto; } }

/* Wider logo artwork (960x217): tagline starts under the lettering */
.brand__tag { left: 30.8%; right: 1%; }
