/* ============================================================
   RiWord Website — styles.css
   RiCollection Design System · Accent: #e05252 (red)
   Font: Outfit (Google Fonts)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

/* ── CSS Tokens ─────────────────────────────────────────────── */
:root {
  --font:           'Outfit', system-ui, sans-serif;

  /* Background layers */
  --bg-base:        #0d0f14;
  --bg-surface:     #161922;
  --bg-card:        #1e2130;
  --bg-hover:       #252840;

  /* Borders */
  --border:         #2a2f4a;
  --border-light:   #353a5c;

  /* RiWord accent — red from logo */
  --accent-rgb:     224, 82, 82;
  --accent:         #e05252;
  --accent-2:       #ef7070;
  --accent-glow:    rgba(224, 82, 82, 0.22);
  --accent-hover:   #cc3d3d;

  /* Status colours */
  --success:        #22d3a0;
  --success-bg:     rgba(34, 211, 160, 0.1);
  --warning:        #fbbf24;
  --warning-bg:     rgba(251, 191, 36, 0.1);
  --error:          #f87171;
  --error-bg:       rgba(248, 113, 113, 0.1);
  --info:           #60a5fa;

  /* Text */
  --text-primary:   #f1f5f9;
  --text-secondary: #b8c2d8;
  --text-muted:     #7e8aaa;

  /* Layout */
  --nav-h:          64px;
  --radius:         10px;
  --radius-lg:      14px;
  --radius-xl:      20px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family:              var(--font);
  font-size:                15px;
  line-height:              1.65;
  color:                    var(--text-primary);
  background-color:         var(--bg-base);
  -webkit-font-smoothing:   antialiased;
  -moz-osx-font-smoothing:  grayscale;
  overflow-x:               hidden;
}

/* Background atmosphere */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(224,82,82,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(86,126,255,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(130,80,200,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Dot grid */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

a { color: var(--accent-2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position:        fixed;
  top:             0;
  left:            0;
  right:           0;
  height:          var(--nav-h);
  z-index:         100;
  background:      rgba(13, 15, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom:   1px solid rgba(255,255,255,0.07);
  display:         flex;
  align-items:     center;
  padding:         0 48px;
}

.navbar-inner {
  width:           100%;
  max-width:       1200px;
  margin:          0 auto;
  display:         flex;
  align-items:     center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-logo img {
  height: 32px;
  width: auto;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  gap:             8px;
  padding:         10px 22px;
  border-radius:   var(--radius);
  font-family:     var(--font);
  font-size:       14px;
  font-weight:     600;
  cursor:          pointer;
  transition:      all 0.15s;
  text-decoration: none;
  border:          1px solid transparent;
  white-space:     nowrap;
}

.btn-primary {
  background:   rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.4);
  color:        var(--accent-2);
}
.btn-primary:hover {
  background:   rgba(var(--accent-rgb), 0.25);
  border-color: rgba(var(--accent-rgb), 0.65);
  color:        #fff;
  box-shadow:   0 0 24px rgba(var(--accent-rgb), 0.25);
  transform:    translateY(-1px);
}

.btn-ghost {
  background:   rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.12);
  color:        var(--text-secondary);
}
.btn-ghost:hover {
  background:   rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
  color:        var(--text-primary);
  transform:    translateY(-1px);
}

.btn-lg {
  padding:   13px 30px;
  font-size: 15px;
}

.btn-sm {
  padding:   7px 14px;
  font-size: 13px;
}

/* ── Layout wrapper ──────────────────────────────────────────── */
.page-wrapper {
  position:   relative;
  z-index:    1;
  padding-top: var(--nav-h);
}

.container {
  width:     100%;
  max-width: 1200px;
  margin:    0 auto;
  padding:   0 48px;
}

/* ── Hero Section ────────────────────────────────────────────── */
.hero {
  display:         flex;
  align-items:     center;
  padding:         60px 0 20px;
}

.hero-inner {
  display:               grid;
  grid-template-columns: 2fr 3fr;
  gap:                   60px;
  align-items:           center;
  width:                 100%;
}

/* Hero copy */
.hero-badge {
  display:         inline-flex;
  align-items:     center;
  gap:             8px;
  padding:         5px 14px;
  background:      rgba(var(--accent-rgb), 0.1);
  border:          1px solid rgba(var(--accent-rgb), 0.3);
  border-radius:   20px;
  font-size:       12px;
  font-weight:     600;
  color:           var(--accent-2);
  letter-spacing:  0.04em;
  text-transform:  uppercase;
  margin-bottom:   24px;
}

.badge-dot {
  width:            7px;
  height:           7px;
  border-radius:    50%;
  background:       var(--accent);
  animation:        badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5); }
  50%       { opacity: 0.75; box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0); }
}

.hero-headline {
  font-size:      clamp(40px, 5vw, 62px);
  font-weight:    700;
  line-height:    1.12;
  letter-spacing: -0.025em;
  color:          var(--text-primary);
  margin-bottom:  20px;
}

.hero-headline em {
  font-style:  normal;
  color:       var(--accent);
  position:    relative;
}

.hero-description {
  font-size:     17px;
  line-height:   1.7;
  color:         var(--text-secondary);
  margin-bottom: 32px;
  max-width:     480px;
}

.hero-tags {
  display:       flex;
  gap:           10px;
  flex-wrap:     wrap;
  margin-bottom: 36px;
}

.hero-tag {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  padding:       5px 12px;
  background:    rgba(255,255,255,0.05);
  border:        1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size:     13px;
  color:         var(--text-muted);
}

.hero-tag-dot {
  width:         5px;
  height:        5px;
  border-radius: 50%;
  background:    var(--accent);
}

.hero-cta {
  display:     flex;
  gap:         14px;
  flex-wrap:   wrap;
  align-items: center;
}

/* ── Demo Panel (Hero Right) ─────────────────────────────────── */
.hero-demo {
  position: relative;
}

/* Scene tabs */
.demo-tabs {
  display:       flex;
  gap:           8px;
  margin-bottom: 12px;
  flex-wrap:     wrap;
}

.demo-tab {
  display:       inline-flex;
  align-items:   center;
  gap:           7px;
  padding:       5px 13px;
  border-radius: 20px;
  font-size:     12px;
  font-weight:   500;
  border:        1px solid rgba(255,255,255,0.08);
  background:    rgba(255,255,255,0.04);
  color:         var(--text-muted);
  cursor:        pointer;
  transition:    all 0.3s;
  user-select:   none;
}

.demo-tab-dot {
  width:         6px;
  height:        6px;
  border-radius: 50%;
  background:    rgba(255,255,255,0.18);
  transition:    background 0.3s;
}

.demo-tab.active {
  background:   rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.38);
  color:        var(--accent-2);
  font-weight:  600;
}

.demo-tab.active .demo-tab-dot {
  background: var(--accent);
}

/* Browser chrome wrapper */
.demo-browser {
  background:    rgba(14, 16, 26, 0.97);
  border:        1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-lg);
  box-shadow:    0 40px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03);
  overflow:      hidden;
}

.demo-chrome-bar {
  display:         flex;
  align-items:     center;
  padding:         10px 16px;
  background:      rgba(8, 10, 18, 0.9);
  border-bottom:   1px solid rgba(255,255,255,0.06);
  gap:             10px;
}

.chrome-dots {
  display: flex;
  gap:     6px;
}

.chrome-dot {
  width:         11px;
  height:        11px;
  border-radius: 50%;
}
.chrome-dot.red    { background: #ff5f57; }
.chrome-dot.yellow { background: #febc2e; }
.chrome-dot.green  { background: #28c840; }

.chrome-url {
  flex:            1;
  display:         flex;
  justify-content: center;
}

.chrome-url-pill {
  display:       inline-flex;
  align-items:   center;
  gap:           6px;
  background:    rgba(255,255,255,0.05);
  border:        1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding:       3px 14px;
  max-width:     220px;
  width:         100%;
}

.chrome-url-dot {
  width:         6px;
  height:        6px;
  border-radius: 50%;
  background:    var(--accent);
  flex-shrink:   0;
}

.chrome-url-text {
  font-family:   monospace;
  font-size:     11px;
  color:         var(--text-muted);
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}

.chrome-spacer { width: 41px; }

/* Demo body — widget left, target app right, both fill full height */
.demo-body {
  display:       flex;
  align-items:   stretch;
  gap:           16px;
  padding:       16px;
  height:        380px;
  position:      relative;
}

/* Panels wrapper — all panels stacked in same grid cell */
.demo-panels {
  flex:                  1;
  min-width:             0;
  display:               grid;
  grid-template-columns: 1fr;
  grid-template-rows:    1fr;
}

/* ── RiWord Widget ──────────────────────────────────────────── */
.riword-widget {
  flex:           0 0 220px;
  background:    #0d0d1a;
  border:        1px solid rgba(224, 82, 82, 0.45);
  border-radius: 10px;
  box-shadow:    0 0 20px rgba(224, 82, 82, 0.08), inset 0 1px 0 rgba(255,255,255,0.03);
  display:       flex;
  flex-direction: column;
  overflow:      hidden;
  transition:    border-color 0.4s;
}

.riword-widget.listening {
  border-color: rgba(224, 82, 82, 0.9);
  box-shadow:   0 0 30px rgba(224, 82, 82, 0.18);
}

.widget-titlebar {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         9px 10px 9px 14px;
  border-bottom:   1px solid rgba(255,255,255,0.05);
}

.widget-logo {
  display:     flex;
  align-items: center;
  gap:         8px;
}

.widget-logo-text {
  font-size:   15px;
  font-weight: 700;
  color:       #f1f5f9;
  letter-spacing: -0.01em;
}

/* SVG waveform icon for widget */
.widget-waveform-icon {
  display: flex;
  align-items: center;
  gap: 2px;
}

.widget-waveform-icon span {
  display:       inline-block;
  width:         3px;
  border-radius: 2px;
  background:    var(--accent);
}

.widget-chrome-btns {
  display:   flex;
  gap:       10px;
  font-size: 13px;
  color:     var(--text-muted);
}

.widget-chrome-btn {
  cursor:     default;
  transition: color 0.15s;
}

.widget-right-panel {
  display:         flex;
  flex-direction:  row;
  flex:            1;
  overflow:        hidden;
}

.widget-content {
  flex:        1;
  display:     flex;
  flex-direction: column;
  padding:     10px 12px 0;
  min-height:  120px;
  overflow:    hidden;
}

.widget-transcript {
  flex:        1;
  font-size:   13px;
  color:       var(--text-secondary);
  line-height: 1.6;
  min-height:  80px;
}

.widget-waveform {
  display:       flex;
  align-items:   center;
  gap:           3px;
  padding:       8px 0;
  opacity:       0;
  transition:    opacity 0.3s;
}

.widget-waveform.active { opacity: 1; }

.wbar {
  width:         3px;
  background:    var(--accent);
  border-radius: 2px;
  animation:     waveAnim 0.7s ease-in-out infinite;
}

.wbar:nth-child(1)  { height: 8px;  animation-delay: 0s; }
.wbar:nth-child(2)  { height: 18px; animation-delay: 0.08s; }
.wbar:nth-child(3)  { height: 26px; animation-delay: 0.16s; }
.wbar:nth-child(4)  { height: 18px; animation-delay: 0.24s; }
.wbar:nth-child(5)  { height: 30px; animation-delay: 0.32s; }
.wbar:nth-child(6)  { height: 22px; animation-delay: 0.40s; }
.wbar:nth-child(7)  { height: 14px; animation-delay: 0.48s; }
.wbar:nth-child(8)  { height: 24px; animation-delay: 0.56s; }
.wbar:nth-child(9)  { height: 10px; animation-delay: 0.64s; }
.wbar:nth-child(10) { height: 20px; animation-delay: 0.72s; }

@keyframes waveAnim {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50%       { transform: scaleY(1);   opacity: 1; }
}

/* Widget icon buttons (right side) */
.widget-icons {
  display:        flex;
  flex-direction: column;
  align-items:    center;
  gap:            2px;
  padding:        10px 6px;
  border-left:    1px solid rgba(255,255,255,0.05);
}

.widget-icon-btn {
  width:         28px;
  height:        28px;
  border-radius: 7px;
  border:        none;
  background:    transparent;
  cursor:        default;
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     14px;
  transition:    background 0.15s;
}

.widget-icon-btn.trash    { color: #f87171; }
.widget-icon-btn.history  { color: #60a5fa; }
.widget-icon-btn.dict     { color: #4ade80; }
.widget-icon-btn.settings { color: #c084fc; }

/* Widget status bar */
.widget-status {
  padding:      7px 14px;
  border-top:   1px solid rgba(255,255,255,0.05);
  font-size:    11px;
  color:        var(--text-muted);
  white-space:  nowrap;
  overflow:     hidden;
  text-overflow: ellipsis;
  background:   rgba(0,0,0,0.2);
}

/* ── Target app panels ──────────────────────────────────────── */
.target-panel {
  grid-area:      1 / 1;        /* all panels share the same cell */
  border-radius:  8px;
  overflow:       hidden;
  border:         1px solid var(--border);
  background:     var(--bg-card);
  opacity:        0;
  transform:      translateX(20px);
  transition:     opacity 0.5s, transform 0.5s;
  display:        flex;
  flex-direction: column;
}

.target-panel.visible {
  opacity:   1;
  transform: translateX(0);
}

/* Gmail mock */
.gmail-header {
  padding:       10px 14px;
  background:    #1a1f35;
  border-bottom: 1px solid var(--border);
  display:       flex;
  align-items:   center;
  gap:           10px;
}

.gmail-avatar {
  width:         26px;
  height:        26px;
  border-radius: 50%;
  background:    linear-gradient(135deg, #e05252, #7c6af7);
  flex-shrink:   0;
}

.gmail-to {
  font-size: 12px;
  color:     var(--text-muted);
}

.gmail-body {
  flex:       1;
  padding:    14px;
  font-size:  13px;
  color:      var(--text-secondary);
  line-height: 1.7;
}

.gmail-footer {
  padding:     10px 14px;
  border-top:  1px solid var(--border);
  display:     flex;
  gap:         8px;
}

.gmail-send-btn {
  padding:       6px 16px;
  background:    rgba(var(--accent-rgb), 0.15);
  border:        1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 6px;
  font-size:     12px;
  font-weight:   600;
  color:         var(--accent-2);
  cursor:        default;
  transition:    all 0.3s;
}

.gmail-send-btn.active {
  background: rgba(var(--accent-rgb), 0.3);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3);
}

/* Amazon browser bubble */
.amazon-header {
  padding:       8px 12px;
  background:    #131921;
  border-bottom: 1px solid #333;
  display:       flex;
  align-items:   center;
  gap:           8px;
}

.amazon-logo {
  font-size:   14px;
  font-weight: 700;
  color:       #ff9900;
  font-family: serif;
}

.amazon-search-bar {
  flex:          1;
  height:        26px;
  background:    #fff;
  border-radius: 4px;
  border:        1px solid #ff9900;
  display:       flex;
  align-items:   center;
  padding:       0 8px;
  font-size:     11px;
  color:         #333;
  overflow:      hidden;
  text-overflow: ellipsis;
  white-space:   nowrap;
}

.amazon-body {
  flex:    1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap:     8px;
}

.amazon-product {
  display:       flex;
  gap:           8px;
  padding:       8px;
  background:    rgba(255,255,255,0.02);
  border:        1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  opacity:       0;
  transform:     translateY(6px);
  transition:    opacity 0.4s, transform 0.4s;
}

.amazon-product.show {
  opacity:   1;
  transform: translateY(0);
}

.amazon-product-img {
  width:         40px;
  height:        40px;
  border-radius: 4px;
  background:    linear-gradient(135deg, #2a2f4a, #353a5c);
  flex-shrink:   0;
}

.amazon-product-info { flex: 1; }

.amazon-product-title {
  font-size:   11px;
  color:       var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 3px;
}

.amazon-product-price {
  font-size:   12px;
  font-weight: 700;
  color:       #ef7070;
}

.amazon-product-stars {
  font-size: 10px;
  color:     #ff9900;
}

/* Notepad mock */
.notepad-titlebar {
  padding:       8px 12px;
  background:    #1e2130;
  border-bottom: 1px solid var(--border);
  font-size:     12px;
  color:         var(--text-muted);
  display:       flex;
  justify-content: space-between;
}

.notepad-body {
  flex:        1;
  padding:     12px;
  font-family: 'Courier New', monospace;
  font-size:   12px;
  color:       var(--text-secondary);
  line-height: 1.7;
  background:  #0f1118;
}

.notepad-cursor {
  display:    inline-block;
  width:      2px;
  height:     14px;
  background: var(--accent);
  animation:  cursorBlink 1s step-end infinite;
  vertical-align: middle;
  margin-left: 1px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Amazon Panel (redesigned) ───────────────────────────────── */
.target-panel[data-target="amazon"] {
  background: #0f1111;
  display: flex;
  flex-direction: column;
}

.az-nav {
  display:         flex;
  align-items:     center;
  gap:             10px;
  padding:         7px 10px;
  background:      #131921;
  border-bottom:   1px solid #333;
  flex-shrink:     0;
}

.az-logo {
  font-size:   15px;
  font-weight: 900;
  color:       #fff;
  font-family: serif;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.az-location {
  display:     flex;
  align-items: center;
  gap:         4px;
  font-size:   9px;
  color:       #ccc;
  line-height: 1.3;
  flex-shrink: 0;
}
.az-location strong { color: #fff; font-size: 10px; }

.az-search-wrap {
  flex:          1;
  display:       flex;
  align-items:   stretch;
  border-radius: 4px;
  overflow:      hidden;
  height:        26px;
}

.az-dept {
  background:  #ddd;
  color:       #111;
  font-size:   10px;
  font-weight: 600;
  padding:     0 7px;
  display:     flex;
  align-items: center;
  gap:         3px;
  border-right: 1px solid #bbb;
  white-space: nowrap;
  flex-shrink: 0;
}

.az-search-bar {
  flex:        1;
  background:  #fff;
  display:     flex;
  align-items: center;
  padding:     0 8px;
  min-width:   0;
  overflow:    hidden;
}

.az-search-text {
  font-size:     11px;
  color:         #111;
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}

.az-search-btn {
  background:  #febd69;
  display:     flex;
  align-items: center;
  justify-content: center;
  padding:     0 8px;
  flex-shrink: 0;
}

.az-results-label {
  padding:   5px 10px;
  font-size: 9px;
  color:     #a0a0a0;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
}
.az-results-label em { color: #e8e8e8; font-style: normal; }

.az-body {
  flex:            1;
  display:         flex;
  flex-direction:  column;
  gap:             0;
  overflow:        hidden;
}

.az-product {
  display:       flex;
  gap:           10px;
  padding:       8px 10px;
  border-bottom: 1px solid #1e1e1e;
  opacity:       0;
  transform:     translateY(6px);
  transition:    opacity 0.4s, transform 0.4s;
}
.az-product.show { opacity: 1; transform: translateY(0); }

.az-product-img {
  width:         44px;
  height:        44px;
  border-radius: 3px;
  flex-shrink:   0;
}

.az-product-info { flex: 1; min-width: 0; }

.az-product-title {
  font-size:     10px;
  color:         #e8e8ff;
  line-height:   1.35;
  margin-bottom: 3px;
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}

.az-product-meta {
  display:     flex;
  align-items: center;
  gap:         5px;
  margin-bottom: 2px;
}

.az-stars   { font-size: 10px; color: #ff9900; }
.az-reviews { font-size: 9px;  color: #6fa6d6; }

.az-prime {
  font-size:      8px;
  font-weight:    700;
  color:          #00a8e0;
  font-style:     italic;
  border:         1px solid #00a8e0;
  border-radius:  2px;
  padding:        0 3px;
  letter-spacing: 0.5px;
}

.az-product-price {
  font-size:   13px;
  font-weight: 700;
  color:       #fff;
  line-height: 1;
  margin-bottom: 2px;
}
.az-price-sym { font-size: 9px; vertical-align: super; }
.az-price-dec { font-size: 9px; }

.az-delivery         { font-size: 9px; color: #a0a0a0; }
.az-delivery strong  { color: #d9d9d9; }

/* ── Browser Bubble Panel (redesigned) ──────────────────────── */
.target-panel[data-target="bubble"] {
  background: #13141e;
  overflow:   hidden;
  padding:    0;
  position:   relative;
}

/* Faint document in the background to show you're mid-work */
.bubble-bg {
  position: absolute;
  inset:    0;
  padding:  14px 16px;
  display:  flex;
  flex-direction: column;
  gap: 7px;
  filter: blur(1px);
  opacity: 0.35;
}
.bubble-bg-bar {
  height:        18px;
  width:         100%;
  background:    #1e2130;
  border-radius: 3px;
  margin-bottom: 4px;
}
.bubble-bg-line {
  height:        8px;
  background:    #2a2f4a;
  border-radius: 3px;
}

/* Floating browser window — appears over the document */
.bubble-window {
  position:      absolute;
  top:           50%;
  left:          50%;
  transform:     translate(-50%, -50%) scale(0.85);
  width:         85%;
  background:    #1e2030;
  border:        1px solid rgba(255,255,255,0.14);
  border-radius: 10px;
  box-shadow:    0 24px 64px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04);
  overflow:      hidden;
  opacity:       0;
  transition:    opacity 0.35s ease, transform 0.35s ease;
}
.bubble-window.show {
  opacity:   1;
  transform: translate(-50%, -50%) scale(1);
}

.bubble-chrome {
  display:       flex;
  align-items:   center;
  gap:           8px;
  padding:       7px 10px;
  background:    #13141f;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.bubble-chrome-dots { display: flex; gap: 4px; flex-shrink: 0; }
.bubble-chrome-dots span { width: 8px; height: 8px; border-radius: 50%; }

.bubble-url-bar {
  flex:          1;
  background:    rgba(255,255,255,0.07);
  border:        1px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  padding:       3px 8px;
}
.bubble-url-text {
  font-family:   monospace;
  font-size:     9px;
  color:         #a0a8c0;
  display:       block;
  white-space:   nowrap;
  overflow:      hidden;
  text-overflow: ellipsis;
}

/* Weather card inside the bubble */
.bubble-content { padding: 12px; }

.bubble-weather-top {
  text-align:    center;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-bottom: 8px;
}
.bubble-weather-city { font-size: 10px; color: #888; margin-bottom: 2px; }
.bubble-weather-temp { font-size: 30px; font-weight: 700; color: #f1f5f9; line-height: 1; }
.bubble-weather-desc { font-size: 10px; color: #aaa; margin-top: 2px; }

.bubble-weather-row {
  display:         flex;
  justify-content: space-around;
  gap:             4px;
}

.bubble-weather-day {
  flex:        1;
  text-align:  center;
  padding:     5px 2px;
  border-radius: 6px;
  opacity:     0;
  transform:   translateY(6px);
  transition:  opacity 0.3s, transform 0.3s;
}
.bubble-weather-day.show {
  opacity:   1;
  transform: translateY(0);
}
.bubble-weather-day--show { background: rgba(255,255,255,0.05); }

.bwd-label { font-size: 8px;  color: #888; margin-bottom: 3px; }
.bwd-icon  { font-size: 14px; margin-bottom: 3px; }
.bwd-range { font-size: 8px;  color: #ccc; }

.demo-section-header {
  text-align:    center;
  margin-bottom: 60px;
}

.section-eyebrow {
  display:       inline-flex;
  align-items:   center;
  gap:           8px;
  padding:       5px 14px;
  background:    rgba(var(--accent-rgb), 0.08);
  border:        1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 20px;
  font-size:     12px;
  font-weight:   600;
  color:         var(--accent-2);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.section-title {
  font-size:      clamp(28px, 4vw, 42px);
  font-weight:    700;
  letter-spacing: -0.02em;
  line-height:    1.2;
  color:          var(--text-primary);
  margin-bottom:  14px;
}

.section-title em {
  font-style: normal;
  color:      var(--accent);
}

.section-sub {
  font-size:  17px;
  color:      var(--text-secondary);
  max-width:  540px;
  margin:     0 auto;
  line-height: 1.7;
}

/* Full-width demo stage */
.demo-stage {
  max-width:       1100px;
  margin:          0 auto;
  padding:         0 48px;
}

.demo-stage .demo-tabs {
  justify-content: center;
  margin-bottom:   16px;
}

.demo-stage .demo-browser {
  width: 100%;
}

.demo-stage .demo-body {
  min-height: 340px;
}

.demo-stage .riword-widget {
  width: 320px;
}

/* ── RiCreate client tiles ───────────────────────────────────── */
#ricreate-client {
  padding: 80px 0;
}

/* Tile styles (injected HTML) */
.ricreate-tiles {
  max-width: 1100px;
  margin:    0 auto;
  padding:   0 48px;
  display:   flex;
  flex-wrap: wrap;
  gap:       16px;
}

.ricreate-tile {
  flex:          1;
  min-width:     200px;
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:       20px;
  transition:    all 0.2s;
}

.ricreate-tile:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform:    translateY(-2px);
  box-shadow:   0 8px 32px rgba(0,0,0,0.4);
}

/* ── RiCollection Carousel ───────────────────────────────────── */
#carousel-client {
  padding: 40px 0 60px;
}

/* ── Bottom strips (RiCreate style) ──────────────────────── */
.bottom-strips {
  border-top: 1px solid var(--border);
  display:    grid;
  grid-template-columns: 1fr 1fr;
}

.bottom-strip {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  padding:         22px 48px;
  gap:             16px;
  background:      var(--bg-surface);
  transition:      background 0.2s;
}

.bottom-strip:first-child {
  border-right: 1px solid var(--border);
}

.bottom-strip:hover {
  background: var(--bg-hover);
}

.bottom-strip-label {
  font-size:   14px;
  color:       var(--text-muted);
  font-weight: 500;
}

.bottom-strip-link {
  display:      inline-flex;
  align-items:  center;
  gap:          5px;
  color:         var(--accent-2);
  font-size:    14px;
  font-weight:  600;
  white-space:  nowrap;
  transition:   all 0.15s;
  flex-shrink:  0;
}

.bottom-strip-link:hover {
  color: var(--accent);
  gap:   9px;
}

/* ── Features strip ──────────────────────────────────────────── */
.features-strip {
  padding: 80px 0 40px;
}

.features-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:           24px;
}

.feature-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:       28px;
  transition:    all 0.2s;
}

.feature-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform:    translateY(-3px);
  box-shadow:   0 16px 48px rgba(0,0,0,0.5);
}

.feature-icon-box {
  width:         44px;
  height:        44px;
  border-radius: 10px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  margin-bottom: 16px;
  font-size:     20px;
}

.feature-title {
  font-size:     16px;
  font-weight:   700;
  color:         var(--text-primary);
  margin-bottom: 8px;
}

.feature-desc {
  font-size:   14px;
  color:       var(--text-secondary);
  line-height: 1.65;
}



/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  padding:      28px 48px;
  border-top:   1px solid var(--border);
  background:   var(--bg-surface);
  display:      flex;
  align-items:  center;
  justify-content: space-between;
  font-size:    13px;
  color:        var(--text-muted);
  flex-wrap:    wrap;
  gap:          12px;
}

.footer-links {
  display: flex;
  gap:     20px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
}

.footer-links a:hover { color: var(--text-secondary); }

/* ── Contact Page ────────────────────────────────────────────── */
.contact-page {
  padding: 80px 0;
  min-height: calc(100vh - var(--nav-h));
}

.contact-grid {
  display:               grid;
  grid-template-columns: 1fr 1.3fr;
  gap:                   80px;
  align-items:           start;
}

.contact-back {
  display:     inline-flex;
  align-items: center;
  gap:         6px;
  color:       var(--text-muted);
  font-size:   14px;
  margin-bottom: 32px;
  transition:  color 0.15s;
}

.contact-back:hover { color: var(--text-primary); }

.contact-heading {
  font-size:      clamp(36px, 5vw, 52px);
  font-weight:    700;
  letter-spacing: -0.025em;
  line-height:    1.1;
  color:          var(--text-primary);
  margin-bottom:  18px;
}

.contact-heading em {
  font-style: normal;
  color:      var(--accent);
}

.contact-intro {
  font-size:     16px;
  color:         var(--text-secondary);
  line-height:   1.7;
  margin-bottom: 40px;
}

.contact-item {
  display:       flex;
  align-items:   flex-start;
  gap:           14px;
  margin-bottom: 24px;
}

.contact-item-icon {
  width:         38px;
  height:        38px;
  border-radius: 9px;
  display:       flex;
  align-items:   center;
  justify-content: center;
  font-size:     17px;
  flex-shrink:   0;
}

.contact-item-icon.red    { background: rgba(var(--accent-rgb), 0.12); }
.contact-item-icon.blue   { background: rgba(96, 165, 250, 0.12); }

.contact-item-label {
  font-size:   12px;
  font-weight: 600;
  color:       var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.contact-item-value {
  font-size: 15px;
  color:     var(--text-primary);
}

/* Contact form */
.contact-form-card {
  background:    var(--bg-card);
  border:        1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding:       36px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display:       block;
  font-size:     13px;
  font-weight:   500;
  color:         var(--text-secondary);
  margin-bottom: 7px;
}

.form-input,
.form-textarea {
  width:         100%;
  background:    var(--bg-surface);
  border:        1px solid var(--border);
  border-radius: var(--radius);
  padding:       10px 14px;
  font-size:     14px;
  font-family:   var(--font);
  color:         var(--text-primary);
  transition:    border-color 0.15s, box-shadow 0.15s;
  outline:       none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow:   0 0 0 3px var(--accent-glow);
}

.form-textarea {
  min-height:  140px;
  resize:      vertical;
}

.form-submit {
  width: 100%;
}

.form-feedback {
  margin-top:    14px;
  padding:       12px 16px;
  border-radius: var(--radius);
  font-size:     14px;
  display:       none;
}

.form-feedback.success {
  background:   var(--success-bg);
  border:       1px solid rgba(34,211,160,0.25);
  color:        var(--success);
  display:      block;
}

.form-feedback.error {
  background:   var(--error-bg);
  border:       1px solid rgba(248,113,113,0.25);
  color:        var(--error);
  display:      block;
}

/* ── Privacy / Terms ─────────────────────────────────────────── */
.legal-page {
  padding:   80px 0;
  min-height: calc(100vh - var(--nav-h));
}

.legal-content {
  max-width: 760px;
}

.legal-content h1 {
  font-size:      clamp(28px, 4vw, 40px);
  font-weight:    700;
  letter-spacing: -0.02em;
  margin-bottom:  8px;
}

.legal-content .legal-date {
  font-size:     13px;
  color:         var(--text-muted);
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size:      18px;
  font-weight:    700;
  color:          var(--text-primary);
  margin-top:     32px;
  margin-bottom:  10px;
}

.legal-content p {
  font-size:     15px;
  color:         var(--text-secondary);
  line-height:   1.75;
  margin-bottom: 14px;
}

/* ── Animations (shared) ─────────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
@keyframes spin    { from { transform: rotate(0deg) } to { transform: rotate(360deg) } }

.animate-in {
  animation: slideUp 0.6s ease forwards;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .container, .demo-stage { padding: 0 28px; }
  .navbar { padding: 0 28px; }
  .hero-inner { grid-template-columns: 1fr; gap: 50px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .bottom-strips { grid-template-columns: 1fr; }
  .bottom-strip:first-child { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 768px) {
  .container, .demo-stage { padding: 0 20px; }
  .navbar { padding: 0 20px; }
  .hero { padding: 50px 0 40px; }
  .features-grid { grid-template-columns: 1fr; }
  .demo-body { flex-direction: column; }
  .riword-widget, .demo-stage .riword-widget { width: 100%; }
  .site-footer { flex-direction: column; gap: 16px; text-align: center; }
  .bottom-strip { padding: 30px 28px; }
  .contact-form-card { padding: 24px; }
}
