/* =========================================================================
   Nexberry — Colors & Type Tokens
   Source of truth: nexberry/apps/panel/src/app/globals.css
   ------------------------------------------------------------------------
   Nexberry has a dual visual mode:
     · MARKETING / AUTH SHELL — dark, premium, gradient-bg "OS" feel.
     · OPERATIONAL PANEL — bright white, dense, productivity-app feel
       (gray-50 surfaces, gray-200 borders, emerald accents).
   Both share the same emerald primary and neutral palette, just inverted.
   ========================================================================= */

/* Canonical font: SF Pro (brand-licensed). Variable TTF — covers weights
   100-900 in roman + italic. Served from /fonts/ (apps/panel/public/fonts)
   so the static preview cards under /preview/* can load the same files
   the running Next.js panel uses. Absolute web-root path so any depth
   of nested preview / ui_kits page resolves it identically. */

@font-face {
  font-family: 'SF Pro';
  src: url('/fonts/SF-Pro.ttf') format('truetype-variations'),
       url('/fonts/SF-Pro.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SF Pro';
  src: url('/fonts/SF-Pro-Italic.ttf') format('truetype-variations'),
       url('/fonts/SF-Pro-Italic.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ── Brand / Primary ──────────────────────────────────────────────── */
  --nb-primary:        #059669;  /* emerald-600 — buttons, active nav */
  --nb-primary-hover:  #047857;  /* emerald-700 */
  --nb-primary-400:    #10b981;  /* emerald-400 — chat dots, hero pill */
  --nb-primary-300:    #6ee7b7;
  /* NOTE: emerald-50/100 paletten kaldırıldı.
     Hover/chip yüzeyleri için --nb-surface-tertiary (gray-100 #f3f4f6) kullanın.
     Success vurgusu metin (--nb-primary-hover) + dot (--nb-primary-400) ile verilir. */
  --nb-whatsapp:       #25d366;  /* WhatsApp official — used sparingly */
  --nb-whatsapp-deep:  #075e54;  /* WA business header */
  --nb-whatsapp-tick:  #53bdeb;  /* read-receipt blue */
  --nb-whatsapp-bg:    #efeae2;  /* WA chat backdrop */
  --nb-whatsapp-out:   #d9fdd3;  /* outgoing bubble */

  /* ── Brand palette (extended) ─────────────────────────────────────────
     Marketing surfaces, illustration, decorative blocks, large field tints.
     NOT a substitute for --nb-primary in interactive UI (button/active state). */
  --nb-brand-deep: #135e4b;  /* darkest — large blocks, headers */
  --nb-brand-mid:  #4cb572;  /* mid       — accents, illustrations */
  --nb-brand-soft: #a1d8b5;  /* soft      — backgrounds, fills */
  --nb-brand-mist: #ccdcdb;  /* mist      — neutral-green tint, dividers */

  /* ── Accent · Blue ────────────────────────────────────────────────────
     İkincil marka mavisi — sektör vurgusu (Perakende), kurumsal accent,
     dekoratif blok, ikon highlight. --nb-info'dan ayrı tutulur. */
  --nb-accent-blue:      #015a84;  /* derin kobalt */
  --nb-accent-blue-deep: #0c5484;  /* hafif desature, gece tonu */

  /* ── Sky · light blue family ──────────────────────────────────────────
     Onboarding/welcome akışları, soft hero kartları, progress arc,
     primer CTA'nın yumuşak versiyonu. Cool, hafif, "1st time user" tonu. */
  --nb-sky-700:  #1973ef;  /* CTA dark edge, progress fill */
  --nb-sky-500:  #4f94fd;  /* primary sky CTA */
  --nb-sky-400:  #68aafa;  /* CTA mid (default), büyük buton dolgusu */
  --nb-sky-300:  #93c0fd;  /* hover/active soft */
  --nb-sky-100:  #dfe8f2;  /* tint background */
  --nb-sky-50:   #eaf1f8;  /* page background, onboarding canvas */
  --nb-sky-bg:   #c4d5e6;  /* desature page wash */
  --nb-sky-link: #067dff;  /* "Back" / inline action link */

  /* ── Neutrals (light surface family) ──────────────────────────────── */
  --nb-surface:           #ffffff;
  --nb-surface-secondary: #f9fafb;  /* gray-50  — page bg in panel */
  --nb-surface-tertiary:  #f3f4f6;  /* gray-100 — chips */
  --nb-border:            #e5e7eb;  /* gray-200 */
  --nb-border-light:      #f3f4f6;  /* gray-100 */
  --nb-text:              #111827;  /* gray-900 */
  --nb-text-secondary:    #6b7280;  /* gray-500 */
  --nb-text-tertiary:     #9ca3af;  /* gray-400 */

  /* ── Neutrals (dark surface family — marketing / shell) ──────────── */
  --nb-dark-bg:           #000000;
  --nb-dark-950:          #0a0a0a;  /* neutral-950 */
  --nb-dark-900:          #171717;  /* neutral-900 — cards */
  --nb-dark-800:          #262626;  /* neutral-800 — borders */
  --nb-dark-700:          #404040;  /* neutral-700 */
  --nb-dark-fg:           #ffffff;
  --nb-dark-fg-muted:     #9ca3af;  /* gray-400 — body copy on dark */
  --nb-dark-fg-subtle:    #6b7280;
  --nb-dark-grid:         #222222;  /* hero grid lines */

  /* The signature marketing background — vertical fade from black to a
     soft slate gray. Don't recreate by hand; reference this var. */
  --nb-marketing-bg:
    linear-gradient(to bottom, #000 0%, #0a0a0a 30%, #3a3d3d 78%, #6b6e6e 99%);

  /* ── Semantic ─────────────────────────────────────────────────────── */
  --nb-danger:    #ef4444;  /* red-500 */
  --nb-danger-bg: #fee2e2;
  --nb-warning:   #f59e0b;  /* amber-500 — pending payment chip */
  --nb-warning-bg:#fef3c7;
  --nb-warning-50:#fffbeb;
  --nb-success:   #10b981;
  /* NOTE: --nb-success-bg kaldırıldı. Success vurgusu gray-100 yüzey + emerald-700 metin + emerald-400 dot ile verilir. */
  --nb-info:      #3b82f6;  /* blue-500 — "X ürün daha" link */
  --nb-info-bg:   #eff6ff;

  /* ── Radii ────────────────────────────────────────────────────────── */
  --nb-radius-sm: 0.375rem;   /*  6px — inputs, small buttons */
  --nb-radius-md: 0.5rem;     /*  8px — nav items, default */
  --nb-radius-lg: 0.75rem;    /* 12px — kanban cards */
  --nb-radius-xl: 1rem;       /* 16px — sector cards */
  --nb-radius-2xl: 1.5rem;    /* 24px — hero cards */
  --nb-radius-3xl: 1.75rem;   /* 28px — pricing card */
  --nb-radius-pill: 9999px;   /* CTA buttons */

  /* ── Shadows ──────────────────────────────────────────────────────── */
  --nb-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --nb-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --nb-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --nb-shadow-cta-light: 0 10px 15px -3px rgb(255 255 255 / 0.10); /* white halo on dark */
  --nb-shadow-2xl-dark:  0 25px 50px -12px rgb(0 0 0 / 0.60);

  /* ── Spacing scale (Tailwind spacing — included for token export) ── */
  --nb-space-1: 0.25rem;
  --nb-space-2: 0.5rem;
  --nb-space-3: 0.75rem;
  --nb-space-4: 1rem;
  --nb-space-6: 1.5rem;
  --nb-space-8: 2rem;
  --nb-space-12: 3rem;

  /* ── Typography ───────────────────────────────────────────────────── */
  --nb-font-sans: "SF Pro", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --nb-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* The marketing/auth shell uses a slightly tighter tracking on display
     text. Reference --nb-tracking-display rather than hardcoding. */
  --nb-tracking-display: -0.04em;   /* tracking-tighter */
  --nb-tracking-tight:   -0.02em;
  --nb-tracking-normal:  0;

  /* Panel app default body size is 12px — Nexberry runs DENSE. */
  --nb-text-app: 12px;

  /* ── Z layers ─────────────────────────────────────────────────────── */
  --nb-z-base: 0;
  --nb-z-sticky: 10;
  --nb-z-nav: 20;
  --nb-z-dropdown: 30;
  --nb-z-modal-backdrop: 40;
  --nb-z-sidebar: 50;
  --nb-z-modal: 60;
  --nb-z-popover: 70;
  --nb-z-toast: 80;
  --nb-z-tooltip: 90;

  /* ── Motion ───────────────────────────────────────────────────────── */
  --nb-duration-instant: 75ms;
  --nb-duration-fast:    150ms;   /* hover, color swaps — default */
  --nb-duration-base:    200ms;   /* dropdowns, popovers */
  --nb-duration-slow:    300ms;   /* modal in/out, drawer */
  --nb-duration-entrance: 700ms;  /* fadeIn / fadeUp */

  --nb-ease-standard:  cubic-bezier(0.2, 0, 0, 1);     /* default ease-out — UI */
  --nb-ease-emphasized: cubic-bezier(0.2, 0, 0.05, 1); /* hero entrance */
  --nb-ease-decelerate: cubic-bezier(0, 0, 0.2, 1);    /* enter */
  --nb-ease-accelerate: cubic-bezier(0.4, 0, 1, 1);    /* exit */
  --nb-ease-linear: linear;

  /* ── Focus ring (a11y) ────────────────────────────────────────────── */
  /* Two rings: light surface uses emerald, dark surface uses white halo.
     Always 2px ring + 2px offset. Apply via :focus-visible only. */
  --nb-focus-ring:        0 0 0 2px var(--nb-surface), 0 0 0 4px var(--nb-primary-400);
  --nb-focus-ring-dark:   0 0 0 2px #0a0a0a, 0 0 0 4px rgba(255,255,255,0.85);
  --nb-focus-ring-danger: 0 0 0 2px var(--nb-surface), 0 0 0 4px var(--nb-danger);

  /* ── Interaction state opacities ──────────────────────────────────── */
  --nb-state-hover-bg:   rgba(0,0,0,0.04);  /* hover film on light */
  --nb-state-active-bg:  rgba(0,0,0,0.08);
  --nb-state-disabled-opacity: 0.5;
}

/* =========================================================================
   Semantic role classes — apply directly to elements.
   ========================================================================= */

/* Display headings — used in marketing hero. The white-to-translucent
   gradient on text is a Nexberry signature; do not omit. */
.nb-display {
  font-family: var(--nb-font-sans);
  font-weight: 600;
  letter-spacing: var(--nb-tracking-display);
  line-height: 1;
  font-size: clamp(2.5rem, 6vw, 6rem);
  background: linear-gradient(135deg, #ffffff 30%, rgb(255 255 255 / 0.4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nb-h1 {
  font-family: var(--nb-font-sans);
  font-weight: 600;
  letter-spacing: var(--nb-tracking-display);
  font-size: clamp(1.875rem, 4vw, 3rem);
  line-height: 1.05;
}

.nb-h2 {
  font-family: var(--nb-font-sans);
  font-weight: 600;
  letter-spacing: var(--nb-tracking-tight);
  font-size: 1.5rem;
  line-height: 1.2;
}

.nb-h3 {
  font-family: var(--nb-font-sans);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

.nb-eyebrow {
  font-family: var(--nb-font-sans);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: var(--nb-tracking-tight);
  color: var(--nb-dark-fg-muted);
}

.nb-body {
  font-family: var(--nb-font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--nb-text);
}

.nb-body-sm {
  font-family: var(--nb-font-sans);
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--nb-text-secondary);
}

.nb-app {
  font-family: var(--nb-font-sans);
  font-size: var(--nb-text-app);   /* 12px */
  color: var(--nb-text);
}

.nb-mono {
  font-family: var(--nb-font-mono);
  font-size: 0.8125rem;
}

.nb-caption {
  font-family: var(--nb-font-sans);
  font-size: 0.75rem;
  color: var(--nb-text-tertiary);
}
