/* WhiteLabelConnectia V2 Premium — Foundation
 * Shared semantic layer for commercial surfaces and application dashboards.
 * V1 styles remain untouched beneath this file until final consolidation.
 */

:root{
  color-scheme:dark;

  /* Typography */
  --wlc-font-sans:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --wlc-font-mono:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
  --wlc-text-xs:.75rem;
  --wlc-text-sm:.875rem;
  --wlc-text-md:1rem;
  --wlc-text-lg:1.125rem;
  --wlc-text-xl:1.375rem;
  --wlc-title-sm:clamp(1.5rem,2.2vw,2rem);
  --wlc-title-md:clamp(2rem,4vw,3.25rem);
  --wlc-title-lg:clamp(2.75rem,6vw,5rem);
  --wlc-leading-tight:1.04;
  --wlc-leading-title:1.12;
  --wlc-leading-body:1.62;
  --wlc-tracking-tight:-.035em;
  --wlc-tracking-title:-.025em;
  --wlc-tracking-label:.085em;

  /* Spacing */
  --wlc-space-1:.25rem;
  --wlc-space-2:.5rem;
  --wlc-space-3:.75rem;
  --wlc-space-4:1rem;
  --wlc-space-5:1.25rem;
  --wlc-space-6:1.5rem;
  --wlc-space-8:2rem;
  --wlc-space-10:2.5rem;
  --wlc-space-12:3rem;
  --wlc-space-16:4rem;
  --wlc-space-20:5rem;
  --wlc-space-24:6rem;

  /* Geometry */
  --wlc-radius-xs:.5rem;
  --wlc-radius-sm:.75rem;
  --wlc-radius-md:1rem;
  --wlc-radius-lg:1.375rem;
  --wlc-radius-xl:1.75rem;
  --wlc-radius-pill:999px;
  --wlc-max:78rem;
  --wlc-reading:44rem;
  --wlc-icon-sm:1rem;
  --wlc-icon-md:1.25rem;
  --wlc-icon-lg:1.5rem;
  --wlc-hit-target:2.875rem;

  /* Motion */
  --wlc-ease:cubic-bezier(.2,.75,.25,1);
  --wlc-duration-fast:140ms;
  --wlc-duration:220ms;
  --wlc-duration-slow:420ms;

  /* Dark semantic palette */
  --wlc-bg:#061321;
  --wlc-bg-elevated:#081a2e;
  --wlc-surface:#0b2039;
  --wlc-surface-2:#0e2948;
  --wlc-surface-3:#123354;
  --wlc-surface-glass:rgba(11,32,57,.82);
  --wlc-text:#f7fbff;
  --wlc-text-2:#d8e6f3;
  --wlc-muted:#9fb3c8;
  --wlc-soft:#7189a1;
  --wlc-line:rgba(220,240,255,.12);
  --wlc-line-strong:rgba(220,240,255,.22);
  --wlc-primary:#1e78ff;
  --wlc-primary-2:#7357f6;
  --wlc-accent:#35d8ff;
  --wlc-success:#4de6a6;
  --wlc-warning:#ffd078;
  --wlc-danger:#ff8f9b;
  --wlc-info:#8ec6ff;

  /* State surfaces */
  --wlc-primary-soft:rgba(30,120,255,.13);
  --wlc-accent-soft:rgba(53,216,255,.10);
  --wlc-success-soft:rgba(77,230,166,.10);
  --wlc-warning-soft:rgba(255,208,120,.10);
  --wlc-danger-soft:rgba(255,143,155,.10);

  /* Elevation */
  --wlc-shadow-1:0 1px 2px rgba(0,0,0,.14),0 10px 28px rgba(0,0,0,.10);
  --wlc-shadow-2:0 18px 48px rgba(0,0,0,.16);
  --wlc-shadow-3:0 30px 90px rgba(0,0,0,.24);

  /* Focus */
  --wlc-focus:0 0 0 3px rgba(53,216,255,.38),0 0 0 6px rgba(6,19,33,.94);

  /* Legacy aliases during migration */
  --ink:var(--wlc-bg);
  --navy:var(--wlc-surface);
  --panel:var(--wlc-surface-2);
  --panel2:var(--wlc-bg-elevated);
  --text:var(--wlc-text);
  --muted:var(--wlc-muted);
  --blue:var(--wlc-primary);
  --cyan:var(--wlc-accent);
  --violet:var(--wlc-primary-2);
  --line:var(--wlc-line);
  --shadow:var(--wlc-shadow-3);
  --radius:var(--wlc-radius-lg);
  --max:var(--wlc-max);

  --app-bg:var(--wlc-bg);
  --app-surface:var(--wlc-surface);
  --app-surface-2:var(--wlc-surface-2);
  --app-text:var(--wlc-text);
  --app-muted:var(--wlc-muted);
  --app-cyan:var(--wlc-accent);
  --app-blue:var(--wlc-primary);
  --app-violet:var(--wlc-primary-2);
  --app-green:var(--wlc-success);
  --app-line:var(--wlc-line);
  --app-shadow:var(--wlc-shadow-3);
}

[data-theme="light"]{
  color-scheme:light;
  --wlc-bg:#f4f7fb;
  --wlc-bg-elevated:#eef3f8;
  --wlc-surface:#ffffff;
  --wlc-surface-2:#f8fafc;
  --wlc-surface-3:#eaf1f7;
  --wlc-surface-glass:rgba(255,255,255,.88);
  --wlc-text:#0b223d;
  --wlc-text-2:#29435d;
  --wlc-muted:#536d86;
  --wlc-soft:#73899e;
  --wlc-line:rgba(11,34,61,.12);
  --wlc-line-strong:rgba(11,34,61,.22);
  --wlc-primary:#075cf0;
  --wlc-primary-2:#6549e8;
  --wlc-accent:#007fa8;
  --wlc-success:#067451;
  --wlc-warning:#8a5a00;
  --wlc-danger:#b4232c;
  --wlc-info:#075cf0;
  --wlc-primary-soft:rgba(7,92,240,.09);
  --wlc-accent-soft:rgba(0,127,168,.08);
  --wlc-success-soft:rgba(6,116,81,.09);
  --wlc-warning-soft:rgba(138,90,0,.08);
  --wlc-danger-soft:rgba(180,35,44,.08);
  --wlc-shadow-1:0 1px 2px rgba(15,40,65,.04),0 10px 26px rgba(15,40,65,.06);
  --wlc-shadow-2:0 18px 46px rgba(15,40,65,.10);
  --wlc-shadow-3:0 32px 80px rgba(15,40,65,.14);
  --wlc-focus:0 0 0 3px rgba(7,92,240,.26),0 0 0 6px rgba(255,255,255,.96);
}

html{
  font-family:var(--wlc-font-sans);
  font-size:16px;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  scroll-padding-top:6rem;
}

body{
  font-family:var(--wlc-font-sans);
  font-size:var(--wlc-text-md);
  line-height:var(--wlc-leading-body);
  color:var(--wlc-text);
  background:var(--wlc-bg);
}

h1,h2,h3,h4,h5,h6{
  margin-block-start:0;
  color:var(--wlc-text);
  text-wrap:balance;
  font-weight:780;
}

h1{letter-spacing:var(--wlc-tracking-tight);line-height:var(--wlc-leading-tight)}
h2,h3{letter-spacing:var(--wlc-tracking-title);line-height:var(--wlc-leading-title)}
p,li,dd{max-width:78ch}
small{font-size:var(--wlc-text-xs)}
label{font-weight:720}
strong,b{font-weight:780}

.site-shell,.master-shell{
  width:min(var(--wlc-max),calc(100% - clamp(1.25rem,4vw,3rem)));
  margin-inline:auto;
}

.section{
  padding-block:clamp(4rem,7vw,6.5rem);
}

.section-heading,.section-copy{
  max-width:var(--wlc-reading);
}

.section-heading h1,.section-heading h2,.section-copy h2,.final-box h2{
  line-height:var(--wlc-leading-tight);
  letter-spacing:var(--wlc-tracking-tight);
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  min-height:1.75rem;
  padding:.32rem .62rem;
  border:1px solid var(--wlc-line);
  border-radius:var(--wlc-radius-pill);
  background:var(--wlc-accent-soft);
  color:var(--wlc-accent);
  font-size:.69rem;
  line-height:1;
  font-weight:850;
  letter-spacing:var(--wlc-tracking-label);
  text-transform:uppercase;
}

:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:0;
  box-shadow:var(--wlc-focus);
}

:where(a,button,input,select,textarea){
  transition:
    color var(--wlc-duration-fast) var(--wlc-ease),
    background-color var(--wlc-duration-fast) var(--wlc-ease),
    border-color var(--wlc-duration-fast) var(--wlc-ease),
    box-shadow var(--wlc-duration-fast) var(--wlc-ease),
    transform var(--wlc-duration-fast) var(--wlc-ease),
    opacity var(--wlc-duration-fast) var(--wlc-ease);
}

.btn,
button:not(.carousel-dots button):not(.menu-toggle){
  min-height:2.875rem;
  border-radius:var(--wlc-radius-sm);
}

.btn{
  gap:.55rem;
  padding-inline:1.125rem;
  font-weight:780;
  letter-spacing:-.01em;
}

.btn-primary{
  border-color:transparent;
  background:linear-gradient(135deg,var(--wlc-accent),var(--wlc-primary) 54%,var(--wlc-primary-2));
  color:#fff;
  box-shadow:0 12px 28px rgba(30,120,255,.20);
}

.btn-primary:hover{
  transform:translateY(-1px);
  filter:brightness(1.04);
}

.btn:active{transform:translateY(0) scale(.985)}

.btn-ghost,.btn-outline{
  border-color:var(--wlc-line-strong);
  background:color-mix(in srgb,var(--wlc-surface) 72%,transparent);
  color:var(--wlc-text);
}

.btn-ghost:hover,.btn-outline:hover{
  border-color:color-mix(in srgb,var(--wlc-accent) 55%,var(--wlc-line));
  background:var(--wlc-accent-soft);
}

:where(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),select,textarea){
  width:100%;
  min-height:2.875rem;
  border:1px solid var(--wlc-line-strong);
  border-radius:var(--wlc-radius-sm);
  background:var(--wlc-surface);
  color:var(--wlc-text);
  padding:.7rem .82rem;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02);
}

:where(input,select,textarea)::placeholder{color:var(--wlc-soft)}
:where(input,select,textarea):disabled{
  cursor:not-allowed;
  opacity:.58;
  background:var(--wlc-bg-elevated);
}

:where(input,select,textarea)[aria-invalid="true"]{
  border-color:var(--wlc-danger);
  box-shadow:0 0 0 3px var(--wlc-danger-soft);
}

:where(input[type="checkbox"],input[type="radio"]){
  inline-size:1.1rem;
  block-size:1.1rem;
  accent-color:var(--wlc-primary);
}

:where(.feature-grid article,.panel-grid article,.plan-card,.benefit-card,.metric-card,.panel,.module-card,.saas-shot,.revenue-card){
  border-color:var(--wlc-line);
  box-shadow:var(--wlc-shadow-1);
}

:where(.feature-grid article,.panel-grid article,.plan-card,.metric-card,.module-card,.saas-shot):hover{
  border-color:color-mix(in srgb,var(--wlc-accent) 34%,var(--wlc-line));
}

.status-chip,.badge,.proof-pills span,.benefit-tags span{
  border-radius:var(--wlc-radius-pill);
}

.status-chip{
  min-height:1.9rem;
  display:inline-flex;
  align-items:center;
  padding:.35rem .72rem;
  border:1px solid color-mix(in srgb,var(--wlc-success) 28%,transparent);
  background:var(--wlc-success-soft);
  color:var(--wlc-success);
  font-size:.72rem;
  font-weight:820;
  letter-spacing:.065em;
}

.table-wrap{
  overflow:auto;
  border:1px solid var(--wlc-line);
  border-radius:var(--wlc-radius-md);
  background:var(--wlc-surface);
  box-shadow:var(--wlc-shadow-1);
  scrollbar-width:thin;
  scrollbar-color:var(--wlc-line-strong) transparent;
}

table{
  width:100%;
  border-collapse:collapse;
  font-variant-numeric:tabular-nums;
}

th{
  color:var(--wlc-muted);
  font-size:.7rem;
  font-weight:820;
  letter-spacing:.07em;
  text-transform:uppercase;
}

th,td{
  padding:.8rem .9rem;
  border-bottom:1px solid var(--wlc-line);
}

tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:var(--wlc-accent-soft)}

.metric-card strong,.price strong,.revenue-result>strong{
  font-variant-numeric:tabular-nums;
}

.v2-state{
  display:flex;
  align-items:flex-start;
  gap:.75rem;
  padding:.875rem 1rem;
  border:1px solid var(--wlc-line);
  border-radius:var(--wlc-radius-sm);
  background:var(--wlc-surface-2);
  color:var(--wlc-text-2);
}

.v2-state.is-success{border-color:color-mix(in srgb,var(--wlc-success) 28%,var(--wlc-line));background:var(--wlc-success-soft);color:var(--wlc-success)}
.v2-state.is-warning{border-color:color-mix(in srgb,var(--wlc-warning) 28%,var(--wlc-line));background:var(--wlc-warning-soft);color:var(--wlc-warning)}
.v2-state.is-danger{border-color:color-mix(in srgb,var(--wlc-danger) 28%,var(--wlc-line));background:var(--wlc-danger-soft);color:var(--wlc-danger)}

.v2-icon{
  inline-size:var(--wlc-icon-md);
  block-size:var(--wlc-icon-md);
  flex:0 0 auto;
  stroke-width:1.8;
}

.v2-icon.is-small{inline-size:var(--wlc-icon-sm);block-size:var(--wlc-icon-sm)}
.v2-icon.is-large{inline-size:var(--wlc-icon-lg);block-size:var(--wlc-icon-lg)}

.v2-icon-button{
  inline-size:var(--wlc-hit-target);
  block-size:var(--wlc-hit-target);
  display:inline-grid;
  place-items:center;
  padding:0;
  border:1px solid var(--wlc-line);
  border-radius:var(--wlc-radius-sm);
  background:var(--wlc-surface);
  color:var(--wlc-text);
}

.v2-switch{
  position:relative;
  inline-size:2.7rem;
  block-size:1.5rem;
  display:inline-flex;
  align-items:center;
  padding:.16rem;
  border:1px solid var(--wlc-line-strong);
  border-radius:var(--wlc-radius-pill);
  background:var(--wlc-surface-3);
  cursor:pointer;
}

.v2-switch::after{
  content:"";
  inline-size:1.05rem;
  block-size:1.05rem;
  border-radius:50%;
  background:var(--wlc-text);
  box-shadow:var(--wlc-shadow-1);
  transition:transform var(--wlc-duration-fast) var(--wlc-ease);
}

.v2-switch[aria-checked="true"]{background:var(--wlc-primary);border-color:var(--wlc-primary)}
.v2-switch[aria-checked="true"]::after{transform:translateX(1.16rem)}

.v2-empty{
  min-height:10rem;
  display:grid;
  place-items:center;
  align-content:center;
  gap:.5rem;
  padding:var(--wlc-space-8);
  border:1px dashed var(--wlc-line-strong);
  border-radius:var(--wlc-radius-md);
  background:var(--wlc-surface-2);
  color:var(--wlc-muted);
  text-align:center;
}

:where(.btn,button)[disabled],
:where(.btn,button)[aria-disabled="true"]{
  pointer-events:none;
  opacity:.52;
  filter:saturate(.65);
}

:where(.btn,button)[aria-busy="true"]{
  cursor:progress;
  opacity:.78;
}

.v2-skeleton{
  min-height:.9rem;
  border-radius:var(--wlc-radius-xs);
  background:linear-gradient(90deg,var(--wlc-surface-3),var(--wlc-surface),var(--wlc-surface-3));
  background-size:220% 100%;
  animation:v2-shimmer 1.4s linear infinite;
}

@keyframes v2-shimmer{to{background-position:-220% 0}}

@media(max-width:720px){
  html{scroll-padding-top:5rem}
  body{font-size:.975rem}
  .site-shell,.master-shell{width:calc(100% - 1.25rem)}
  .section{padding-block:3.75rem}
  :where(.btn,button,input,select,textarea){min-height:2.875rem}
  th,td{padding:.72rem .78rem}
}

@media(max-width:390px){
  .site-shell,.master-shell{width:calc(100% - 1rem)}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
  .v2-skeleton{animation:none}
}
