/* ==========================================================================
   components.css — photos, cards, tiles, lists, forms
   ========================================================================== */

/* --- arched photos (the window / cupped-hands shape) ---------------------- */

.arch {
  position: relative; overflow: hidden;
  /* round top: vertical radius = half the width, as a share of the height */
  border-radius: 50% 50% var(--radius) var(--radius) / var(--arch-v, 44%) var(--arch-v, 44%) var(--radius) var(--radius);
  border: 7px solid var(--white);
  box-shadow: var(--shadow);
  background: var(--lead);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.split > .arch { --arch-v: 45%; aspect-ratio: 4 / 4.4; max-width: 640px; width: 100%; justify-self: center; }
.portrait { --arch-v: 43%; aspect-ratio: 4 / 4.6 !important; max-width: 580px !important; }

/* --- homepage collage ----------------------------------------------------- */

.collage { position: relative; aspect-ratio: 1 / 1.02; width: 100%; max-width: 820px; justify-self: center; }
.collage-blob {
  position: absolute; inset: 8% 2% 2% 10%;
  background: var(--lead);
  border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  animation: morph 12s ease-in-out infinite;
}
@keyframes morph { 50% { border-radius: 58% 42% 52% 48% / 42% 58% 42% 58%; } }
.collage-main { --arch-v: 36%; position: absolute; left: 4%; top: 0; width: 60%; height: 84%; }
.collage-side { --arch-v: 37%; position: absolute; right: 0; bottom: 2%; width: 44%; height: 58%; }
.collage-round {
  position: absolute; left: -2%; bottom: 0; width: 28%; aspect-ratio: 1;
  border-radius: 50%; overflow: hidden; border: 6px solid var(--white); box-shadow: var(--shadow);
}
.collage-round img { width: 100%; height: 100%; object-fit: cover; }
.sun-rays { position: absolute; right: 8%; top: -3%; width: clamp(80px, 9vw, 170px); height: clamp(80px, 9vw, 170px); animation: spin 60s linear infinite; }
.sun-rays line { stroke: var(--sun); stroke-width: 5; stroke-linecap: round; }
@keyframes spin { to { transform: rotate(360deg); } }
.live-badge {
  position: absolute; right: 2%; top: 14%;
  display: flex; align-items: center; gap: 10px;
  background: var(--white); border-radius: 999px; padding: 10px 16px;
  font-family: var(--round); font-weight: 800; font-size: 0.92rem;
  box-shadow: var(--shadow-soft);
}
.live-badge i { width: 10px; height: 10px; border-radius: 50%; background: #2FA56B; box-shadow: 0 0 0 4px rgba(47, 165, 107, .2); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(47, 165, 107, 0); } }

/* --- moving ribbon -------------------------------------------------------- */

.ribbon-wrap { overflow: hidden; padding-block: 14px; margin-top: -14px; }

.ribbon { background: var(--anchor); color: var(--white); overflow: hidden; padding-block: 16px; transform: rotate(-1.4deg); margin: 0 -20px; position: relative; z-index: 2; }
.ribbon-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.ribbon-track span { display: flex; align-items: center; gap: 36px; padding-right: 36px; font-family: var(--display); font-size: 1.35rem; white-space: nowrap; }
.ribbon-track span::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- why-us accordion with photo swap ------------------------------------- */

.why { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 140px); align-items: start; }
.why-list { border-top: 1px solid var(--hair); }
.why-item {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: grid; grid-template-columns: 1fr auto; gap: 0 16px;
  padding: 24px 6px; border-bottom: 1px solid var(--hair);
}
.why-item:focus-visible { outline: 3px solid var(--sun); outline-offset: -3px; }
.why-title { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.8rem); line-height: 1.2; transition: color .3s, transform .4s var(--ease); }
.why-arrow { color: var(--accent); font-size: 1.4rem; transition: transform .4s var(--ease); }
.why-body { grid-column: 1 / -1; font-size: 1.05rem; max-width: 52ch; display: block; opacity: 0; transition: max-height .45s var(--ease), opacity .35s, margin .45s; overflow: hidden; }
.why-item[aria-expanded="true"] .why-title { color: var(--accent); transform: translateX(8px); }
.why-item[aria-expanded="true"] .why-arrow { transform: rotate(90deg); }
.why-item[aria-expanded="true"] .why-body { opacity: 1; margin-top: 10px; max-height: 12em; }
.why-item[aria-expanded="false"] .why-body { max-height: 0; }
.why-photos { --arch-v: 42%; position: sticky; top: 110px; aspect-ratio: 4 / 4.8; width: 100%; max-width: 640px; justify-self: center; max-height: 82vh; }
.why-photos img { position: absolute; inset: 0; transition: opacity .7s, transform 1.2s var(--ease); }
.why-photos img:not(.on) { opacity: 0; transform: scale(1.08); }

/* --- stats ---------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat { display: flex; flex-direction: column; gap: 6px; border-left: 3px solid var(--accent); padding-left: 18px; }
.stat-value { font-family: var(--display); font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.stat p { font-size: 0.95rem; color: var(--anchor-soft); }

/* --- service tiles -------------------------------------------------------- */

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 1.6vw, 28px); }
.tile {
  background: var(--lead-pale); border-radius: var(--radius); padding: 30px 28px;
  display: flex; flex-direction: column; gap: 8px;
  transition: transform .4s var(--bounce), background .3s, opacity .9s var(--ease);
}
.tile:hover { transform: translateY(-8px) rotate(-.6deg); background: #D6ECF7; }
.tile-icon { width: 60px; height: 60px; border-radius: 20px; background: var(--white); display: grid; place-items: center; margin-bottom: 8px; transition: transform .45s var(--bounce); }
.tile:hover .tile-icon { transform: rotate(-8deg) scale(1.08); }
.tile-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--royal); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile p { color: var(--anchor-soft); }

/* --- generic cards (inner pages) ------------------------------------------ */

.card {
  background: var(--white); border-radius: var(--radius);
  padding: 30px 28px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-soft);
  transition: transform .4s var(--bounce), box-shadow .3s, opacity .9s var(--ease);
}
.band-paper .card { background: var(--lead-pale); box-shadow: none; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card p, .card li { color: var(--anchor-soft); }
.card-photo { padding: 0; overflow: hidden; }
.card-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .8s var(--ease); }
.card-photo:hover img { transform: scale(1.05); }
.card-photo .card-text { padding: 22px 26px 28px; display: flex; flex-direction: column; gap: 8px; }

.icon-rule { width: 14px; height: 14px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 6px rgba(249, 193, 56, .22); margin-bottom: 6px; }

/* --- checklist ------------------------------------------------------------ */

.checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.checks li::before {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23153643' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* --- photo mosaic --------------------------------------------------------- */

.mosaic { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: repeat(2, clamp(220px, 19vw, 380px)); gap: clamp(14px, 1.4vw, 24px); }
.mosaic figure { position: relative; overflow: hidden; border-radius: var(--radius); }
.mosaic figure:first-child { grid-row: span 2; }
.mosaic-6 { grid-template-rows: repeat(3, clamp(220px, 18vw, 360px)); }
.mosaic-6 figure:first-child { grid-column: span 2; grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.mosaic figure:hover img { transform: scale(1.07); }
.mosaic figcaption {
  position: absolute; left: 14px; bottom: 14px;
  background: var(--white); border-radius: 999px; padding: 6px 14px;
  font-family: var(--round); font-weight: 800; font-size: 0.88rem;
}

/* --- steps ---------------------------------------------------------------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; counter-reset: step; }
.step {
  background: var(--white); border-radius: var(--radius); padding: 26px 24px;
  display: flex; flex-direction: column; gap: 6px; position: relative;
  box-shadow: var(--shadow-soft);
  transition: transform .4s var(--bounce), opacity .9s var(--ease);
}
.band-paper .step { background: var(--lead-pale); box-shadow: none; }
.step:hover { transform: translateY(-6px); }
ol.steps .step::before {
  counter-increment: step; content: counter(step);
  width: 44px; height: 44px; border-radius: 50%; background: var(--lead);
  display: grid; place-items: center; margin-bottom: 10px;
  font-family: var(--round); font-weight: 900; font-size: 1.1rem;
}
.step-bar { width: 44px; height: 6px; border-radius: 6px; background: var(--sun); margin-bottom: 8px; }
.step-n { font-family: var(--round); font-weight: 900; font-size: 0.78rem; letter-spacing: .14em; color: var(--accent); }
.step p { color: var(--anchor-soft); font-size: 0.97rem; }

/* --- spec list ------------------------------------------------------------ */

.spec-list { display: flex; flex-direction: column; border-top: 1px solid var(--hair); width: 100%; }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 2px; border-bottom: 1px solid var(--hair); font-size: 0.98rem; }
.spec-row span:last-child { font-family: var(--round); font-weight: 800; text-align: right; }

/* --- rooms ---------------------------------------------------------------- */

.rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.room { background: var(--white); border-radius: var(--radius); padding: 28px 26px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; box-shadow: var(--shadow-soft); transition: transform .4s var(--bounce), opacity .9s var(--ease); }
.room:hover { transform: translateY(-6px); }
.room p { color: var(--anchor-soft); }
.room-meta { margin-top: auto; padding-top: 10px; font-size: 0.85rem; font-weight: 600; color: var(--anchor-soft); }
.status { font-family: var(--round); font-weight: 800; font-size: 0.8rem; border-radius: 999px; padding: 4px 12px; display: inline-flex; align-items: center; gap: 7px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-open { background: #DDF3E6; color: #1C7A47; }
.status-wait { background: #FDF0CF; color: #8A5A00; }
.status-full { background: #ECEFF1; color: #52646C; }

/* --- ADLs ----------------------------------------------------------------- */

.adl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.adl { background: var(--white); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-soft); transition: transform .4s var(--bounce), opacity .9s var(--ease); }
.adl:hover { transform: translateY(-6px); }
.adl .label { color: var(--accent); }
.adl p { color: var(--anchor-soft); font-size: 0.97rem; }
.care-note { margin-top: 28px; background: var(--anchor); color: #CFE6F0; border-radius: var(--radius); padding: 28px 30px; display: flex; flex-direction: column; gap: 10px; }
.care-note strong { color: var(--sun); }
.care-note .quiet { color: #A9C7D3; }

/* --- contact panel -------------------------------------------------------- */

.contact-panel {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--anchor); color: #CFE6F0;
  border-radius: calc(var(--radius) + 12px);
  padding: clamp(28px, 5vw, 64px);
}
.contact-panel .sun-glow { left: auto; right: -220px; top: -220px; z-index: -1; }
.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: 16px; }
.contact-copy h2 { color: var(--white); }
.contact-copy .label { color: var(--sun); }
.contact-copy .body-copy { color: #CFE6F0; }
.big-phone { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--white); text-decoration: none; margin-top: 8px; }
.big-phone:hover { color: var(--sun); }
.contact-lines { display: grid; gap: 14px; margin-top: 6px; }
.cline { display: flex; flex-direction: column; gap: 2px; }
.cline .label { color: #9FC4D3; font-size: 0.72rem; }
.cline a, .cline .val { color: var(--white); font-size: 1.05rem; text-decoration: none; }
.cline a:hover { color: var(--sun); }

.form-card { background: var(--white); color: var(--anchor); border-radius: var(--radius); padding: clamp(22px, 3.5vw, 36px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); }
.form-card form { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .label { color: var(--anchor); letter-spacing: .08em; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--anchor);
  background: var(--lead-pale); border: 2px solid transparent; border-radius: 14px;
  padding: 13px 16px; width: 100%;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: var(--white); border-color: var(--royal); box-shadow: 0 0 0 4px rgba(4, 88, 200, .12); }
.field [aria-invalid="true"] { border-color: #B3261E; background: #FDF1F0; }
.field-err { color: #B3261E; font-size: 0.9rem; font-weight: 600; }
.form-note { font-size: 0.85rem; color: var(--anchor-soft); text-align: center; }
.form-status { border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 18px; font-size: 0.97rem; }
.form-status-ok { background: #DDF3E6; color: #14532D; }
.form-status-err { background: #FDF1F0; color: #7F1D1D; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* --- map ------------------------------------------------------------------ */

.map-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.map-frame { border-radius: var(--radius); overflow: hidden; border: 7px solid var(--white); box-shadow: var(--shadow); aspect-ratio: 16 / 11; background: var(--lead-pale); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 960px) {
  .tiles, .rooms, .adl-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .why, .contact, .map-split { grid-template-columns: 1fr; }
  .why-photos { position: relative; top: 0; max-width: 420px; }
  .mosaic, .mosaic-6 { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 180px; }
  .mosaic figure:first-child, .mosaic-6 figure:first-child { grid-column: span 2; grid-row: span 1; }
  .collage { max-width: 460px; }
}

@media (max-width: 600px) {
  .tiles, .rooms, .adl-grid { grid-template-columns: 1fr; }
  .stats { gap: 22px; }
  .live-badge { font-size: 0.8rem; padding: 8px 12px; top: 8%; }
  .sun-rays { width: 80px; height: 80px; }
  .ribbon-track span { font-size: 1.1rem; }
}

/* --- team photos (About page) --------------------------------------------- */

.team-photos { position: relative; width: 100%; max-width: 660px; justify-self: center; padding-bottom: 12%; }
.team-main { --arch-v: 40%; aspect-ratio: 4 / 4.2; width: 88%; }
.team-round {
  position: absolute; right: 0; bottom: 0; width: 42%; aspect-ratio: 1;
  border-radius: 50%; overflow: hidden; border: 7px solid var(--white); box-shadow: var(--shadow);
}
.team-round img { width: 100%; height: 100%; object-fit: cover; }

/* --- wide screens --------------------------------------------------------- */

@media (min-width: 1500px) {
  .tiles, .adl-grid { grid-template-columns: repeat(3, 1fr); }
  .tile, .card, .step, .adl { padding: clamp(30px, 2.2vw, 44px); }
  .stats { gap: clamp(28px, 3vw, 64px); }
  .steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
