@import url("https://fonts.googleapis.com/css2?family=Cardo&display=swap");

:root {
  color-scheme: light;
  --color-base: #eba5a3;
  --color-shadow: #c98e8e;
  --color-text: #111111;
  --color-muted: #636363;
  --color-white: #ffffff;
  --color-menu: #ffb9b9;
  --color-menu-bar: #ffddd2;
  --color-skeleton: #f2f2f2;
  font-family: Jost, sans-serif;
  color: var(--color-text);
  background: var(--color-base);
}

* { box-sizing: border-box; }
body { margin: 0; font-size: 1.05rem; line-height: 1.55; background: var(--color-base); color: var(--color-text); }

/* Header: pink band with logo, title, subtitle and menu (matches the WordPress site) */
header { padding: 1.5rem 0 0; text-align: center; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; padding: 0 clamp(1rem, 4vw, 3rem); }
.logo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.site-title { color: var(--color-white); font-family: gelato-luxe, sans-serif; font-size: 7vw; line-height: 1.1; text-shadow: 3px 3px var(--color-shadow); text-decoration: none; white-space: nowrap; }
.site-subtitle { color: var(--color-white); font-size: 1.5vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }

/* Narrow screens: the menu is a bar with a hamburger button; the list opens below it */
.site-nav { margin-top: 1.5rem; background: var(--color-menu); position: relative; }
.menu-toggle { display: flex; justify-content: flex-end; align-items: center; width: 100%; padding: 0.9rem clamp(1rem, 4vw, 3rem); background: transparent; border: 0; border-radius: 0; cursor: pointer; }
.menu-toggle:hover { background: transparent; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 32px; height: 3px; background: var(--color-white); border-radius: 2px; }
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -9px; }
.menu-bars::after { top: 9px; }
.menu-list { display: none; list-style: none; margin: 0; padding: 0; }
.menu-list.is-open { display: block; }
.menu-list a { display: block; padding: 0.9rem clamp(1rem, 4vw, 3rem); color: var(--color-white); font-size: 1.05rem; text-decoration: none; border-top: 1px solid rgba(255, 255, 255, 0.5); }
.menu-list a:hover, .menu-list a[aria-current="page"] { background: var(--color-shadow); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

main { margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 3rem) 4rem; min-height: 70vh; background: var(--color-white); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; }
.eyebrow, .tag { color: var(--color-text); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.intro { max-width: 600px; color: var(--color-muted); }
.button, button { display: inline-block; border: 0; border-radius: 0; padding: 0.7rem 1.4rem; color: var(--color-white); background: var(--color-text); cursor: pointer; font: inherit; text-decoration: none; }
.button:hover, button:hover { background: var(--color-muted); }
.muted { color: var(--color-muted); font-size: 0.9rem; }

/* Gallery: masonry columns, images keep their own proportions, no captions (as on the WordPress site) */
.gallery-grid { --gallery-columns: 5; display: flex; align-items: stretch; gap: 4px; }
.gallery-column { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
/* Straight bottom: the last card of a column fills the height of the tallest column; its picture is cropped to fit */
.gallery-column > .card { display: flex; flex-direction: column; }
.gallery-column > .card:last-child { flex-grow: 1; margin-bottom: 0; }
.gallery-column > .card > img, .gallery-column > .card > .skeleton, .gallery-column > .card > .video-thumb { flex: 1 1 auto; min-height: 0; object-fit: cover; }

/* Pictures and videos open in the viewer; a video shows its first frame with a play badge */
.card.is-openable { cursor: pointer; overflow: hidden; }
/* Hover: the picture pushes in slightly and gets a little darker, so it reads as clickable */
.card.is-openable > img, .card.is-openable > .video-thumb { transition: transform 0.25s ease, filter 0.25s ease; }
.card.is-openable:hover > img, .card.is-openable:hover > .video-thumb { transform: scale(1.04); filter: brightness(0.82); }
@media (prefers-reduced-motion: reduce) {
  .card.is-openable > img, .card.is-openable > .video-thumb { transition: none; }
  .card.is-openable:hover > img, .card.is-openable:hover > .video-thumb { transform: none; }
}
.card.is-openable:focus-visible { outline: 3px solid #d86d86; outline-offset: 2px; }
.video-thumb { position: relative; display: flex; }
.video-thumb video { display: block; width: 100%; height: auto; flex: 1 1 auto; min-height: 0; object-fit: cover; pointer-events: none; }
.play-badge { position: absolute; top: 50%; left: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(0, 0, 0, 0.55); display: grid; place-items: center; pointer-events: none; }
.play-badge::after { content: ""; width: 0; height: 0; margin-left: 6px; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.card.is-openable:hover .play-badge { background: rgba(0, 0, 0, 0.7); }

/* Viewer (lightbox): a carousel over the whole page */
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: 1fr auto; background: rgba(18, 12, 15, 0.94); color: #fff; font-family: Jost, sans-serif; }
.lightbox[hidden] { display: none; }
/* Buttons keep exactly the size of their visible circle (no default padding), with the symbol centred in it */
.lightbox button { box-sizing: border-box; margin: 0; padding: 0; display: grid; place-items: center; }
.lightbox-stage { position: relative; min-height: 0; }
.lightbox-media { position: absolute; inset: 64px 72px; display: flex; align-items: center; justify-content: center; }
.lightbox-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-video { position: relative; display: flex; flex-direction: column; max-width: 100%; max-height: 100%; }
.lightbox-video video { display: block; max-width: 100%; max-height: calc(100% - 52px); min-height: 0; object-fit: contain; background: #000; cursor: pointer; }
.lightbox-video-bar { display: flex; align-items: center; gap: 12px; padding: 10px 4px 0; }
.lightbox-play { width: 40px; height: 40px; flex: 0 0 auto; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 0.95rem; cursor: pointer; }
.lightbox-video-bar input[type="range"] { flex: 1; min-width: 0; accent-color: #f0a0b0; }
.lightbox-close { position: absolute; top: 10px; right: 12px; z-index: 1; width: 44px; height: 44px; border: 0; background: transparent; color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.lightbox-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox-arrow:hover, .lightbox-close:hover, .lightbox-play:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox button:focus-visible, .lightbox input:focus-visible { outline: 2px solid #f0a0b0; outline-offset: 2px; }
.lightbox-info { padding: 12px 20px 18px; max-height: 32vh; overflow-y: auto; text-align: center; }
.lightbox-author { margin: 0; font-weight: 500; font-size: 1.05rem; }
.lightbox-description { margin: 6px auto 0; max-width: 760px; font-size: 0.95rem; line-height: 1.5; white-space: pre-line; }
.lightbox-counter { margin: 6px 0 0; font-size: 0.8rem; opacity: 0.7; }

@media (max-width: 600px) {
  .lightbox-media { inset: 56px 8px 8px; }
  .lightbox-arrow { width: 44px; height: 44px; font-size: 2rem; background: rgba(0, 0, 0, 0.45); }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-info { max-height: 28vh; }
  .play-badge { width: 52px; height: 52px; }
  .play-badge::after { border-left-width: 18px; border-top-width: 11px; border-bottom-width: 11px; }
}
.card { break-inside: avoid; margin: 0 0 4px; }
.card img, .card video, .skeleton { display: block; width: 100%; height: auto; }
.skeleton { background: var(--color-skeleton); aspect-ratio: 3 / 2; }

/* Subpage headings: centered, as on the WordPress site */
.page-header { text-align: center; margin-bottom: 2.5rem; }
/* Sizes follow the WordPress site: 40px heading and 500px portraits at 1680px wide; vw-based so they scale with the screen */
.page-header h1 { font-size: clamp(1.75rem, 2.4vw, 2.5rem); font-weight: 400; margin-bottom: 0.5rem; }
.page-header .intro { margin: 0 auto; max-width: 760px; color: var(--color-text); font-family: Cardo, serif; font-size: 0.9rem; font-weight: 700; }

/* Team: round animated portraits, with name, role and contact below (as on the About page of the WordPress site) */
.team-grid { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; column-gap: 1.2vw; row-gap: 2.75rem; text-align: center; }
.team-member img { display: block; width: clamp(200px, 30vw, 500px); height: auto; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; object-fit: cover; }
/* Fixed rows: name, role, specialization, phone, email line up across cards (empty <p> reserves the slot) */
.team-info { width: clamp(240px, 15.6vw, 300px); margin: 1.2vw auto 0; text-align: left; font-family: Cardo, serif; font-size: 1.05rem; line-height: 1.55; display: grid; grid-template-rows: auto minmax(1lh, auto) minmax(2lh, auto) minmax(1lh, auto) minmax(1lh, auto); align-items: start; }
.team-info h2 { font: inherit; font-weight: 700; margin: 0; }
.team-info p { margin: 0; }
.team-info a { color: var(--color-text); font-family: Jost, sans-serif; }

/* 3D models: square grid like the About page cards; one viewer per cell, name and description below */
.model-grid { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 2.5rem 1.5rem; }
.model-grid .card { margin: 0; break-inside: auto; }
.model-grid .skeleton { aspect-ratio: 1 / 1; }
.model-frame { position: relative; aspect-ratio: 1 / 1; background: var(--color-skeleton); }
.model-viewer { display: block; width: 100%; height: 100%; }
.model-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--color-white); }
.model-progress-bar { height: 100%; width: 0; background: var(--color-text); transition: width 0.2s; }
.model-error { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-family: Cardo, serif; }
.model-info { margin-top: 0.75rem; text-align: left; font-family: Cardo, serif; }
.model-info h2 { font: inherit; font-weight: 700; margin: 0; }
.model-info p { margin: 0.25rem 0 0; }

.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-top: 3rem; }
form { display: grid; gap: 1rem; max-width: 480px; }
label { display: grid; gap: 0.35rem; font-weight: 500; }
input, select { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--color-text); border-radius: 0; background: var(--color-white); font: inherit; }

footer { padding: 1.5rem clamp(1rem, 4vw, 3rem); color: var(--color-text); text-align: center; border-top: 1px solid var(--color-white); }
footer p { margin: 0; }
footer .footer-title { font-weight: 700; }

/* Wide screens: logo left, title and subtitle centered, menu as one row of buttons */
@media (min-width: 1001px) {
  .brand { display: grid; grid-template-columns: 120px 1fr 120px; align-items: center; column-gap: 1rem; width: 100%; padding: 4rem 6.5vw 2.5rem; }
  .logo { grid-column: 1; grid-row: 1 / 3; }
  .site-title { grid-column: 2; grid-row: 1; }
  .site-subtitle { grid-column: 2; grid-row: 2; }
  .site-nav { background: var(--color-menu-bar); padding: 0.6rem clamp(1rem, 4vw, 3rem); }
  .menu-toggle { display: none; }
  .menu-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2.5rem; }
  .menu-list a { display: block; padding: 0.9rem 1rem; background: var(--color-base); color: var(--color-white); font-weight: 700; font-size: 0.9rem; text-align: center; border: 0; }
  .menu-list a:hover, .menu-list a[aria-current="page"] { background: var(--color-shadow); }
  .menu-list { display: flex; }
  .gallery-grid { --gallery-columns: 5; width: 75vw; margin: 0 auto; }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .brand { display: grid; grid-template-columns: 120px 1fr 120px; align-items: center; column-gap: 1rem; width: 100%; padding: 3rem clamp(1rem, 4vw, 3rem) 2rem; }
  .logo { grid-column: 1; grid-row: 1 / 3; }
  .site-title { grid-column: 2; grid-row: 1; }
  .site-subtitle { grid-column: 2; grid-row: 2; }
  .site-subtitle { font-size: 2vw; }
  .gallery-grid { --gallery-columns: 3; }
}
@media (max-width: 700px) {
  .team-grid { grid-template-columns: 1fr; }
  .team-member img { width: 70vw; }
  .team-info { width: 70vw; }
  .gallery-grid { --gallery-columns: 1; width: 70vw; margin: 0 auto; }
  .site-title { font-size: 12vw; }
  .site-subtitle { font-size: 3.5vw; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .gallery-grid { --gallery-columns: 1; width: 70vw; margin: 0 auto; }
}
@media (max-width: 500px) {
  .site-subtitle { font-size: 5vw; }
}
