/* Theme values from the approved RAIBIZCLUB v3.1 palette. */
:root,[data-theme="light"]{
  color-scheme:light;
  --rb-canvas:#F7F7F4;
  --rb-surface:#FFFFFF;
  --rb-surface-subtle:#F1F1ED;
  --rb-text:#171717;
  --rb-text-muted:#62625D;
  --rb-text-accent:#A91C13;
  --rb-border:#D8D8D2;
  --rb-control-border:#777772;
  --rb-action:#D5221A;
  --rb-action-text:#FFFFFF;
  --rb-focus:#97180F;
  --rb-success:#246B44;
  --rb-warning:#805100;
  --rb-error:#A91C13;
  --rb-logo-pulse:#E52D20;
  --rb-shadow:0 12px 32px rgba(17,17,17,.08);
}
[data-theme="dark"]{
  color-scheme:dark;
  --rb-canvas:#111110;
  --rb-surface:#1E1E1C;
  --rb-surface-subtle:#292927;
  --rb-text:#F7F7F4;
  --rb-text-muted:#B7B7B0;
  --rb-text-accent:#FF8B82;
  --rb-border:#4A4A46;
  --rb-control-border:#93938C;
  --rb-action:#D5221A;
  --rb-action-text:#FFFFFF;
  --rb-focus:#FF8B82;
  --rb-success:#91DCAC;
  --rb-warning:#F0C477;
  --rb-error:#FF8B82;
  --rb-logo-pulse:#E52D20;
  --rb-shadow:0 12px 32px rgba(0,0,0,.32);
}

/* The same semantic colors apply to every agency page. Images and client frames
   retain their artwork, and the four featured product cards own their palette. */
:root {
  --header-height:76px;
  --cream:var(--rb-canvas); --ink:var(--rb-text); --muted:var(--rb-text-muted);
  --surface:var(--rb-surface); --raised:var(--rb-surface-subtle); --line:var(--rb-border);
}
html[data-theme] body, html[data-theme] .panel, html[data-theme] .panel.dark,
html[data-theme] .inner-hero:not(.photo-hero) {
  background:var(--rb-canvas); color:var(--rb-text);
}
html[data-theme] .site-header, html[data-theme] body:has(.photo-hero) .site-header,
html[data-theme] .full-menu, html[data-theme] .footer {
  background:var(--rb-surface); color:var(--rb-text);
}
html[data-theme] .site-header { box-shadow:0 1px 0 var(--rb-border); }
html[data-theme] :is(.header-left .menu-toggle,.header-back,.account-link,.footer-contact>a,.menu-close,.full-menu nav a) {
  color:var(--rb-text);
}
html[data-theme] :is(.header-back,.account-link,.menu-toggle,.full-menu nav a,.footer a):is(:hover,:focus-visible),
html[data-theme] .full-menu nav a[aria-current=page] { color:var(--rb-text-accent); }
html[data-theme] :is(.full-menu nav a,.footer-bottom,.footer-bottom small,.footer-lead,.detail,.faq details,
                    .table-scroll td,.table-scroll th,.editorial-detail,.receipt>div,.project-dialog footer,
                    .project-dialog header,.booking-layout>div:first-child,.footer-contact>a) { border-color:var(--rb-border); }
html[data-theme] .full-menu { padding:22px 24px 28px; }
.menu-brand { display:flex; width:fit-content; max-width:calc(100% - 52px); height:44px; align-items:center; margin:0 0 24px; }
.menu-brand img { display:block; width:174px; max-width:100%; height:auto; }
.full-menu .menu-close { width:44px; height:44px; right:14px; top:20px; }
html[data-theme] :is(.language-switch,.theme-switch) {
  color:var(--rb-text); background:var(--rb-surface-subtle); border-color:var(--rb-control-border);
}
html[data-theme] .language-switch a, html[data-theme] .theme-switch { color:var(--rb-text); }
html[data-theme] .language-switch a[aria-current=page] { background:var(--rb-action); color:#fff; }
html[data-theme] :focus-visible { outline:2px solid var(--rb-focus); outline-offset:2px; }

html[data-theme] :is(.black-card,.stage,.tabs,.tab-panels [role=tabpanel],.receipt,.project-dialog,
                    .session-invite,.inquiry-dialog,.booking-layout,.case-fact,.case-flow>div,
                    .payment-panels article,.journey article,.support-card,.interface) {
  background:var(--rb-surface); color:var(--rb-text); border-color:var(--rb-border);
}
html[data-theme] :is(.black-card,.stage,.case-fact) { border:1px solid var(--rb-border); }
html[data-theme] :is(.journey article,.tab-panels [role=tabpanel],.booking-layout>div:first-child,.project-dialog footer) {
  background:var(--rb-surface-subtle);
}
html[data-theme] :is(.section-head p,.detail p,.journey p,.case-card>p,.faq details p,.receipt small,.case-fact span,
                    .editorial-copy p,.direction-tabs dd,.payment-panels p,.timezone-note,.footer-contact>span,
                    .footer-bottom>small,.draft-note,.project-fallback p) { color:var(--rb-text-muted); }
html[data-theme] :is(.eyebrow,.black-card>span,.journey small,.detail>span,.receipt>strong,.faq summary span,
                    .case-flow small,.direction-tabs dt,.editorial-detail summary span,.case-fact span:first-child,
                    .carousel-controls [data-stage-label],.scroll-cue,.payment-panels dt) { color:var(--rb-text-accent); }
html[data-theme] .case-card>p { line-height:1.5; white-space:normal; overflow-wrap:break-word; }
html[data-theme] :is(.tab-buttons button,.filters button,.carousel-controls button,.project-dialog header button,
                    .project-dialog .text-link,.editorial-detail summary,.project-recovery) { color:var(--rb-text); }
html[data-theme] .direction-tabs [role=tab][aria-selected=true],
html[data-theme] .tab-buttons button[aria-pressed=true],
html[data-theme] .direction-tabs .tab-number { color:var(--rb-text-accent); }
html[data-theme] .direction-tabs [role=tab][aria-selected=true] { background:var(--rb-surface-subtle); border-color:var(--rb-border); }
html[data-theme] .filters button[aria-pressed=true] { background:var(--rb-action); border-color:var(--rb-action); color:#fff; }
html[data-theme] :is(.section-head,.case-fact,.project-dialog,.project-recovery,.text-link) .arrow-icon { color:currentColor; }
html[data-theme] :is(.project-view,.project-fallback,.project-wait,.payment-panels,.inquiry-dialog,.booking-result) {
  background:var(--rb-surface); color:var(--rb-text);
}
html[data-theme] .final-cta { background:var(--rb-surface); color:var(--rb-text); border-color:var(--rb-control-border); }
html[data-theme] .final-cta>span { border-color:var(--rb-control-border); }
html[data-theme=light] .final-cta img { filter:none; }
html[data-theme=dark] .final-cta img { filter:invert(1); }
html[data-theme] .final-cta:where(:hover,:focus-visible) { border-color:var(--rb-text-accent); }
html[data-theme] .session-invite .invite-project { color:var(--rb-text); border-color:var(--rb-control-border); background:transparent; }
html[data-theme] .session-invite .invite-project .arrow-icon { color:currentColor; }
html[data-theme] :is(.inquiry-dialog,.footer-lead,.booking) :is(input,textarea,select) {
  color:var(--rb-text); background:var(--rb-surface); border-color:var(--rb-control-border); font-size:16px;
}
html[data-theme] :is(input,textarea)::placeholder { color:var(--rb-text-muted); opacity:1; }
html[data-theme] :is(.form-status,.selection-summary,.month-head,.weekday) { color:var(--rb-text); }
html[data-theme] .form-status[data-state=error] { color:var(--rb-error); }
html[data-theme] .form-status[data-state=sent] { color:var(--rb-success); }
.form-status:not(:empty) { margin-top:12px; }
.inquiry-dialog .form-status,.footer .form-status,.booking .form-status { font-size:14px; line-height:1.45; }
html[data-theme] :is(.inquiry-dialog,.booking,.footer-lead) button[type=submit] { background:var(--rb-action); color:#fff; }
html[data-theme] form button[type=submit]:disabled { background:var(--rb-surface-subtle); color:var(--rb-text-muted); border:1px solid var(--rb-border); }
html[data-theme] form button:disabled .arrow-icon { color:inherit; }
[data-consent-wrap] { display:flex!important; align-items:baseline; gap:8px; line-height:1.4; }
[data-consent-wrap][hidden] { display:none!important; }
html[data-theme] [data-consent-wrap] input { width:1em; min-height:0; height:1em; padding:0; accent-color:var(--rb-action); }
[data-consent-wrap] a { text-decoration:underline; }
html[data-theme] :is(.calendar-grid button,.slots button,.weekday,.month-head button,[data-zone]) { color:var(--rb-text)!important; }
html[data-theme] :is(.calendar-grid button,.slots button) { background:var(--rb-surface-subtle); }
html[data-theme] :is(.calendar-grid button,.slots button)[aria-pressed=true] { color:white!important; background:var(--rb-action); }
html[data-theme] :is(.calendar-grid button,.slots button,.month-head button):disabled { color:var(--rb-text-muted)!important; background:var(--rb-surface-subtle); }
html[data-theme] .packages .package-light:not(.support-card) { background:#fff; color:#171717; border-color:#d8d8d2; }
html[data-theme] .packages .package-dark { background:#111110; color:#f7f7f4; border-color:#4a4a46; }
html[data-theme] .packages .support-card { background:var(--rb-surface); color:var(--rb-text); }
html[data-theme] .packages .package .button { background:#bf201a; color:#fff; }
html[data-theme] .packages .package .button:is(:hover,:focus-visible) { background:#a91c13; }
html[data-theme] .packages .package-dark>strong { color:#ff8b82; }
html[data-theme] .packages .package-light>strong { color:#a91c13; }
html[data-theme] .packages .support-card>strong { color:var(--rb-text-accent); }
html[data-theme] .packages .package :is(small,p,li) { color:inherit; }
.carousel-controls { display:flex; align-items:center; flex-wrap:nowrap; }
.carousel-controls button:disabled { opacity:.45; }
.site-header .compact-language { display:none; }
/* Keep the overlay controls on the current Emil cover clear of its printed wordmark. */
.case-visual.case-emil-shabaev { padding:0; }
.case-card .case-visual.case-emil-shabaev>i { bottom:16px!important; }

/* A single image and live text, composed around the negative space in Egor's portrait. */
.founder-feature {
  scroll-margin-top:calc(var(--header-height) + 20px);
  display:grid; align-content:space-between; position:relative; isolation:isolate; overflow:hidden;
  min-height:clamp(430px,44vw,650px); padding:clamp(25px,4.5vw,70px);
  border-radius:22px; background:#171a15; color:#fff;
}
.founder-feature>img { position:absolute; inset:0; z-index:-2; width:100%; height:100%; object-fit:cover; object-position:50% 40%; }
.founder-feature::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#060906cc,transparent 52%); pointer-events:none; }
.founder-feature header,.founder-feature .founder-invitation { width:min(40%,480px); }
.founder-feature header p { color:#fff; font-size:clamp(11px,1vw,14px); line-height:1.4; font-weight:650; letter-spacing:.11em; text-transform:uppercase; margin:0 0 12px; }
.founder-feature h2 { color:#fff; font:clamp(36px,4.7vw,72px)/1.02 RAI,Manrope,sans-serif; letter-spacing:-.04em; margin:0; }
.founder-feature h2 span { display:block; }
.founder-invitation p { color:#fff; font-size:clamp(15px,1.25vw,19px); line-height:1.5; margin:0 0 20px; }
html[data-theme] .founder-feature .button { background:#d5221a; color:#fff; }
html[data-theme] .founder-feature .button:hover { background:#a91c13; color:#fff; }
.founder-feature .arrow-icon { color:currentColor; }

@media(max-width:760px) {
  :root { --header-height:54px; }
  .site-header,body:has(.photo-hero) .site-header {
    height:var(--header-height); padding:0 12px; display:grid; grid-template-columns:1fr auto 1fr;
    gap:4px; align-items:center;
  }
  .site-header :is(.header-left,.head-right) { display:flex; align-items:center; flex-wrap:nowrap; gap:1px; height:auto; }
  .header-left .menu-toggle,.site-header .header-back,.site-header .account-link {
    position:static; min-width:38px; width:38px; min-height:44px; height:44px; margin:0; padding:0; color:inherit;
  }
  .header-left .menu-toggle i { width:19px; }.header-left .menu-toggle span,.site-header .account-link span { display:none; }
  .site-header .logo { display:flex; align-items:center; justify-content:center; width:clamp(95px,29vw,158px); height:44px; }
  .site-header .logo img,body:has(.photo-hero) .site-header .logo img:first-child { display:block; width:100%; height:auto; max-height:34px; }
  .site-header .head-right { justify-self:end; grid-column:3; }
  .head-right .theme-switch { display:flex; position:static; border:0; width:38px; height:44px; padding:0; background:transparent; }
  .head-right .theme-switch svg { width:29px; height:29px; padding:5px; }
  .head-right .theme-switch[aria-checked=false] svg:last-child,.head-right .theme-switch[aria-checked=true] svg:first-child { display:none; }
  .head-right .language-switch { position:static; background:none; border:0; padding:0; transform:none; height:44px; }
  .head-right .language-switch a { min-width:38px; min-height:44px; padding:0; color:var(--rb-text); font-size:11px; }
  .head-right .language-switch [aria-current=page],.head-right .wide-language { display:none; }
  .head-right .compact-language { display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:27px; border:1px solid var(--rb-control-border); border-radius:99px; font-weight:650; }
  .inner-hero { padding-top:calc(var(--header-height) + 36px); }
  .booking { padding-top:calc(var(--header-height) + 28px); }
  .panel,.inner-hero,#inquiry,#contact-actions { scroll-margin-top:calc(var(--header-height) + 10px); }
  .home-text { padding-top:0; }
  .full-menu .menu-brand { margin-bottom:16px; }
  .founder-feature { min-height:clamp(510px,134vw,660px); padding:clamp(18px,5vw,36px); }
  .founder-feature header,.founder-feature .founder-invitation { width:100%; max-width:32rem; }
  .founder-feature>img { object-position:center 44%; }
  .founder-feature::before { background:linear-gradient(180deg,#06090655,transparent 25%,transparent 53%,#070907b8 81%,#070907ee); }
  .founder-feature header p { font-size:11px; margin-bottom:7px; }
  .founder-feature h2 { font-size:clamp(24px,5.6vw,40px); line-height:1.12; }
  .founder-feature h2 span { display:inline; }
  .founder-invitation p { font-size:15px; line-height:1.45; margin-bottom:14px; }
}
@media(max-width:365px) {
  .site-header,body:has(.photo-hero) .site-header { padding-inline:6px; gap:0; grid-template-columns:minmax(78px,1fr) auto minmax(114px,1fr); }
  .site-header .logo { width:91px; }.site-header .head-right { gap:0; }
}
@media(prefers-reduced-motion:reduce) {
  .home-text { padding-top:calc(var(--header-height) + 32px); }
}
html[data-theme=light] img[data-theme-logo] { content:url('/assets/logo-black.svg'); filter:none; }
html[data-theme=dark] img[data-theme-logo] { content:url('/assets/logo-white.svg'); filter:none; }
