/*
 * Site refresh (approved on the dev preview, released 21 November 2026).
 * One page background with faint concentric "osteon" rings from the
 * top-right corner (chosen 21 Nov 2026 over grid, lamellae, grain and
 * plain), clearer section dividers and more breathing room.
 * Same fonts, colours, logo, labels and layout. Remove this file's <link> to revert.
 */

:root {
  --section-space: clamp(72px, 8vw, 120px);
  /* Rings radiate from the top-right corner and fade out by ~75%. */
  --ring-origin: 96% 4%;
  --ring-gap: 33px;
  /* Strongest near the corner, still clearly present on the far (left) side. */
  --ring-mask: radial-gradient(circle at var(--ring-origin), #000 0, #000 35%, rgba(0, 0, 0, 0.6) 70%, rgba(0, 0, 0, 0.35) 100%, transparent 125%);
}
:root[data-theme="dark"] {
  --ring-line: rgba(160, 190, 240, 0.085);
  --bg-tone: radial-gradient(ellipse 120% 70% at 50% -10%, rgba(255, 255, 255, 0.035), transparent 70%);
  --divider: rgba(160, 176, 200, 0.32);
}
/* Light mode: a soft cool-grey page (less glare than pure white) with every
   card in clean white, so cards separate from the page again. */
:root[data-theme="light"] {
  --canvas: #e7ecf3;
  --surface: #ffffff;
  --procedure-card: #ffffff;
  --procedure-hover: #f7f9fc;
  --consultation-surface: #ffffff;
  --ring-line: rgba(30, 60, 120, 0.12);
  --bg-tone: radial-gradient(ellipse 120% 70% at 50% -10%, rgba(255, 255, 255, 0.7), transparent 70%);
  --divider: rgba(36, 50, 74, 0.22);
}

/* Procedure boxes derive their fill from the canvas; keep them white too. */
:root[data-theme="light"] .services {
  --procedure-panel-refined: #ffffff;
}

/* ---------- Page background ---------- */

html {
  background-color: var(--canvas);
}
body {
  background: transparent;
}

/* Fixed layer behind all content: faint concentric rings (an osteon's
   cross-section, echoing the logo) plus a soft light falloff from the top. */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Size to the largest viewport (address bar hidden) so the layer never
     resizes or leaves an uncovered strip while mobile browser toolbars
     slide in and out during scrolling. */
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  /* Keep it on its own compositor layer so it stays still while scrolling. */
  transform: translateZ(0);
  backface-visibility: hidden;
}
body::before {
  background-image: repeating-radial-gradient(
    circle at var(--ring-origin),
    transparent 0 var(--ring-gap),
    var(--ring-line) var(--ring-gap) calc(var(--ring-gap) + 1px)
  );
  -webkit-mask-image: var(--ring-mask);
  mask-image: var(--ring-mask);
}
body::after {
  background: var(--bg-tone);
}

/* Sections and the hero become transparent so the layer shows through.
   Their original full-width borders (team/FAQ/offers/contact) are removed
   so the content-width dividers below are the only section lines. */
.hero,
main > .section {
  background: transparent;
  border-block: 0;
}

/* The hero's process strip uses the same content-width line style. */
.signal {
  background: transparent;
  border-block: 0;
}
.signal-inner {
  border-block: 1px solid var(--divider);
}

/* ---------- Hero video ---------- */

/* Composite the reel and vignette against the canvas. Only the feathered
   perimeter of this group reveals the page grid. */
/* Keep the video above the background rings. The video fades its own
   edges as before, but over a soft "clearing" of plain canvas that fades
   out much further away, so rings dissolve before they reach the scan and
   never show through it. No hard box edge: the clearing is feathered too. */
.hero-motion-art {
  isolation: isolate;
}
.hero-motion-art::after {
  content: "";
  display: block;
  position: absolute;
  inset: -12% -6% -18% -10%;
  z-index: -1;
  background: var(--canvas);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 52% 45%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 52% 45%, #000 62%, transparent 100%);
}
.hero-motion-art :is(.hero-motion-poster, video) {
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, transparent 8%, #000 43%, #000 66%, transparent 87%),
    linear-gradient(0deg, transparent 0%, #000 30%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0%, transparent 8%, #000 43%, #000 66%, transparent 87%),
    linear-gradient(0deg, transparent 0%, #000 30%);
  mask-composite: intersect;
}
:root[data-theme="dark"] .hero-motion-art :is(.hero-motion-poster, video) {
  mix-blend-mode: lighten;
}
/* light-refinements.css lifts this pseudo-element above the reel; keep the
   clearing behind the vignette and video in light mode too. */
:root[data-theme="light"] .hero-motion-art::after {
  z-index: -1;
}
/* On phones the reel spans the full width, so widen the clearing around
   the scan to keep the rings off it. */
@media (max-width: 760px) {
  .hero-motion-art::after {
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, #000 70%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 60% at 50% 45%, #000 70%, transparent 100%);
  }
}
@media (max-width: 760px) {
  .hero-motion-art :is(.hero-motion-poster, video) {
    -webkit-mask-image:
      linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent),
      linear-gradient(0deg, transparent 0%, #000 25%);
    mask-image:
      linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent),
      linear-gradient(0deg, transparent 0%, #000 25%);
  }
  :root[data-theme="dark"] :is(.hero-kicker, .hero h1, .hero-copy) {
    text-shadow: 0 1px 12px rgb(20 23 28 / 70%);
  }
}

/* ---------- Section dividers ---------- */

/* A clear 1px rule across the content width with a short brand-blue
   accent at its start, echoing the blue eyebrow bullets. */
main > .section + .section {
  position: relative;
}
main > .section + .section::before,
main > .section + .section::after {
  content: "";
  position: absolute;
  top: 0;
  height: 1px;
  pointer-events: none;
}
main > .section + .section::before {
  left: 50%;
  width: min(1264px, calc(100% - var(--gutter) * 2));
  transform: translateX(-50%);
  background: var(--divider);
}
main > .section + .section::after {
  left: max(var(--gutter), calc((100% - 1264px) / 2));
  top: -1px;
  width: 56px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
}

/* ---------- Header ---------- */

/* Frosted glass nav bar. The Urban Dent top bar stays solid and scrolls
   away; the pinned Osteon bar becomes dark-tinted glass that blurs the
   page, grid and video passing underneath. Nothing on the header creates
   its own layer (no transform/filter/opacity), so the blur can see the
   page behind it. */
.site-header {
  background: transparent;
}
.site-header .nav {
  --glass-tint: rgba(14, 17, 23, 0.82);
  position: relative;
  /* Overlap the solid top bar by 1px so a fractional-pixel rounding gap
     between the two bars can never open (the earlier white line). */
  margin-top: -1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 60%),
    var(--glass-tint);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
/* Over the light page the tint needs a little more weight to keep the
   white menu text crisp. */
:root[data-theme="light"] .site-header .nav {
  --glass-tint: rgba(20, 24, 31, 0.9);
}
.site-header .nav.is-scrolled {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 30px -16px rgba(8, 12, 20, 0.55);
}
.topbar {
  position: relative;
  z-index: 1;
}
/* Browsers without backdrop blur keep a solid bar. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header .nav {
    background: #191d24;
  }
}

/* ---------- Dark mode boxes ---------- */

/* Every box from the gallery down uses the procedure cards' fill (canvas
   with a touch of brand blue) and their softer border, instead of the mix
   of greys it had before. The blue accent on the first consultation card
   is kept. */
:root[data-theme="dark"] {
  --dark-box: color-mix(in srgb, var(--canvas) 94%, var(--blue));
  --dark-box-line: color-mix(in srgb, var(--line) 70%, transparent);
}
:root[data-theme="dark"] :is(.gallery-panel, .offer, .consultation-card, .team .team-card-body) {
  background-color: var(--dark-box);
  border-left-color: var(--dark-box-line);
  border-right-color: var(--dark-box-line);
  border-bottom-color: var(--dark-box-line);
}
:root[data-theme="dark"] :is(.gallery-panel, .offer-muted, .consultation-card, .team .team-card-body) {
  border-top-color: var(--dark-box-line);
}
:root[data-theme="dark"] .team .team-photo {
  border-color: var(--dark-box-line);
}
:root[data-theme="dark"] .gallery-zoom img {
  background-color: var(--dark-box);
}

/* ---------- Hero team avatars ---------- */

/* The two source photos are framed differently (head-and-shoulders vs
   half-body), and the previous crop used object-view-box, which only
   Chromium supports. Each avatar is now a fixed circular frame that clips
   a scaled, offset photo, matched so both faces are the same size and
   height in every browser. */
.hero-avatars .hero-avatar {
  position: relative;
  display: block;
  flex: none;
  width: 38px;
  height: 38px;
  margin: 3px 0 3px -5px;
  overflow: hidden;
  border-radius: 50%;
  border: 0;
  box-shadow: 0 0 0 3px var(--paper);
  background: #fff;
}
.hero-avatars .hero-avatar img {
  position: absolute;
  max-width: none;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: fill;
  object-view-box: none;
  background: none;
}
.hero-avatar-rughinis img {
  width: 129.2%;
  left: -14.6%;
  top: -16.6%;
}
.hero-avatar-calin img {
  width: 128.2%;
  left: -12.8%;
  top: -2%;
}

/* "Still unsure?": the latest blog post beside the private community. */
.offers .section-intro {
  margin-top: 14px;
}
.offers .offers-grid {
  margin-top: 36px;
}
/* Two cards side by side leave too little room below about 860px, so the
   section stacks there and each card gets the full width. */
@media (max-width: 860px) {
  .offers .offers-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* The card is a size container with three layouts:
   - wide: the cover on the left, with date, title, excerpt and buttons
     beside it and the buttons aligned to the bottom of the cover;
   - medium (440px and below): date and title beside a cover that scales
     with the card, with the excerpt and buttons underneath;
   - narrow (270px and below): everything in one column. */
.offer.offer-post {
  container: offer-post / inline-size;
}
.offer-post > div:first-child {
  width: 100%;
}
.offer-post-body {
  display: grid;
  grid-template-columns: clamp(150px, 40%, 220px) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "cover meta"
    "cover text"
    "cover actions";
  gap: 0 26px;
  align-items: start;
  margin-top: 23px;
}
.offer-post-cover {
  grid-area: cover;
}
.offer-post-meta {
  grid-area: meta;
}
.offer-post-body > p {
  grid-area: text;
}
.offer-post-actions {
  grid-area: actions;
  align-self: end;
  padding-top: 22px;
}
@container offer-post (max-width: 440px) {
  .offer-post-body {
    grid-template-columns: clamp(104px, 44%, 160px) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "cover meta"
      "text text"
      "actions actions";
    gap: 18px;
  }
  .offer-post-actions {
    padding-top: 12px;
  }
}
@container offer-post (max-width: 270px) {
  .offer-post-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "cover"
      "meta"
      "text"
      "actions";
    gap: 16px;
  }
  .offer-post-cover {
    width: 150px;
  }
}
.offer-post-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--line);
}
.offer-post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Videos are framed for TikTok, with mostly black space at the bottom
     for its captions and buttons, so keep the top and crop the bottom. */
  object-position: center top;
  transform-origin: center top;
  transition: transform 0.4s ease;
}
.offer-post-duration {
  position: absolute;
  left: 7px;
  bottom: 7px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(10, 13, 18, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.offer-post-date {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.offer.offer-post h3 {
  font-size: 22px;
  margin: 6px 0 10px;
  /* Titles come from the blog; never let a long word leave the card. */
  overflow-wrap: break-word;
  hyphens: auto;
}
.offer-post h3 a {
  color: inherit;
  text-decoration: none;
}
.offer-post-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}
.offer-post-all {
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (hover: hover) {
  .offer-post:has(a:hover) .offer-post-cover img {
    transform: scale(1.04);
  }
  .offer-post h3 a:hover,
  .offer-post-all:hover {
    color: var(--blue);
  }
}
@media (max-width: 540px) {
  .offer.offer-post h3 {
    font-size: 19px;
  }
  .offer-post-actions {
    justify-content: center;
  }
}
/* A post without a poster shows the Osteon mark on the cover tile. */
.offer-post-cover-empty {
  display: grid;
  place-items: center;
}
.offer-post-cover .offer-post-logo {
  width: 40%;
  height: auto;
  object-fit: contain;
  opacity: 0.7;
}
