/* ============================================================
   CARDS FOR KNOTS — DESIGN TOKENS
   Editorial warm. Ivory paper, deep ink, maroon + gold accents.
   ============================================================ */

:root {
  /* ---------- COLOR ---------- */
  /* Surface — warm ivory ladder */
  --cfk-paper:        #faf7f2;   /* page background, lightest */
  --cfk-surface:      #f4f0e8;   /* panels */
  --cfk-surface-2:    #ece6da;   /* raised panels, hover */
  --cfk-surface-3:    #ddd5c5;   /* dividers, deep hover */
  --cfk-canvas-bg:    #1a1612;   /* dark canvas backdrop */
  --cfk-canvas-bg-2:  #221c17;
  --cfk-canvas-grid:  rgba(255,255,255,0.025);

  /* Ink — deep warm */
  --cfk-ink:          #2a1f1a;   /* primary text */
  --cfk-ink-2:        #5b4a40;   /* secondary text */
  --cfk-ink-3:        #8a7a6e;   /* tertiary, hints */
  --cfk-ink-4:        #b8a99a;   /* placeholder, disabled */
  --cfk-ink-on-dark:  #f7f1e6;   /* text on dark canvas */
  --cfk-ink-on-dark-2:#a89e8f;

  /* Accents */
  --cfk-maroon:       #7a1f2b;   /* primary CTA */
  --cfk-maroon-hover: #661923;
  --cfk-maroon-soft:  #f4e4e6;
  --cfk-gold:         #b58a4a;   /* secondary accent, status */
  --cfk-gold-soft:    #f1e6d0;
  --cfk-gold-deep:    #8a6532;

  /* Semantic */
  --cfk-success:      #2f6a4a;
  --cfk-success-soft: #dceadf;
  --cfk-warn:         #a86a1a;
  --cfk-warn-soft:    #f4e4cb;
  --cfk-danger:       #a82a1f;
  --cfk-danger-soft:  #f4dedc;
  --cfk-info:         #2a4a7a;
  --cfk-info-soft:    #dee4f0;

  /* Lines */
  --cfk-line:         #e3dccd;
  --cfk-line-strong:  #c9bea8;
  --cfk-line-dark:    rgba(247,241,230,0.10);

  /* ---------- TYPE ---------- */
  --cfk-font-display: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  --cfk-font-ui:      'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --cfk-font-mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --cfk-font-tamil:   'Noto Serif Tamil', 'Latha', serif;
  --cfk-font-hindi:   'Noto Serif Devanagari', 'Mangal', serif;

  /* Type scale (px) */
  --cfk-text-2xs: 10px;
  --cfk-text-xs:  11px;
  --cfk-text-sm:  12px;
  --cfk-text-md:  13px;
  --cfk-text-base:14px;
  --cfk-text-lg:  16px;
  --cfk-text-xl:  18px;
  --cfk-text-2xl: 22px;
  --cfk-text-3xl: 28px;
  --cfk-text-4xl: 36px;
  --cfk-text-5xl: 48px;
  --cfk-text-6xl: 64px;
  --cfk-text-7xl: 88px;

  /* ---------- SPACING (4-base) ---------- */
  --cfk-s-0: 0;
  --cfk-s-1: 2px;
  --cfk-s-2: 4px;
  --cfk-s-3: 6px;
  --cfk-s-4: 8px;
  --cfk-s-5: 10px;
  --cfk-s-6: 12px;
  --cfk-s-8: 16px;
  --cfk-s-10:20px;
  --cfk-s-12:24px;
  --cfk-s-16:32px;
  --cfk-s-20:40px;
  --cfk-s-24:48px;
  --cfk-s-32:64px;
  --cfk-s-40:80px;

  /* ---------- RADIUS ---------- */
  --cfk-r-xs: 3px;
  --cfk-r-sm: 5px;
  --cfk-r-md: 8px;
  --cfk-r-lg: 12px;
  --cfk-r-xl: 18px;
  --cfk-r-2xl:24px;
  --cfk-r-full: 999px;

  /* ---------- SHADOW ---------- */
  /* Warm-tinted to match ivory surfaces */
  --cfk-sh-1: 0 1px 2px rgba(42,31,26,0.05);
  --cfk-sh-2: 0 2px 4px rgba(42,31,26,0.06), 0 1px 2px rgba(42,31,26,0.04);
  --cfk-sh-3: 0 4px 12px rgba(42,31,26,0.08), 0 2px 4px rgba(42,31,26,0.04);
  --cfk-sh-4: 0 12px 32px rgba(42,31,26,0.12), 0 4px 8px rgba(42,31,26,0.05);
  --cfk-sh-5: 0 24px 64px rgba(42,31,26,0.18), 0 8px 16px rgba(42,31,26,0.06);
  --cfk-sh-inset: inset 0 1px 0 rgba(255,255,255,0.6);
  --cfk-sh-paper: 0 1px 0 rgba(255,255,255,0.7), 0 2px 8px rgba(42,31,26,0.06);

  /* ---------- MOTION ---------- */
  --cfk-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --cfk-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --cfk-dur-1: 120ms;
  --cfk-dur-2: 200ms;
  --cfk-dur-3: 320ms;

  /* ---------- Z ---------- */
  --cfk-z-canvas: 1;
  --cfk-z-floating: 50;
  --cfk-z-popover: 100;
  --cfk-z-toolbar: 150;
  --cfk-z-modal:  200;
  --cfk-z-toast:  300;
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--cfk-font-ui);
  color: var(--cfk-ink);
  background: var(--cfk-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--cfk-text-base);
  line-height: 1.5;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================
   COMPONENTS — using existing .asib-* class names
   ============================================================ */

/* ---------- Buttons ---------- */
.asib-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--cfk-r-md);
  font-family: var(--cfk-font-ui);
  font-size: var(--cfk-text-md);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--cfk-ink);
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  transition: background var(--cfk-dur-1) var(--cfk-ease),
              border-color var(--cfk-dur-1) var(--cfk-ease),
              transform var(--cfk-dur-1) var(--cfk-ease);
  white-space: nowrap;
  user-select: none;
}
.asib-btn:hover { background: var(--cfk-surface); border-color: var(--cfk-line-strong); }
.asib-btn:active { transform: translateY(0.5px); }
.asib-btn:focus-visible { outline: 2px solid var(--cfk-gold); outline-offset: 2px; }

.asib-btn-default { /* default style, alias */ }

.asib-btn-accent {
  background: var(--cfk-maroon);
  color: #fff;
  border-color: var(--cfk-maroon);
}
.asib-btn-accent:hover { background: var(--cfk-maroon-hover); border-color: var(--cfk-maroon-hover); }

.asib-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--cfk-ink-2);
}
.asib-btn-ghost:hover { background: var(--cfk-surface-2); color: var(--cfk-ink); border-color: transparent; }

.asib-btn-danger {
  background: var(--cfk-paper);
  color: var(--cfk-danger);
  border-color: var(--cfk-line);
}
.asib-btn-danger:hover { background: var(--cfk-danger-soft); border-color: var(--cfk-danger); }

.asib-btn-sm { height: 26px; padding: 0 9px; font-size: var(--cfk-text-sm); }
.asib-btn-lg { height: 40px; padding: 0 18px; font-size: var(--cfk-text-base); }

.asib-btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
}
.asib-btn-icon.asib-btn-sm { width: 26px; height: 26px; }

/* ---------- Inputs ---------- */
.asib-input {
  height: 32px;
  padding: 0 10px;
  border-radius: var(--cfk-r-sm);
  border: 1px solid var(--cfk-line);
  background: var(--cfk-paper);
  color: var(--cfk-ink);
  font-size: var(--cfk-text-md);
  outline: none;
  transition: border-color var(--cfk-dur-1) var(--cfk-ease),
              box-shadow var(--cfk-dur-1) var(--cfk-ease);
}
.asib-input:focus { border-color: var(--cfk-gold); box-shadow: 0 0 0 3px rgba(181,138,74,0.18); }
.asib-input::placeholder { color: var(--cfk-ink-4); }

/* ---------- Pills / status ---------- */
.asib-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--cfk-r-full);
  font-size: var(--cfk-text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--cfk-surface-2);
  color: var(--cfk-ink-2);
  border: 1px solid transparent;
}
.asib-pill-gold { background: var(--cfk-gold-soft); color: var(--cfk-gold-deep); }
.asib-pill-maroon { background: var(--cfk-maroon-soft); color: var(--cfk-maroon); }
.asib-pill-success { background: var(--cfk-success-soft); color: var(--cfk-success); }
.asib-pill-warn { background: var(--cfk-warn-soft); color: var(--cfk-warn); }
.asib-pill-danger { background: var(--cfk-danger-soft); color: var(--cfk-danger); }
.asib-pill-outline { background: transparent; border-color: var(--cfk-line); color: var(--cfk-ink-2); }

/* ---------- Card ---------- */
.asib-card {
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  border-radius: var(--cfk-r-lg);
  box-shadow: var(--cfk-sh-1);
}

/* ---------- Modal ---------- */
.asib-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(26,22,18,0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--cfk-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cfk-fade-in 200ms var(--cfk-ease) both;
}
.asib-modal {
  background: var(--cfk-paper);
  border-radius: var(--cfk-r-xl);
  box-shadow: var(--cfk-sh-5);
  border: 1px solid var(--cfk-line);
  max-width: 480px;
  width: calc(100% - 32px);
  overflow: hidden;
  animation: cfk-modal-in 280ms var(--cfk-ease-out) both;
}
@keyframes cfk-fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes cfk-modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Scrollbar ---------- */
.cfk-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.cfk-scroll::-webkit-scrollbar-thumb { background: var(--cfk-line-strong); border-radius: 999px; }
.cfk-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---------- Display type helpers ---------- */
.cfk-display { font-family: var(--cfk-font-display); font-weight: 500; letter-spacing: -0.015em; }
.cfk-display-italic { font-family: var(--cfk-font-display); font-style: italic; font-weight: 400; }
.cfk-mono { font-family: var(--cfk-font-mono); font-feature-settings: 'ss01'; }

/* Grain overlay helper */
.cfk-grain::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.12  0 0 0 0 0.10  0 0 0 0.05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============================================================
   EDITOR CHROME OVERLAY — Cards for Knots
   Layered on top of editor-app.css to lift the existing markup
   into the editorial-warm direction without restructuring the
   JS. Anything here is targeted at preserved .asib-* class names.
   ============================================================ */

/* Overall app surface */
.asib-app-root,
.asib-workspace {
  background: var(--cfk-paper);
  color: var(--cfk-ink);
  font-family: var(--cfk-font-ui);
}

/* Top bar — title strip with Back button + design name + canvas size pill */
.asib-toolbar {
  background: var(--cfk-paper);
  border-bottom: 1px solid var(--cfk-line);
  border-radius: 0;
  box-shadow: none;
  padding: 0.5rem 1rem;
}
.asib-toolbar strong {
  font-family: var(--cfk-font-display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--cfk-text-xl);
  color: var(--cfk-ink);
  letter-spacing: -0.01em;
}

/* Title pills (canvas size, file size, design id) — outlined */
.asib-canvas-size-pill,
.asib-language-pill {
  background: var(--cfk-surface);
  border: 1px solid var(--cfk-line);
  color: var(--cfk-ink-2);
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-xs);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 2px 8px;
}

/* Side panels — warm off-white */
.asib-side,
.asib-panel,
.asib-panel-compact {
  background: var(--cfk-surface);
  border-color: var(--cfk-line);
  color: var(--cfk-ink);
}
.asib-side-left {
  border-right: 1px solid var(--cfk-line);
}
.asib-side-right {
  border-left: 1px solid var(--cfk-line);
}

/* Panel headings */
.asib-panel h2,
.asib-panel h3 {
  font-family: var(--cfk-font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--cfk-ink);
}

/* Helper text inside panels */
.asib-helper {
  color: var(--cfk-ink-3);
  font-size: var(--cfk-text-sm);
}

/* Canvas stage — dark backdrop for the paper-on-desk feel.
   The actual paper card stays white via fabric's backgroundColor. */
.asib-canvas-stage {
  background: var(--cfk-canvas-bg);
  background-image:
    radial-gradient(circle at 0 0, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--cfk-ink-on-dark);
}
.asib-canvas-shell {
  box-shadow: var(--cfk-sh-5);
  border-radius: 2px;
}

/* Status / loading text on the dark canvas */
.asib-canvas-loading {
  background: rgba(26, 22, 18, 0.85) !important;
  color: var(--cfk-ink-on-dark);
}
.asib-canvas-loading-spinner {
  border-color: rgba(247, 241, 230, 0.18);
  border-top-color: var(--cfk-gold);
}

/* Stage-top property toolbar (the per-object property bar above the
   canvas). Sits on the dark canvas so it gets a light surface treatment. */
.asib-stage-top {
  background: transparent;
}
.asib-stage-properties {
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  border-radius: var(--cfk-r-md);
  box-shadow: var(--cfk-sh-2);
  padding: 4px 6px;
}

/* Layer rows */
.asib-layer-row {
  border-radius: var(--cfk-r-sm);
  color: var(--cfk-ink);
}
.asib-layer-row:hover:not(.is-selected) {
  background: var(--cfk-surface-2);
}
.asib-layer-row.is-selected {
  background: var(--cfk-gold-soft);
  outline: 1px solid var(--cfk-gold);
}
.asib-layer-row-child {
  background: rgba(0, 0, 0, 0.02);
  border-left: 2px solid var(--cfk-gold);
}

/* Asset thumb tiles — keep the checker pattern but warm the borders */
.asib-asset-thumb {
  border-color: var(--cfk-line);
  border-radius: var(--cfk-r-md);
}
.asib-asset-thumb:hover:not(:disabled) {
  border-color: var(--cfk-gold);
}

/* Asset row titles */
.asib-asset-row-title {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-weight: 500;
}
.asib-asset-row-seeall {
  color: var(--cfk-gold-deep);
}

/* Category chips */
.asib-category-chip {
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  color: var(--cfk-ink-2);
  border-radius: var(--cfk-r-full);
  font-size: var(--cfk-text-xs);
  font-weight: 500;
  padding: 4px 10px;
}
.asib-category-chip:hover {
  background: var(--cfk-surface-2);
  border-color: var(--cfk-line-strong);
}
.asib-category-chip.is-active {
  background: var(--cfk-ink);
  color: var(--cfk-paper);
  border-color: var(--cfk-ink);
}

/* Toolbar popover panels — match the new card surface */
.asib-toolbar-popover-panel {
  background: var(--cfk-paper);
  border-color: var(--cfk-line);
  box-shadow: var(--cfk-sh-3);
}

/* Status text in the toolbar */
.asib-status {
  color: var(--cfk-ink-3);
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-xs);
}

/* Browser surface (templates list) — keep ivory paper feel */
.asib-browser,
.asib-browser-grid,
.asib-section,
.asib-hero {
  background: transparent;
}
.asib-section,
.asib-hero,
.asib-card {
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  border-radius: var(--cfk-r-lg);
  box-shadow: var(--cfk-sh-1);
}

/* Display headings on landing-style sections */
.asib-title,
.asib-section h2,
.asib-hero h1 {
  font-family: var(--cfk-font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--cfk-ink);
}
.asib-eyebrow {
  color: var(--cfk-gold-deep);
  font-weight: 600;
  letter-spacing: 0.18em;
}
.asib-subtitle {
  color: var(--cfk-ink-2);
}

/* Layer panel link/lock controls */
.asib-layer-link-badge {
  border-radius: 999px;
  display: inline-grid;
  font-size: 9px;
  font-weight: 700;
  height: 18px;
  margin-right: 2px;
  place-items: center;
  width: 18px;
}
.asib-layer-action-active {
  color: var(--cfk-gold-deep) !important;
}
.asib-layer-action-active svg {
  stroke: currentColor;
}

/* === ASSET ROW: PAGED TILES (replaces horizontal scroll) === */
.asib-asset-row-meta {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}
.asib-asset-row-pager-count {
  color: var(--cfk-ink-3);
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-xs);
}
.asib-asset-row-page-wrap {
  align-items: center;
  display: flex;
  gap: 4px;
  position: relative;
}
.asib-asset-row-grid {
  display: grid;
  flex: 1;
  gap: 8px;
  grid-template-columns: repeat(3, 1fr);
}
.asib-asset-row-pager {
  align-items: center;
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  border-radius: 999px;
  color: var(--cfk-ink-2);
  cursor: pointer;
  display: flex;
  font-size: 18px;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background 120ms var(--cfk-ease), border-color 120ms;
  width: 28px;
}
.asib-asset-row-pager:hover {
  background: var(--cfk-surface-2);
  border-color: var(--cfk-line-strong);
  color: var(--cfk-ink);
}
.asib-asset-row-pager-prev,
.asib-asset-row-pager-next {
  flex: 0 0 auto;
}

/* ============================================================
   WORDPRESS THEME OVERRIDE — full-bleed studio surface
   When the studio shortcode is mounted, hide every other piece
   of WordPress chrome (theme header, sidebar, footer) so the
   /astudio page renders as a self-contained app instead of
   sitting inside the surrounding theme. The existing plugin
   already adds .asib-studio-page to <body> for this URL.
   ============================================================ */
body.asib-studio-page {
  background: var(--cfk-paper) !important;
  margin: 0 !important;
  overflow-x: hidden;
}
body.asib-studio-page > #wpadminbar {
  /* keep the admin bar — admins still need it */
}
body.asib-studio-page > header,
body.asib-studio-page > footer,
body.asib-studio-page > .site-header,
body.asib-studio-page > .site-footer,
body.asib-studio-page > #masthead,
body.asib-studio-page > #colophon,
body.asib-studio-page > .header-wrapper,
body.asib-studio-page > .footer-wrapper,
body.asib-studio-page .ts-floating-sidebar,
body.asib-studio-page .header-mobile,
body.asib-studio-page .ts-page-title-wrapper,
body.asib-studio-page #ts-mobile-menu-overlay,
body.asib-studio-page > .ts-buttons-floating,
body.asib-studio-page > .add-to-cart-popup-container {
  display: none !important;
}
body.asib-studio-page #page,
body.asib-studio-page #wrapper,
body.asib-studio-page .site,
body.asib-studio-page .page-container,
body.asib-studio-page .site-content,
body.asib-studio-page .ts-content {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  width: 100% !important;
}
body.asib-studio-page .asib-app-root {
  min-height: 100vh;
}

/* ============================================================
   LANDING PAGE — Cards for Knots (full takeover)
   Faithful port of dsine/project/src/landing.jsx
   ============================================================ */
.asib-landing {
  background: var(--cfk-paper);
  color: var(--cfk-ink);
  font-family: var(--cfk-font-ui);
  min-height: 100vh;
}

/* --- Top nav --- */
.asib-landing-nav {
  align-items: center;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cfk-line);
  display: flex;
  height: 64px;
  justify-content: space-between;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.asib-landing-nav-links {
  color: var(--cfk-ink-2);
  display: flex;
  font-size: var(--cfk-text-md);
  gap: 32px;
}
.asib-landing-nav-link {
  color: inherit;
  text-decoration: none;
  transition: color 120ms var(--cfk-ease);
}
.asib-landing-nav-link:hover { color: var(--cfk-ink); }
.asib-landing-nav-cta {
  align-items: center;
  display: flex;
  gap: 8px;
}
.asib-landing-brandmark {
  align-items: baseline;
  color: var(--cfk-ink);
  display: flex;
  font-family: var(--cfk-font-display);
  font-style: italic;
  font-weight: 500;
  gap: 0;
  letter-spacing: -0.015em;
  line-height: 1;
}
.asib-landing-brandmark.is-white { color: var(--cfk-ink-on-dark); }
.asib-landing-brandmark-accent {
  color: var(--cfk-maroon);
  margin-left: 4px;
}
.asib-landing.is-white .asib-landing-brandmark-accent,
.asib-landing-footer .asib-landing-brandmark-accent {
  color: var(--cfk-gold);
}

/* --- Hero --- */
.asib-landing-hero {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  padding: 72px 40px 56px;
  position: relative;
}
.asib-landing-kolam {
  pointer-events: none;
  position: absolute;
}
.asib-landing-kolam-right {
  opacity: 0.45;
  right: -80px;
  top: 20px;
}
.asib-landing-kolam-left {
  bottom: -40px;
  left: -60px;
  opacity: 0.3;
}
.asib-landing-hero-copy {
  max-width: 560px;
  position: relative;
}
.asib-landing-eyebrow-row {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.asib-landing-eyebrow {
  color: var(--cfk-gold-deep);
  font-size: var(--cfk-text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.asib-landing-headline {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}
.asib-landing-headline-accent {
  color: var(--cfk-maroon);
  font-style: italic;
}
.asib-landing-subtitle {
  color: var(--cfk-ink-2);
  font-size: 17px;
  line-height: 1.55;
  margin-top: 18px;
  max-width: 480px;
}
.asib-landing-tamil { font-family: var(--cfk-font-tamil); }
.asib-landing-hindi { font-family: var(--cfk-font-hindi); }
.asib-landing-hero-cta {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}
.asib-landing-hero-cta .asib-btn {
  height: 40px;
  padding: 0 18px;
}
.asib-landing-stats {
  color: var(--cfk-ink-3);
  display: flex;
  font-size: var(--cfk-text-sm);
  gap: 24px;
  margin-top: 32px;
}
.asib-landing-stats strong {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-size: 18px;
  font-style: italic;
}
.asib-landing-stat-divider {
  background: var(--cfk-line);
  height: 32px;
  width: 1px;
}

/* Hero card stack */
.asib-landing-hero-stack {
  height: 480px;
  perspective: 1400px;
  position: relative;
}
.asib-landing-card-back,
.asib-landing-card-front {
  border-radius: 3px;
  height: 380px;
  position: absolute;
  width: 280px;
}
.asib-landing-card-back {
  background: #faf6ee;
  box-shadow: 0 30px 60px rgba(42, 31, 26, 0.18);
  right: 40px;
  top: 60px;
  transform: rotate(-6deg);
}
.asib-landing-card-front {
  background: #fdf9f1;
  box-shadow: 0 30px 60px rgba(42, 31, 26, 0.20);
  right: 140px;
  top: 30px;
  transform: rotate(3deg);
  z-index: 2;
}
.asib-landing-card-frame {
  border: 1px solid;
  position: absolute;
}
.asib-landing-card-frame-maroon { border-color: rgba(122, 31, 43, 0.5); inset: 14px; }
.asib-landing-card-frame-gold { border-color: rgba(181, 138, 74, 0.6); inset: 14px; }
.asib-landing-card-frame-gold-inner { border-color: rgba(181, 138, 74, 0.3); inset: 18px; }
.asib-landing-card-content {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  inset: 30px;
  justify-content: center;
  position: absolute;
  text-align: center;
}
.asib-landing-card-tamil {
  color: var(--cfk-maroon);
  font-family: var(--cfk-font-tamil);
  font-size: var(--cfk-text-base);
  font-weight: 600;
}
.asib-landing-card-couple,
.asib-landing-card-couple-large {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-style: italic;
  font-weight: 500;
  line-height: 1.05;
}
.asib-landing-card-couple { font-size: 26px; line-height: 1.1; }
.asib-landing-card-couple-large { font-size: 34px; }
.asib-landing-card-amp { color: var(--cfk-maroon); }
.asib-landing-card-amp-gold { color: var(--cfk-gold); }
.asib-landing-card-rule {
  background: var(--cfk-maroon);
  height: 1px;
  width: 30px;
}
.asib-landing-card-date {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-size: 18px;
}
.asib-landing-card-tagline {
  color: var(--cfk-ink-2);
  font-family: var(--cfk-font-display);
  font-size: 11px;
  font-style: italic;
}
.asib-landing-card-date-block {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.asib-landing-card-date-day {
  color: var(--cfk-ink-3);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.asib-landing-card-date-num {
  font-family: var(--cfk-font-display);
  font-size: 24px;
  font-weight: 500;
}

/* --- Guest mode strip --- */
.asib-landing-guest-section { padding: 24px 40px; }
.asib-landing-guest-strip {
  align-items: center;
  background: linear-gradient(120deg, var(--cfk-surface), var(--cfk-gold-soft));
  border: 1px solid var(--cfk-line);
  border-radius: var(--cfk-r-xl);
  display: flex;
  gap: 32px;
  overflow: hidden;
  padding: 28px 32px;
  position: relative;
}
.asib-landing-guest-icon {
  align-items: center;
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  border-radius: 50%;
  color: var(--cfk-gold-deep);
  display: grid;
  flex-shrink: 0;
  height: 64px;
  place-items: center;
  width: 64px;
}
.asib-landing-guest-body { flex: 1; min-width: 0; }
.asib-landing-guest-eyebrow-row {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}
.asib-landing-guest-eyebrow {
  color: var(--cfk-gold-deep);
  font-size: var(--cfk-text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.asib-landing-guest-headline {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-size: 24px;
  font-style: italic;
}
.asib-landing-guest-body-text {
  color: var(--cfk-ink-2);
  font-size: var(--cfk-text-md);
  margin-top: 6px;
  max-width: 760px;
}

/* --- Templates section --- */
.asib-landing-templates-section { padding: 48px 40px 56px; }
.asib-landing-templates-head {
  align-items: flex-end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}
.asib-landing-templates-title {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}
.asib-landing-templates-title-accent { font-style: italic; }
.asib-landing-template-filters {
  align-items: center;
  display: flex;
  gap: 6px;
}
.asib-landing-filter {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--cfk-r-md);
  color: var(--cfk-ink-2);
  cursor: pointer;
  font-size: var(--cfk-text-sm);
  font-weight: 500;
  height: 26px;
  padding: 0 12px;
  transition: background 120ms var(--cfk-ease);
}
.asib-landing-filter:hover { background: var(--cfk-surface); }
.asib-landing-filter.is-active {
  background: var(--cfk-ink);
  border-color: var(--cfk-ink);
  color: var(--cfk-paper);
}

.asib-landing-template-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) { .asib-landing-template-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .asib-landing-template-grid { grid-template-columns: repeat(2, 1fr); } }

.asib-landing-template-card {
  border-radius: var(--cfk-r-lg);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: transform 240ms var(--cfk-ease), box-shadow 240ms;
  box-shadow: var(--cfk-sh-2);
}
.asib-landing-template-card:hover {
  box-shadow: var(--cfk-sh-4);
  transform: translateY(-4px);
}
.asib-landing-template-thumb {
  aspect-ratio: 4 / 5;
  background: #faf6ee;
  border-top-left-radius: var(--cfk-r-lg);
  border-top-right-radius: var(--cfk-r-lg);
  overflow: hidden;
  position: relative;
}
.asib-landing-template-frame,
.asib-landing-template-frame-inner {
  border: 1px solid;
  border-radius: 1px;
  position: absolute;
}
.asib-landing-template-frame { inset: 14px; }
.asib-landing-template-frame-inner { inset: 18px; }
.asib-landing-template-thumb-content {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  inset: 30px;
  justify-content: center;
  position: absolute;
  text-align: center;
}
.asib-landing-template-motif {
  height: 40px;
  width: 80%;
}
.asib-landing-template-name {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-size: 24px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.05;
}
.asib-landing-template-rule {
  height: 1px;
  opacity: 0.6;
  width: 40px;
}
.asib-landing-template-tag {
  color: var(--cfk-ink-2);
  font-family: var(--cfk-font-ui);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.asib-landing-template-pills {
  display: flex;
  gap: 6px;
  left: 10px;
  position: absolute;
  top: 10px;
}
.asib-landing-template-pill-dot {
  background: var(--cfk-gold);
  border-radius: 99px;
  display: inline-block;
  height: 6px;
  margin-right: 4px;
  width: 6px;
}
.asib-landing-template-cta {
  bottom: 10px;
  display: flex;
  gap: 6px;
  left: 10px;
  opacity: 0;
  position: absolute;
  right: 10px;
  transform: translateY(6px);
  transition: opacity 200ms, transform 200ms;
}
.asib-landing-template-card:hover .asib-landing-template-cta {
  opacity: 1;
  transform: translateY(0);
}
.asib-landing-template-cta-primary {
  flex: 1;
  justify-content: center;
}
.asib-landing-template-cta-secondary {
  justify-content: center;
}
.asib-landing-template-meta {
  background: var(--cfk-paper);
  border-top: 1px solid var(--cfk-line);
  padding: 12px 14px;
}
.asib-landing-template-meta {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.asib-landing-template-meta-text { min-width: 0; }
.asib-landing-template-meta-name {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-size: var(--cfk-text-lg);
  font-weight: 500;
}
.asib-landing-template-meta-tag {
  color: var(--cfk-ink-3);
  font-size: var(--cfk-text-xs);
}
.asib-landing-template-meta-price {
  background: var(--cfk-surface);
  border: 1px solid var(--cfk-line);
  border-radius: var(--cfk-r-full);
  color: var(--cfk-ink);
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-sm);
  padding: 3px 8px;
  white-space: nowrap;
}

/* --- Footer --- */
.asib-landing-footer {
  background: var(--cfk-canvas-bg);
  color: var(--cfk-ink-on-dark);
  overflow: hidden;
  padding: 56px 40px 32px;
  position: relative;
}
.asib-landing-footer-kolam {
  opacity: 0.06;
  right: -100px;
  top: -100px;
}
.asib-landing-footer-grid {
  display: grid;
  gap: 48px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  position: relative;
  z-index: 1;
}
.asib-landing-footer-tagline {
  color: var(--cfk-ink-on-dark-2);
  font-size: var(--cfk-text-md);
  line-height: 1.6;
  margin-top: 14px;
  max-width: 340px;
}
.asib-landing-footer-eyebrow {
  color: var(--cfk-gold);
  font-size: var(--cfk-text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.asib-landing-footer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.asib-landing-footer-list li {
  color: var(--cfk-ink-on-dark-2);
  font-size: var(--cfk-text-md);
}
.asib-landing-footer-bottom {
  align-items: center;
  border-top: 1px solid rgba(247, 241, 230, 0.10);
  color: var(--cfk-ink-on-dark-2);
  display: flex;
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-xs);
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 24px;
}

/* ============================================================
   EDITOR RAIL TABS — Properties / Layers and Elements / Assets
   Matches the Claude Design's tab-strip pattern at the top of
   each side rail. Active tab gets a paper-card background with
   a soft drop shadow; inactive tabs are flat and ink-3 muted.
   ============================================================ */
.asib-rail-tabs {
  background: var(--cfk-surface);
  border-bottom: 1px solid var(--cfk-line);
  display: flex;
  gap: 4px;
  padding: 8px;
}
.asib-rail-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--cfk-r-md);
  color: var(--cfk-ink-3);
  cursor: pointer;
  flex: 1;
  font-family: var(--cfk-font-ui);
  font-size: var(--cfk-text-sm);
  font-weight: 500;
  height: 32px;
  letter-spacing: -0.005em;
  padding: 0 6px;
  transition: all 120ms var(--cfk-ease);
}
.asib-rail-tab:hover { color: var(--cfk-ink-2); }
.asib-rail-tab.is-active {
  background: var(--cfk-paper);
  border-color: var(--cfk-line);
  box-shadow: var(--cfk-sh-1);
  color: var(--cfk-ink);
  font-weight: 600;
}

/* === PROPERTIES PANEL (right rail's "Properties" tab) === */
.asib-properties-panel { gap: 0; padding: 0; }
.asib-properties-section {
  border-bottom: 1px solid var(--cfk-line);
  padding: 14px 16px;
}
.asib-properties-section:last-of-type { border-bottom: 0; }
.asib-properties-eyebrow {
  color: var(--cfk-ink-3);
  font-size: var(--cfk-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.asib-properties-kind {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-size: var(--cfk-text-xl);
  font-style: italic;
  font-weight: 500;
}
.asib-properties-name {
  color: var(--cfk-ink-2);
  font-size: var(--cfk-text-sm);
  margin-top: 2px;
}
.asib-properties-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
}
.asib-properties-field {
  align-items: center;
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  border-radius: var(--cfk-r-md);
  display: flex;
  height: 32px;
  justify-content: space-between;
  padding: 0 10px;
}
.asib-properties-field-label {
  color: var(--cfk-ink-3);
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-xs);
}
.asib-properties-field-value {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-sm);
}
.asib-properties-empty {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 48px 24px;
  text-align: center;
}
.asib-properties-empty-eyebrow {
  color: var(--cfk-gold-deep);
  font-size: var(--cfk-text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.asib-properties-empty-title {
  color: var(--cfk-ink);
  font-family: var(--cfk-font-display);
  font-size: var(--cfk-text-xl);
  font-style: italic;
  font-weight: 500;
  margin: 0;
}

/* ============================================================
   PROPERTIES PANEL — full inspector (right rail "Properties" tab)
   Faithful port of dsine/project/src/editor-inspector.jsx
   ============================================================ */
.asib-properties-panel {
  background: var(--cfk-surface);
  display: flex;
  flex: 1;
  flex-direction: column;
  font-family: var(--cfk-font-ui);
  min-height: 0;
  overflow-y: auto;
  padding: 0;
}
.asib-properties-panel .asib-helper {
  font-size: var(--cfk-text-xs);
  color: var(--cfk-ink-3);
}

/* Selection switcher (6 chips, 3-col grid) */
.asib-prop-switcher {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px 0;
}
.asib-prop-switcher-eyebrow {
  color: var(--cfk-ink-4);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.asib-prop-switcher-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, 1fr);
}
.asib-prop-switcher-chip {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--cfk-r-sm);
  color: var(--cfk-ink-3);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 4px;
  transition: all 120ms var(--cfk-ease);
}
.asib-prop-switcher-chip:hover { color: var(--cfk-ink-2); }
.asib-prop-switcher-chip.is-active {
  background: var(--cfk-paper);
  border-color: var(--cfk-line);
  box-shadow: var(--cfk-sh-1);
  color: var(--cfk-ink);
}
.asib-prop-switcher-chip-label {
  font-size: 9px;
  font-weight: 500;
}

/* Selection header — icon + name + meta + more */
.asib-prop-selection-header {
  align-items: center;
  border-bottom: 1px solid var(--cfk-line);
  border-top: 1px solid var(--cfk-line);
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding: 12px 14px;
}
.asib-prop-selection-icon {
  align-items: center;
  background: var(--cfk-gold-soft);
  border-radius: 6px;
  color: var(--cfk-gold-deep);
  display: grid;
  height: 24px;
  place-items: center;
  width: 24px;
}
.asib-prop-selection-meta { flex: 1; min-width: 0; }
.asib-prop-selection-name {
  color: var(--cfk-ink);
  font-size: var(--cfk-text-md);
  font-weight: 600;
}
.asib-prop-selection-sub {
  color: var(--cfk-ink-3);
  font-size: var(--cfk-text-xs);
}
.asib-prop-selection-more {
  background: transparent;
  border: 0;
  border-radius: var(--cfk-r-sm);
  color: var(--cfk-ink-3);
  cursor: pointer;
  font-size: 14px;
  height: 24px;
  width: 24px;
}
.asib-prop-selection-more:hover { background: var(--cfk-surface-2); color: var(--cfk-ink); }

/* Sections */
.asib-prop-section { border-bottom: 1px solid var(--cfk-line); }
.asib-prop-section-head {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  width: 100%;
}
.asib-prop-section-title {
  color: var(--cfk-ink-2);
  font-size: var(--cfk-text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.asib-prop-section-chev { color: var(--cfk-ink-3); font-size: var(--cfk-text-sm); }
.asib-prop-section-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 12px;
}

/* Field row — label + control */
.asib-prop-field {
  align-items: center;
  display: flex;
  gap: 10px;
}
.asib-prop-field-label {
  color: var(--cfk-ink-3);
  flex-shrink: 0;
  font-size: var(--cfk-text-xs);
  width: 64px;
}
.asib-prop-field-control { flex: 1; min-width: 0; }
.asib-prop-grid-2 {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

/* Number input with optional suffix */
.asib-prop-num {
  align-items: center;
  display: flex;
  position: relative;
}
.asib-prop-num-input {
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-sm);
  height: 28px;
  padding-right: 22px;
  width: 100%;
}
.asib-prop-num-suffix {
  color: var(--cfk-ink-3);
  font-family: var(--cfk-font-mono);
  font-size: 10px;
  pointer-events: none;
  position: absolute;
  right: 8px;
}

/* Slider */
.asib-prop-slider {
  align-items: center;
  display: flex;
  gap: 10px;
}
.asib-prop-slider-track {
  background: var(--cfk-surface-2);
  border-radius: 99px;
  flex: 1;
  height: 4px;
  position: relative;
}
.asib-prop-slider-fill {
  background: var(--cfk-ink-2);
  border-radius: 99px;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
}
.asib-prop-slider-thumb {
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-ink-3);
  border-radius: 99px;
  box-shadow: var(--cfk-sh-1);
  height: 14px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
}
.asib-prop-slider-value {
  color: var(--cfk-ink-2);
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-xs);
  text-align: right;
  width: 36px;
}

/* Color chip */
.asib-prop-color-chip {
  align-items: center;
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  border-radius: var(--cfk-r-md);
  cursor: pointer;
  display: flex;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  width: 100%;
}
.asib-prop-color-swatch {
  background-clip: padding-box;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  flex-shrink: 0;
  height: 18px;
  width: 18px;
}
.asib-prop-color-label {
  color: var(--cfk-ink-2);
  flex: 1;
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-sm);
  text-align: left;
}
.asib-prop-color-chev { color: var(--cfk-ink-3); font-size: 11px; }

/* Segmented control (3-state buttons) */
.asib-prop-seg {
  background: var(--cfk-surface-2);
  border-radius: var(--cfk-r-sm);
  display: flex;
  gap: 4px;
  padding: 2px;
}
.asib-prop-seg-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--cfk-r-xs);
  color: var(--cfk-ink-3);
  cursor: pointer;
  flex: 1;
  font-size: 11px;
  font-weight: 500;
  height: 24px;
  padding: 0 6px;
}
.asib-prop-seg-btn:hover { color: var(--cfk-ink); }
.asib-prop-seg-btn.is-active {
  background: var(--cfk-paper);
  border-color: var(--cfk-line);
  color: var(--cfk-ink);
}

/* Select inside Properties */
.asib-prop-select {
  font-family: var(--cfk-font-ui);
  font-size: var(--cfk-text-sm);
  height: 28px;
  width: 100%;
}

/* Source row (Asset / Photo file rows) */
.asib-prop-source {
  align-items: center;
  background: var(--cfk-paper);
  border: 1px solid var(--cfk-line);
  border-radius: var(--cfk-r-md);
  display: flex;
  gap: 8px;
  padding: 6px 10px;
}
.asib-prop-source-icon {
  align-items: center;
  background: var(--cfk-gold-soft);
  border-radius: 4px;
  color: var(--cfk-gold-deep);
  display: grid;
  height: 18px;
  place-items: center;
  width: 18px;
}
.asib-prop-source-thumb {
  background: linear-gradient(135deg, #d4b8a0, #7a5236);
  border-radius: 4px;
  height: 24px;
  width: 24px;
}
.asib-prop-source-name {
  color: var(--cfk-ink-2);
  flex: 1;
  font-family: var(--cfk-font-mono);
  font-size: var(--cfk-text-sm);
}

/* Text on path nested block (inside Effects when kind is text) */
.asib-prop-text-on-path {
  border-top: 1px dashed var(--cfk-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-top: 10px;
}
.asib-prop-eyebrow {
  color: var(--cfk-ink-3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
