/* YourDoc F Care — the inner pages (everything except the home page), on top of styles.css. Light theme only.
   Every inner page has: a hero (the page's title and intro, a picture panel with a 3D scene standing in front of it, floating
   chips), its content, a strip of three pictures and, on the main pages, a 3D band. Pictures are placed by name from
   assets/img/pages/ (see pages.md). Without 3D, the pictures, text and chips stand on their own. */

/* ---------- 3D scenes (any element with data-mini; started by main.js, drawn by 3d/mini.js) ---------- */
:where([data-mini]) { position: relative; cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
[data-mini]:active { cursor: grabbing; }
[data-mini] canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; transition: opacity 1s; pointer-events: none; }
[data-mini] canvas.on { opacity: 1; }
html.no-3d [data-mini], html:not(.will-3d) [data-mini], [data-mini].mini-off { display: none; }

/* ---------- reading progress (a thin line along the top; main.js) ---------- */
.page-progress { position: fixed; left: 0; top: 0; right: 0; height: 3px; z-index: 80; transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; background: linear-gradient(90deg, #083898, #08a8b8 62%, #8fdfe6); box-shadow: 0 0 12px rgba(8, 168, 184, .5); }

/* ---------- hero: text on the left, a picture panel on the right ---------- */
.hero2 { padding: calc(var(--header-h) + clamp(28px, 4.5vw, 62px)) 0 clamp(54px, 6.5vw, 100px); }
.hero2__grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: clamp(30px, 5.5vw, 88px); align-items: center; }
.hero2__copy { position: relative; z-index: 3; }
.hero2 h1 { max-width: 11.5em; font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.hero2 .hero-cta { margin-top: 26px; }
.hero2__copy p + p { margin-top: .8em; }
.hero2__copy p.hero2__tag { margin-top: 0; font-size: 1.2rem; line-height: 1.4; color: var(--navy-900); }
.hero2__copy p strong { color: var(--navy-900); }
.form-privacy { margin-top: 1em; color: var(--muted); }
.hero2 .updated { margin-top: 22px; }

.hpanel { position: relative; margin: 0; padding: 6px 0 30px; --rx: 0deg; --ry: 0deg; --sx: 50%; perspective: 1200px; }
.hpanel__frame {
  position: relative; border-radius: 36px; padding: 10px; transform-style: preserve-3d; transform: rotateY(var(--ry)) rotateX(var(--rx)); transition: transform .5s var(--ease);
  background: linear-gradient(150deg, rgba(255, 255, 255, .97), rgba(231, 249, 249, .88)); border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 34px 80px rgba(8, 56, 152, .2), 0 0 0 1px rgba(8, 56, 152, .07);
}
.hpanel__frame::before { /* dots peeking out behind the corner */
  content: ""; position: absolute; z-index: -1; right: -26px; bottom: -26px; width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(8, 168, 184, .45) 2px, transparent 2.6px) 0 0 / 15px 15px;
}
.hpanel__frame::after { /* a soft sheen that follows the pointer */
  content: ""; position: absolute; inset: 10px; z-index: 3; border-radius: 27px; pointer-events: none;
  background: radial-gradient(460px circle at var(--sx) 0%, rgba(255, 255, 255, .3), transparent 62%);
}
.hpanel .slot { --ratio: 4 / 3; border-radius: 27px; border: 0; background: radial-gradient(120% 90% at 18% 8%, #fff, #e7f9f9 52%, #d3e9fa); box-shadow: inset 0 0 0 1px rgba(8, 56, 152, .06); }
.hpanel .slot img { transition: opacity .9s var(--ease), transform 1.4s var(--ease); transform: scale(1.04); }
.hpanel .slot.is-filled img { transform: none; }

/* floating chips (solid white, so the 3D behind them is never re-blurred) */
.hchip { position: absolute; z-index: 5; display: flex; align-items: center; gap: 11px; padding: 10px 17px 10px 10px; border-radius: 18px; background: rgba(255, 255, 255, .97); border: 1px solid var(--line); color: var(--navy-900); font-weight: 700; font-size: .84rem; line-height: 1.25; box-shadow: 0 16px 36px rgba(8, 56, 152, .16); animation: bob 6.5s ease-in-out infinite; pointer-events: none; }
.hchip i { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--sky); color: #2f6ae6; }
.hchip.c2 i { background: var(--teal-100); color: #0b9a90; }
.hchip small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.hchip.c1 { top: -2%; right: -6%; animation-delay: -2s; }
.hchip.c2 { bottom: 3%; right: -4%; animation-delay: -4s; }

/* the 3D scene stands in front of the picture, breaking out of its corner (mostly outside it, so a busy picture stays readable) */
.hpanel__art { position: absolute; z-index: 4; left: -17%; bottom: -12%; width: 50%; aspect-ratio: 1; }

/* ---------- three pictures ---------- */
.moments-sec { padding-top: clamp(24px, 4vw, 56px); }
.moments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 30px); align-items: start; }
.moment { margin: 0; }
.moment:nth-child(2) { margin-top: clamp(0px, 3.2vw, 46px); }
.moment .slot { --ratio: 4 / 3; border-radius: 28px; box-shadow: var(--shadow); transition: transform .6s var(--ease), box-shadow .5s; }
.moment:hover .slot { transform: translateY(-8px) scale(1.015); box-shadow: var(--shadow-lg); }
.moment figcaption { padding: 16px 6px 0; }
.moment figcaption b { display: block; font-size: 1.08rem; color: var(--navy-900); letter-spacing: -.012em; margin-bottom: 4px; }
.moment figcaption span { display: block; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.moments-sec .section-head h2 { text-wrap: balance; }
/* quiet mode (config.js quietSlots): a strip picture that is not ready is left out; one or two left stay centred */
.moment.is-off, .moments-sec.is-off { display: none; }
.moments--1 { grid-template-columns: minmax(0, 460px); justify-content: center; }
.moments--2 { grid-template-columns: repeat(2, minmax(0, 460px)); justify-content: center; }
.moments--1 .moment, .moments--2 .moment { margin-top: 0 !important; }
.quiet-slots .hpanel .slot__ph b { display: none; }
.illus-note { text-align: center; color: var(--muted); font-size: .82rem; margin: 26px 0 0; }
.illus-note[hidden] { display: none; }

/* ---------- a wide 3D band between a heading and its content (main pages) ---------- */
.spot { position: relative; height: clamp(290px, 34vw, 430px); max-width: 1000px; margin: -8px auto 14px; }
.spot--ring { height: clamp(330px, 40vw, 470px); }
.spot--side { max-width: 460px; height: clamp(240px, 28vw, 320px); margin: 6px 0 0; }
/* a band that had to be switched off (a very slow device) folds away, instead of leaving a gap or making the text jump */
.spot.mini-off { display: block; height: 0; margin-top: 0; margin-bottom: 0; opacity: 0; overflow: hidden; transition: height .6s var(--ease), margin .6s var(--ease), opacity .4s; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hchip.c1 { right: -1.5%; }
}
@media (max-width: 960px) {
  .hero2__grid { grid-template-columns: 1fr; gap: 34px; }
  .hero2 h1 { max-width: 13em; }
  .hpanel { width: min(100%, 580px); margin-inline: auto; }
  .hpanel__art { left: -4%; width: 40%; }
  .hchip.c1 { right: -1%; }
}
@media (max-width: 760px) {
  .hero2 { padding-bottom: 64px; }
  .moments { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; margin-inline: -20px; padding: 6px 20px 20px; scrollbar-width: none; }
  .moments::-webkit-scrollbar { display: none; }
  .moment { flex: 0 0 82%; scroll-snap-align: center; margin-top: 0 !important; }
  .spot, .spot--ring, .spot--side { height: clamp(260px, 72vw, 340px); }
}
@media (max-width: 520px) {
  .hpanel__frame { border-radius: 28px; padding: 8px; }
  .hpanel .slot { border-radius: 21px; }
  .hchip { font-size: .78rem; padding: 8px 13px 8px 8px; gap: 9px; }
  .hchip i { width: 30px; height: 30px; border-radius: 10px; }
  .hchip.c1 { top: 1%; right: 0; }
  .hchip.c2 { bottom: 7%; right: 1%; }
  .hpanel__art { left: -3%; bottom: -3%; width: 42%; }
}
@media (prefers-reduced-motion: reduce) {
  .hpanel__frame { transform: none; }
  .hpanel .slot img { transform: none; }
}
@media print {
  .hpanel, [data-mini], .page-progress, .moments-sec, .spot { display: none !important; }
  .hero2__grid { display: block; }
}

/* ---------- the contact form (contact.html; assets/js/contact-form.js): messages beside the fields, the status line, the thank-you ---------- */
.contact-box [hidden] { display: none !important; } /* .form is a grid, which would otherwise win over the hidden attribute */
.field-error { margin: 6px 0 0; color: var(--danger); font-size: .9rem; font-weight: 600; line-height: 1.4; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error input:focus, .field.has-error select:focus, .field.has-error textarea:focus { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(198, 45, 59, .16); }
.field-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px 16px; margin-top: 6px; }
.field .field-meta small { margin-top: 0; }
.field-meta small:first-child { flex: 1 1 auto; min-width: 0; }
.field-meta .counter { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.field-meta .counter.is-near { color: var(--warn); font-weight: 700; }
.consent .check a { font-weight: 600; }
.consent.has-error .check input { outline: 2px solid var(--danger); outline-offset: 2px; }
.form-actions { display: grid; }
.form-status:not(:empty) { margin-top: 14px; padding: 12px 16px; border: 1px solid; border-radius: var(--radius-sm); font-size: .95rem; line-height: 1.5; }
.form-status p { margin: 0; }
.form-status p + p { margin-top: 8px; }
.form-status.is-busy { background: var(--sky); border-color: #c7dbff; color: #17346f; }
.form-status.is-error { background: #fff0f1; border-color: #f4c2c7; color: #7d1822; }
.form-status.is-warn { background: #fff7ea; border-color: #f6d7a4; color: #6b3a05; }
.form-status a:not(.btn) { color: inherit; font-weight: 700; }
.form-status .btn { display: flex; width: max-content; max-width: 100%; margin-top: 12px; }
.contact-box .btn[disabled] { opacity: .75; cursor: progress; }
.contact-box .btn[disabled]:hover { transform: none; }
.contact-done { justify-items: center; text-align: center; padding-block: 40px; }
.contact-done .icon { margin: 0; background: var(--teal-100); color: #0b9a90; }
.contact-done h3 { margin: 0; font-size: 1.5rem; }
.contact-done h3:focus { outline: none; }
.contact-done p { margin: 0; max-width: 28em; color: var(--ink); }
.contact-ref b { color: var(--navy-900); letter-spacing: .02em; overflow-wrap: anywhere; user-select: all; }
