/* Raadi Capital Group: shared styles (colours, day/night, cursor, motion hooks) */
:root{
  --bg:#F7F1E8;--bg-alt:#EFE5D6;--bg-warm:#EADCC8;--card:#FBF7F1;
  --ink:#1B2433;--ink-2:#4A5162;--line:#E5D7C3;
  --accent:#A4532F;--accent-hover:#8E4627;--accent-ink:#F7F1E8;--deco:#B5603A;
  --band:#1B2433;--band-ink:#F7F1E8;--error:#9A3A1E;
  /* extras (safe to ignore) */
  --line-2:#D5C3A8;--field:#6F6A5C;--band-ink-2:#D8CBB8;--band-line:rgba(247,241,232,.18);
  --shadow:0 1px 2px rgba(27,36,51,.04),0 12px 32px -16px rgba(27,36,51,.18);
  --ease:cubic-bezier(.3,.7,.2,1);
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .14 0 0 0 0 .2 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.075'/%3E%3C/svg%3E");
  color-scheme:light;
}
html[data-theme="dark"]{
  --bg:#121821;--bg-alt:#182030;--bg-warm:#1E2636;--card:#1C2534;
  --ink:#F3EBDD;--ink-2:#C9BFAF;--line:#2C3647;
  --accent:#D27A50;--accent-hover:#E08A60;--accent-ink:#121821;--deco:#C9764F;
  --band:#0B1017;--band-ink:#F3EBDD;--error:#F09A7A;
  --line-2:#38445A;--field:#6E7A8F;--band-ink-2:#C9BFAF;--band-line:rgba(243,235,221,.16);
  --shadow:0 1px 2px rgba(0,0,0,.35),0 12px 32px -16px rgba(0,0,0,.65);
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .95 0 0 0 0 .92 0 0 0 0 .87 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  color-scheme:dark;
}
html{background:var(--bg)}

/* Day and night toggle */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid var(--line);background:transparent;color:var(--ink);cursor:pointer;position:relative;transition:border-color .2s ease,background-color .2s ease;view-transition-name:theme}
.theme-toggle:hover{border-color:var(--deco)}
.theme-toggle svg{width:22px;height:22px;display:block;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.tt-sun,.tt-moon{transform-origin:12px 12px;transition:transform .5s var(--ease),opacity .3s ease}
.tt-sun{opacity:0;transform:rotate(-70deg) scale(.4)}
.tt-moon{opacity:1}
html[data-theme="dark"] .tt-sun{opacity:1;transform:none}
html[data-theme="dark"] .tt-moon{opacity:0;transform:rotate(70deg) scale(.4)}
@media(pointer:coarse){.theme-toggle{width:48px;height:48px}}

/* Smooth change between day and night */
html.theme-fade *,html.theme-fade *::before,html.theme-fade *::after{transition:background-color .45s ease,color .45s ease,border-color .45s ease,fill .45s ease,stroke .45s ease!important}

/* Reading progress */
.progress{position:fixed;left:0;top:0;height:3px;width:100%;background:var(--accent);transform:scaleX(0);transform-origin:0 50%;z-index:60;pointer-events:none}

/* Reveal */
@media(prefers-reduced-motion:no-preference){
  .js .reveal{opacity:0;transform:translateY(16px);transition:opacity .8s ease,transform .8s ease}
  .js .reveal.in{opacity:1;transform:none}
}

/* Buttons: press in (and magnetic pull, set from JS through the translate property) */
html .btn{transition:background-color .2s ease,scale .16s var(--ease)}
html .btn:active{scale:.97}

/* Custom cursor (only exists when JS adds html.has-cursor) */
html.has-cursor,html.has-cursor *{cursor:none}
html.has-cursor input:is([type="text"],[type="email"],[type="tel"],[type="url"],[type="search"],[type="password"],[type="number"],:not([type])),html.has-cursor textarea,html.has-cursor [contenteditable="true"]{cursor:text}
html.has-cursor select{cursor:auto}
.rcg-dot,.rcg-ring,.rcg-label{position:fixed;left:0;top:0;pointer-events:none;z-index:2147483000;opacity:0;will-change:transform}
.rcg-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);transition:opacity .2s ease;view-transition-name:rcg-dot}
.rcg-ring{width:34px;height:34px;border-radius:50%;border:1px solid var(--deco);transition:opacity .2s ease,scale .28s var(--ease);view-transition-name:rcg-ring}
.rcg-ring::before{content:"";position:absolute;inset:-1px;border-radius:50%;background:var(--accent);opacity:0;transition:opacity .25s ease}
.rcg-ring.hot{scale:1.65}
.rcg-ring.hot::before{opacity:.12}
.rcg-ring.hot.down{scale:1.4}
.rcg-ring.down:not(.hot){scale:.85}
.rcg-label{width:56px;height:56px;display:flex;align-items:center;justify-content:center;font:500 11px/1 'DM Sans',system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:var(--accent);transition:opacity .2s ease;view-transition-name:rcg-label}
html.cur-on .rcg-dot,html.cur-on .rcg-ring{opacity:1}
html.cur-on.cur-text .rcg-dot,html.cur-on.cur-text .rcg-ring{opacity:0}
html.cur-on.cur-label:not(.cur-text) .rcg-label{opacity:1}

/* Page transitions */
@view-transition{navigation:auto}
::view-transition-old(root){animation:rcg-out .22s ease both}
::view-transition-new(root){animation:rcg-in .32s ease both}
@keyframes rcg-out{to{opacity:0;transform:translateY(-8px)}}
@keyframes rcg-in{from{opacity:0;transform:translateY(8px)}}
@keyframes rcg-fade-out{to{opacity:0}}
@keyframes rcg-fade-in{from{opacity:0}}
html.theme-vt::view-transition-old(root){animation:rcg-fade-out .45s ease both}
html.theme-vt::view-transition-new(root){animation:rcg-fade-in .45s ease both}
.hdr .brand,header .brand{view-transition-name:brand}
@media(prefers-reduced-motion:reduce){
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
}
