/* AGENCY TOP 1.1 · photo-derived atmosphere, layered over the existing layout.
   palette.js owns the colors; this file owns their presentation. */
.atop-site,.atop-native-dialog,.atop-gallery-popup {
  --color-primary:#474747; --color-secondary:#404040; --color-accent:#b6b6b6;
  --color-background:#0d0e0f; --color-surface:#1b1c1e; --color-text:#f5f5f4;
  --color-muted:#bebebe; --color-dark:#101112; --color-highlight:#d4d4d2;
  --color-on-primary:#f5f5f4; --color-on-accent:#08090b;
  --site-primary:var(--color-primary); --site-accent:var(--color-accent);
  --site-bg:var(--color-background); --site-surface:var(--color-surface);
  --site-text:var(--color-text); --site-muted:var(--color-muted);
  --media-primary-rgb:71 71 71; --media-secondary-rgb:64 64 64;
  --media-accent-rgb:182 182 182; --media-background-rgb:13 14 15;
  --media-surface-rgb:27 28 30; --media-highlight:var(--color-highlight);
  --media-deep:var(--color-dark);
  color:var(--color-text); background-color:var(--color-background);
  font-family:"Segoe UI Variable Display","Segoe UI",Inter,Arial,sans-serif;
  color-scheme:dark;
}
.atop-site { --atop-gutter:clamp(1.1rem,5.5vw,7rem); }
.atop-site,.atop-site *,.atop-native-dialog,.atop-native-dialog * { box-sizing:border-box; }
.atop-site [data-atop-palette] { color:var(--color-text); }
.atop-site[data-atop-ambient],.atop-site [data-atop-ambient] {
  position:relative; isolation:isolate; background-color:var(--color-background);
}
.atop-ambient-layer { position:absolute; inset:0; z-index:-1; pointer-events:none; }
.atop-site :where(main,section,article,header,footer,div,figure,form) { min-inline-size:0; }
.atop-site :where(h1,h2,h3,h4,p,a,button,span,strong,small) { overflow-wrap:break-word; }
.atop-site :is(.primary-button,.outline-button,.preview-share,.favorite-action,.gallery-filters button,.filter-options button,.filter-categories button,.mobile-filter-toggle) {
  min-block-size:2.75rem; min-inline-size:2.75rem; max-inline-size:100%;
}
.atop-site :is(.primary-button,.outline-button) { white-space:normal; text-align:center; }
.atop-site .primary-button {
  background:var(--color-primary); color:var(--color-on-primary); border-color:transparent;
  box-shadow:none; transition:background-color .65s,color .3s,filter .2s;
}
.atop-site .primary-button:hover { background:var(--color-primary); filter:none; outline:1px solid var(--color-accent); outline-offset:3px; }
.atop-site :is(.outline-button,.preview-share) {
  color:var(--color-text); background:rgb(var(--media-surface-rgb)/.86);
  border-color:rgb(var(--media-accent-rgb)/.24); border-radius:2px;
}
.atop-site :is(.eyebrow,.profile-name__surname,.personal-facts-grid svg,.preview-facts svg,.achievement-grid strong) { color:var(--color-highlight); }
.atop-site :is(.hero-copy,.personal-hero__content>p:not(.eyebrow,.personal-hero__name),.preview-location,.preview-facts small,.personal-facts-grid small,.identity-section>div>p:not(.eyebrow),.testimonial-quote>p) { color:var(--color-muted); }
.atop-site :is(.immersive-heading h2,.section-heading h2) { font-size:clamp(2.2rem,5.6vw,6rem); line-height:1.04; }
.atop-site :is(.filter-options button.active,.filter-categories button.active,.gallery-filters button.active) {
  background:var(--color-primary); color:var(--color-on-primary); border-color:transparent;
}
.atop-site :is(.filter-options button,.gallery-filters button,.atop-active-filters button) { border-radius:2px; }
.atop-site :is(.hero-aurora,.atop-atmosphere-orb) { opacity:.2; }
.atop-site :is(.half-screen-section,.full-screen-section) {
  background-color:var(--color-background); color:var(--color-text);
}
.atop-site :is(.identity-section,.personal-final,.rating-section,.advertise-section,.closing-section) {
  background:linear-gradient(130deg,rgb(var(--media-secondary-rgb)/.10),transparent 72%),var(--color-background);
  color:var(--color-text);
}
.atop-site :is(.identity-section,.personal-final,.rating-section) :is(h2,h3,a,strong) { color:var(--color-text); }
.atop-site .identity-section .primary-button { color:var(--color-on-primary); }
.atop-site .identity-section :is(p,.tag-row span) { color:var(--color-muted); }
.atop-site .rating-bars article>i { background:rgb(var(--media-accent-rgb)/.12); }
.atop-site .rating-bars article>i:before { background:var(--color-accent); }
.atop-site .atop-atmosphere {
  background:radial-gradient(ellipse at 75% 60%,rgb(var(--media-secondary-rgb)/.18),transparent 65%),var(--color-background);
}
/* Acrylic: controlled translucent tint, blur, and a very fine grain. */
.atop-site .acrylic,.atop-native-dialog .acrylic,.atop-site .site-header--scrolled {
  background-color:rgb(var(--media-surface-rgb)/.90);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' opacity='.025' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
  backdrop-filter:blur(1.5rem) saturate(1.05); -webkit-backdrop-filter:blur(1.5rem) saturate(1.05);
  border-color:rgb(var(--media-accent-rgb)/.13); border-radius:2px; box-shadow:none;
  color:var(--color-text);
}
.atop-site .acrylic:before,.atop-native-dialog .acrylic:before { opacity:.12; }
.atop-site .difference-grid>article { background:transparent; border:0; box-shadow:none; backdrop-filter:none; }
.atop-site :is(.comments-track,.journal-grid)>article { border:0; }
.atop-site .contact-form :is(input,textarea),.atop-site .review-form :is(input,textarea,select) {
  min-inline-size:0; max-inline-size:100%; color:var(--color-text); background:var(--color-background); border-color:rgb(var(--media-accent-rgb)/.22);
}
.atop-site .contact-form :is(input,textarea)::placeholder { color:var(--color-muted); }
/* Main photographs remain intact. The surrounding atmosphere fills any space. */
.atop-site :is(.portal-hero__media,.personal-hero__media),
.atop-site .profile-preview__media>.preview-photo,
.atop-site .personal-facts__photo img,.atop-site .identity-photo img,
.atop-site .testimonial-section>img,.atop-site .personal-gallery-grid a img,
.atop-site .immersive-profile-card__open>img,.atop-site .atop-photo-breather>img {
  object-fit:contain; object-position:center; transform:none; filter:none;
}
.atop-site .immersive-profile-card:hover .immersive-profile-card__open>img { transform:none; }
.atop-site .immersive-profile-card { background:var(--color-background); border-radius:0; }
.atop-site .immersive-profile-card__open:after {
  background:linear-gradient(0deg,rgb(var(--media-background-rgb)/.94),transparent 60%);
}
.atop-site :is(.portal-hero,.personal-hero) {
  display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);
  grid-template-rows:minmax(34rem,1fr) auto; min-block-size:100svh;
  padding:clamp(6rem,10vw,9rem) var(--atop-gutter) 0;
  overflow:clip; gap:0 clamp(1rem,3vw,4rem);
}
.atop-site :is(.portal-hero__media,.personal-hero__media) {
  position:relative; inset:auto; grid-column:2; grid-row:1;
  width:100%; height:100%; max-block-size:85svh; align-self:center;
  z-index:1; opacity:1; margin:0;
}
.atop-site :is(.portal-hero__content,.personal-hero__content) {
  position:relative; inset:auto; grid-column:1; grid-row:1; align-self:center;
  width:auto; max-width:none; margin:0; padding:clamp(2rem,4vw,5rem) 0; z-index:2;
}
.atop-site :is(.portal-hero__content,.personal-hero__content) h1 {
  font-size:clamp(2.6rem,5.4vw,6.8rem); line-height:.98; letter-spacing:-.055em; max-width:100%;
}
.atop-site :is(.portal-hero__veil,.personal-hero__veil) {
  background:linear-gradient(0deg,rgb(var(--media-background-rgb)/.18),transparent 40%); z-index:1; pointer-events:none;
}
.atop-site .hero-feature-strip {
  position:relative; inset:auto; grid-column:1/-1; grid-row:2; width:100%; margin:clamp(2rem,4vw,4rem) 0 0;
  padding:clamp(1.5rem,3vw,3rem) 0; gap:clamp(1.25rem,3vw,4rem);
  background:transparent; border-color:rgb(var(--media-accent-rgb)/.15);
}
.atop-site .hero-index { top:auto; bottom:1.5rem; right:1rem; z-index:2; }
.atop-site .hero-buttons { flex-wrap:wrap; gap:1rem; }
.atop-site :is(.personal-facts,.identity-section,.testimonial-section,.personal-contact,.rating-section) {
  grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(2rem,5vw,6rem);
}
.atop-site .personal-facts__photo { min-block-size:0; }
.atop-site .personal-facts__photo img { min-height:0; max-block-size:90svh; }
.atop-site :is(.identity-photo,.testimonial-section>img) { min-height:0; }
.atop-site .identity-photo img,.atop-site .testimonial-section>img { max-block-size:85svh; }
.atop-site .personal-facts__content { padding:clamp(1.5rem,4vw,4rem); }
.atop-site .personal-facts-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.atop-site .personal-facts-grid article { border-radius:0; background:transparent; border:0; box-shadow:none; }
.atop-site .personal-gallery-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(1rem,2.5vw,3rem); }
.atop-site .personal-gallery-grid figure { min-height:0; aspect-ratio:3/4; margin:0; background:var(--color-background); }
.atop-site .personal-gallery-grid figure a { height:100%; }
.atop-site .personal-gallery-grid figcaption { background:linear-gradient(0deg,rgb(var(--media-background-rgb)/.96),transparent); color:var(--color-text); }
.atop-site .atop-photo-breather { min-block-size:70svh; }
.atop-site .atop-photo-breather>img { opacity:.90; }
.atop-site .service-marquee>a { max-inline-size:100%; overflow-wrap:anywhere; }
/* Quick view keeps its original Magnific AJAX lifecycle and native controls. */
.atop-popup.mfp-bg { background:#08090b; opacity:.16; }
.atop-popup .mfp-content { width:100%; }
.atop-site.atop-preview-root {
  width:100%; min-height:100dvh; background:rgb(var(--media-background-rgb)/.70);
  backdrop-filter:blur(1.5rem) saturate(1.05); -webkit-backdrop-filter:blur(1.5rem) saturate(1.05);
  transition:background-color .65s;
}
.atop-preview-root .profile-preview {
  display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); gap:0;
  width:100%; height:100dvh; min-height:100dvh; overflow:auto;
  background:transparent; border-radius:0; box-shadow:none;
}
.atop-preview-root .profile-preview__media { min-height:0; background:transparent; }
.atop-preview-root .profile-preview__media>.preview-photo { width:100%; height:100%; padding:clamp(1rem,3vw,3rem); }
.atop-preview-root .preview-media-shade { background:linear-gradient(0deg,rgb(var(--media-background-rgb)/.38),transparent 30%); pointer-events:none; }
.atop-preview-root .profile-preview__content {
  padding:clamp(4.75rem,7vw,7rem) clamp(1.5rem,4vw,5rem) clamp(2rem,4vw,4rem);
  background:rgb(var(--media-surface-rgb)/.86); overflow-y:auto;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' opacity='.025' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
  transition:background-color .65s;
}
.atop-preview-root .profile-preview__content h2 { font-size:clamp(2.3rem,4.7vw,5rem); line-height:1; }
.atop-preview-root .preview-facts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.3rem 1rem; }
.atop-preview-root .preview-facts>div { min-width:0; }
.atop-preview-root .preview-facts strong { white-space:normal; }
.atop-preview-root .preview-actions { display:flex; flex-wrap:wrap; gap:1rem; }
.atop-preview-root :is(.preview-close,.preview-arrow) {
  position:fixed; z-index:30; min-width:2.75rem; min-height:2.75rem;
  border:0; border-radius:0; color:var(--color-text); background:rgb(var(--media-surface-rgb)/.9);
  backdrop-filter:blur(1rem); -webkit-backdrop-filter:blur(1rem);
}
.atop-preview-root .preview-close { top:1rem; right:1rem; padding:.5rem .8rem; }
.atop-preview-root .preview-arrow--left { left:.5rem; }
.atop-preview-root .preview-arrow--right { right:.5rem; }
.atop-native-dialog { background:rgb(var(--media-surface-rgb)/.90); border:0; border-radius:2px; }
.atop-native-dialog .service-dialog { color:var(--color-text); padding:clamp(2.5rem,6vw,4rem); }
.atop-gallery-popup.mfp-bg { background:var(--color-background); opacity:.95; transition:background-color .65s; }
.atop-gallery-popup .mfp-figure:after { background:var(--color-surface); box-shadow:none; }
.atop-gallery-popup .mfp-title,.atop-gallery-popup .mfp-counter { color:var(--color-text); }
.atop-site :focus-visible,.atop-native-dialog :focus-visible { outline:2px solid var(--color-highlight); outline-offset:4px; }
@media (max-width:64rem) {
  .atop-site :is(.portal-hero,.personal-hero) { grid-template-rows:minmax(28rem,1fr) auto; }
  .atop-site .personal-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .atop-site .personal-facts-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .atop-site .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .atop-site .hero-feature-strip { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
  .atop-site .hero-feature-strip article { display:block; padding:0; }
}
@media (max-width:48rem) {
  .atop-site :is(.portal-hero,.personal-hero) {
    display:flex; flex-direction:column; min-height:auto; gap:0;
    padding:clamp(5rem,14vw,6rem) var(--atop-gutter) 0;
  }
  .atop-site :is(.portal-hero__media,.personal-hero__media) { order:0; width:100%; height:auto; max-height:70svh; min-height:0; }
  .atop-site :is(.portal-hero__content,.personal-hero__content) { order:1; width:100%; padding:2rem 0; }
  .atop-site :is(.portal-hero__content,.personal-hero__content) h1 { font-size:clamp(2.5rem,10vw,4.5rem); }
  .atop-site .hero-feature-strip { order:2; display:grid; grid-template-columns:1fr; gap:1.4rem; margin:0; padding:2rem 0; }
  .atop-site .hero-feature-strip article { display:flex; gap:1rem; }
  .atop-site :is(.portal-hero__veil,.personal-hero__veil) { background:transparent; }
  .atop-site :is(.personal-facts,.identity-section,.testimonial-section,.personal-contact,.rating-section,.social-section,.advertise-section,.closing-section) { grid-template-columns:minmax(0,1fr); }
  .atop-site .personal-facts__photo img { width:100%; height:auto; max-height:80svh; }
  .atop-site .identity-photo img,.atop-site .testimonial-section>img { width:100%; height:auto; max-height:80svh; }
  .atop-site .testimonial-section>img { order:-1; }
  .atop-site .personal-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .atop-site .achievement-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .atop-site .difference-grid,.atop-site .journal-grid { grid-template-columns:minmax(0,1fr); }
  .atop-site .form-grid { grid-template-columns:minmax(0,1fr); }
  .atop-site .main-nav--open { background:rgb(var(--media-surface-rgb)/.98); color:var(--color-text); max-height:75dvh; overflow:auto; }
  .atop-site.atop-preview-root .profile-preview { display:flex; flex-direction:column; height:auto; min-height:100dvh; overflow:visible; }
  .atop-preview-root .profile-preview__media { height:auto; min-height:0; padding:4.5rem 1rem 1rem; }
  .atop-preview-root .profile-preview__media>.preview-photo { position:relative; height:auto; max-height:70svh; padding:0; }
  .atop-preview-root .profile-preview__content { width:100%; padding:2rem clamp(1.2rem,5vw,2.5rem) 3rem; overflow:visible; }
  .atop-preview-root .preview-arrow { top:35svh; }
  .atop-preview-root .preview-actions>* { flex:1 1 12rem; }
}
@media (max-width:25rem) {
  .atop-site .catalog-grid,.atop-site .personal-gallery-grid { grid-template-columns:minmax(0,1fr); }
  .atop-site .personal-facts-grid,.atop-preview-root .preview-facts { gap:1.25rem .8rem; }
  .atop-site .hero-buttons>* { width:100%; }
}
@supports not (backdrop-filter:blur(1rem)) {
  .atop-site .acrylic,.atop-native-dialog,.atop-native-dialog .acrylic,.atop-site.atop-preview-root,.atop-preview-root .profile-preview__content { background-color:var(--color-surface); }
}
@media (prefers-reduced-transparency:reduce) {
  .atop-site .acrylic,.atop-native-dialog,.atop-native-dialog .acrylic,.atop-site.atop-preview-root,.atop-preview-root .profile-preview__content { background:var(--color-surface); backdrop-filter:none; -webkit-backdrop-filter:none; }
}
@media (prefers-reduced-motion:reduce) {
  .atop-site,.atop-site *,.atop-native-dialog,.atop-gallery-popup { transition:none!important; animation:none!important; scroll-behavior:auto; }
}
/* Match the specificity of Archi/Sites layout variants without changing them. */
.atop-site .catalog-section[data-layout] .filter-console {
  width:100%; margin-inline:0; border-radius:2px;
}
.atop-preview-root .profile-preview .preview-close {
  left:auto; right:1rem; width:auto; max-width:calc(100% - 2rem); transform:none; margin:0;
}
.atop-site :is(.preview-section-label,.gallery-filters button,.preview-meta-row) { color:var(--color-muted); }
.atop-site .preview-services>a { display:inline-flex; align-items:center; min-height:2.75rem; }
.atop-site .personal-facts-grid article,.atop-preview-root .preview-facts>div { background:transparent; box-shadow:none; border:0; }
/* Archi uses a 10px root. Keep touch targets usable inside its native popups. */
.atop-site :is(button,.primary-button,.outline-button,.preview-services>a),.atop-native-dialog button {
  min-height:max(2.75rem,44px);
}
.atop-preview-root :is(.preview-close,.preview-arrow) {min-width:max(2.75rem,44px);}
body:not(.atop-body) .atop-preview-root .profile-preview__content h2 {font-size:clamp(2.3em,4.7vw,5em);}
@media(max-width:48rem){body:not(.atop-body) .atop-preview-root .profile-preview__content {padding:2em 1.5em 3em;}body:not(.atop-body) .atop-preview-root .profile-preview__media {padding:4.5em 1em 1em;}}
