/* ========================================
   DARIA RIAHUZOVA — PORTFOLIO
   ======================================== */

:root {
  --bg: #FAFAF8;
  --text: #1A1A1A;
  --text-secondary: #6B6B6B;
  --accent: #2B5C8A;
  --accent-light: #E8F0F7;
  --border: #E5E5E3;
  --card-bg: #FFFFFF;
  --card-hover: #F5F5F3;
  --tag-bg: #F0F0EE;
  --dark-bg: #111113;
  --max-w: 1120px;
  --radius: 12px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---- NAV ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
nav .nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
nav .logo {
  font-family: 'DM Serif Display', serif; font-size: 18px;
  color: var(--text); text-decoration: none;
}
nav .nav-links { display: flex; gap: 32px; }
nav .nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: color 0.2s;
}
nav .nav-links a:hover { color: var(--text); }
.menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-btn svg { width: 24px; height: 24px; stroke: var(--text); }

/* ---- HERO (home) ---- */
.hero {
  max-width: var(--max-w); margin: 0 auto; padding: 140px 32px 80px;
}
.hero-tag {
  display: inline-block; padding: 6px 14px; background: var(--accent-light);
  color: var(--accent); font-size: 13px; font-weight: 500;
  border-radius: 20px; margin-bottom: 24px; letter-spacing: 0.02em;
}
.hero-tag-green {
  background: #E8F5E9; color: #2E7D32;
}
.hero-tag-grey {
  background: var(--tag-bg); color: var(--text-secondary);
}
.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.15; margin-bottom: 24px; max-width: 720px;
}
.hero p {
  font-size: 18px; line-height: 1.7; color: var(--text-secondary);
  max-width: 600px; margin-bottom: 32px;
}
.hero-stats { display: flex; gap: 48px; margin-bottom: 40px; flex-wrap: wrap; }
.hero-stats .stat { display: flex; flex-direction: column; }
.hero-stats .stat-num {
  font-family: 'DM Serif Display', serif; font-size: 32px; color: var(--accent);
}
.hero-stats .stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-split {
  display: flex; align-items: center; gap: 48px;
}
.hero-text { flex: 1; }
.hero-avatar {
  flex-shrink: 0;
}
.hero-avatar img {
  width: 96px; height: 96px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px;
  font-size: 14px; font-weight: 500; border-radius: 8px;
  text-decoration: none; transition: all 0.2s; cursor: pointer;
  border: none; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #234B73; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--card-hover); }

/* ---- SECTIONS ---- */
section { max-width: var(--max-w); margin: 0 auto; padding: 80px 32px; }
.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 12px;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.2; margin-bottom: 48px;
}

/* ---- CASE CARDS (home) ---- */
.cases-grid { display: flex; flex-direction: column; gap: 32px; }
.case-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--card-bg); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: all 0.3s;
  text-decoration: none; color: inherit;
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.case-card:nth-child(even) { direction: rtl; }
.case-card:nth-child(even) > * { direction: ltr; }
.case-card-img {
  overflow: hidden; background: var(--tag-bg);
  display: flex; align-items: center; justify-content: center;
}
.case-card-img img { max-width: 100%; height: auto; object-fit: contain; }
.case-card-img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-card-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.case-card-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tag {
  padding: 4px 10px; background: var(--tag-bg); border-radius: 4px;
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
}
.case-card-body h3 {
  font-family: 'DM Serif Display', serif; font-size: 24px;
  line-height: 1.3; margin-bottom: 12px;
}
.case-card-body p { font-size: 15px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; }
.case-card-body .case-result {
  font-size: 14px; font-weight: 500; color: var(--accent);
  padding-top: 16px; border-top: 1px solid var(--border);
}

/* ---- CASE STUDY PAGES ---- */
.case-hero {
  max-width: var(--max-w); margin: 0 auto; padding: 120px 32px 60px;
}
.case-hero .back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px;
  color: var(--text-secondary); text-decoration: none; margin-bottom: 32px;
  transition: color 0.2s;
}
.case-hero .back-link:hover { color: var(--text); }
.case-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(32px, 4vw, 48px); line-height: 1.2; margin-bottom: 16px;
}
.case-hero > p {
  font-size: 18px; color: var(--text-secondary); max-width: 640px;
  margin-bottom: 32px; line-height: 1.7;
}
.case-meta { display: flex; gap: 40px; flex-wrap: wrap; }
.case-meta-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 4px;
}
.case-meta-value { font-size: 15px; font-weight: 500; }

/* Hero split — text left, media right */
.case-hero-split {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.case-hero-text p {
  font-size: 18px; color: var(--text-secondary); max-width: 640px;
  margin-bottom: 32px; line-height: 1.7;
}
.case-hero-media {
  flex-shrink: 0;
}

.case-section {
  max-width: var(--max-w); margin: 0 auto; padding: 60px 32px;
}
.case-section h2 {
  font-family: 'DM Serif Display', serif; font-size: 28px; margin-bottom: 24px;
}
.case-section h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; margin-top: 32px; }
.case-section p {
  font-size: 16px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 16px; max-width: 680px;
}
.case-section ul { list-style: none; padding: 0; margin-bottom: 24px; }
.case-section ul li {
  position: relative; padding-left: 20px; font-size: 15px;
  color: var(--text-secondary); line-height: 1.7; margin-bottom: 8px;
}
.case-section ul li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.case-section > *:last-child { margin-bottom: 0; }

/* ========================================
   HERO VIDEO — top of case study
   ======================================== */
.case-hero-video {
  max-width: var(--max-w); margin: 0 auto; padding: 0 32px;
}
.case-hero-video .video-card {
  border-radius: var(--radius); overflow: hidden;
  background: #1a1a1c;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}
.case-hero-video .video-card video {
  max-width: 100%; width: 100%; height: auto; display: block;
}
.case-hero-video .video-card-label {
  padding: 14px 20px; font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.6); background: #1a1a1c;
}

/* ========================================
   CASE IMAGES — never exceed original size
   ======================================== */

/* Full-width image container */
.case-img-full {
  margin: 24px 0;
  padding: 24px;
  background: var(--tag-bg);
  border-radius: var(--radius);
  text-align: center;
}
.case-img-full img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
/* Stacked full images — tighter spacing */
.case-img-full + .case-img-full { margin-top: 8px; }

/* Tall images — cap height, scroll if needed */
.case-img-full.tall {
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
}
.case-img-full.tall img {
  max-width: 100%;
  height: auto;
}

/* No-background variant for large images that fill the space */
.case-img-full.clean {
  padding: 0;
  background: none;
}
.case-img-full.clean img {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Two-column image grid */
.case-img-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin: 24px 0;
}
.case-img-grid > div {
  border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--tag-bg); padding: 16px;
  min-height: 120px;
}
.case-img-grid > div img {
  max-width: 100%; height: auto;
  border-radius: 8px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
/* Scrollable grid cell for very tall images */
.case-img-grid > div.scrollable {
  max-height: 500px;
  overflow-y: auto;
  align-items: flex-start;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.12) transparent;
}
/* Stacked grids — tighter spacing */
.case-img-grid + .case-img-grid { margin-top: 0; }

/* Three-column image grid */
.case-img-grid-3 {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 24px 0;
}
.case-img-grid-3 > div {
  border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--tag-bg); padding: 12px;
}
.case-img-grid-3 > div img { max-width: 100%; height: auto; border-radius: 8px; }

/* ---- SECTION HEADER WITH SIDE IMAGE ---- */
.case-section-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px; align-items: start; margin-bottom: 24px;
}
.case-section-split .split-text {}
.case-section-split .split-img {
  border-radius: var(--radius); overflow: hidden;
  background: var(--tag-bg); padding: 16px;
}
.case-section-split .split-img img {
  max-width: 100%; height: auto; border-radius: 8px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}

/* ---- RESULTS GRID ---- */
.results-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px; margin: 32px 0;
}
.result-card {
  padding: 28px; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.result-card .result-num {
  font-family: 'DM Serif Display', serif; font-size: 36px;
  color: var(--accent); margin-bottom: 8px;
}
.result-card .result-text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ---- ABOUT ---- */
.about-grid {
  display: grid; grid-template-columns: 320px 1fr; gap: 60px; align-items: start;
}
.about-photo {
  width: 100%; aspect-ratio: 1/1; border-radius: var(--radius);
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { font-family: 'DM Serif Display', serif; font-size: 32px; margin-bottom: 20px; }
.about-text p { font-size: 16px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; }
.about-text .skills-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }

/* ---- CONTACT ---- */
.contact-bar {
  max-width: var(--max-w); margin: 0 auto; padding: 60px 32px; text-align: center;
}
.contact-bar h2 { font-family: 'DM Serif Display', serif; font-size: 32px; margin-bottom: 12px; }
.contact-bar p { color: var(--text-secondary); margin-bottom: 24px; }
.contact-links { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid var(--border); padding: 32px;
  text-align: center; font-size: 13px; color: var(--text-secondary);
}

/* ========================================
   SCREEN FRAME — subtle border
   ======================================== */
.phone-mockup {
  position: relative;
  width: 280px;
  flex-shrink: 0;
  border: 3px solid rgba(0,0,0,0.08);
  border-radius: 24px;
  overflow: hidden;
  background: var(--tag-bg);
}
.phone-mockup img {
  width: 100%; display: block;
}

/* ========================================
   HORIZONTAL SCROLL GALLERY
   ======================================== */
.scroll-gallery {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.scroll-gallery::-webkit-scrollbar { height: 6px; }
.scroll-gallery::-webkit-scrollbar-track { background: transparent; }
.scroll-gallery::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

.scroll-gallery .phone-mockup {
  scroll-snap-align: start;
}

/* ========================================
   DARK SECTION
   ======================================== */
.dark-section {
  background: var(--dark-bg);
  color: #fff;
  padding: 80px 0;
  margin: 48px 0;
}
.dark-section .section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}
.dark-section h2 {
  font-family: 'DM Serif Display', serif; font-size: 28px;
  margin-bottom: 12px; color: #fff;
}
.dark-section h3 {
  font-size: 16px; font-weight: 500; color: rgba(255,255,255,0.6);
  margin-bottom: 32px;
}
.dark-section p {
  color: rgba(255,255,255,0.7);
}

/* ========================================
   BEFORE / AFTER
   ======================================== */
.before-after {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; margin: 32px 0;
}
.before-after-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
}
.before-after-item img { width: 100%; display: block; }
.before-after-label {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.before-after-label.before { background: rgba(0,0,0,0.6); color: #fff; }
.before-after-label.after { background: var(--accent); color: #fff; }

/* ========================================
   VIDEO CARDS
   ======================================== */
.video-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 24px; margin: 32px 0;
}
.video-card {
  border-radius: var(--radius); overflow: hidden;
  background: #1a1a1c;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.video-card video {
  max-width: 100%; width: 100%; height: auto; display: block;
}
.video-card-label {
  padding: 12px 16px; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.6);
}
.dark-section .video-grid { margin-top: 32px; }
.dark-section .video-card { box-shadow: 0 4px 24px rgba(0,0,0,0.5); }

/* Single full-width video inside case section */
.case-section .video-card {
  margin: 24px 0;
}

/* ========================================
   STAT CARDS — problem space highlights
   ======================================== */
.stat-cards {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin: 32px 0;
}
.stat-card {
  padding: 28px; border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  background: var(--card-bg); box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.stat-card .stat-card-num {
  font-family: 'DM Serif Display', serif; font-size: 28px;
  color: var(--accent); margin-bottom: 8px; line-height: 1.2;
}
.stat-card .stat-card-text {
  font-size: 14px; color: var(--text-secondary); line-height: 1.5;
}
.stat-card .stat-card-source {
  font-size: 12px; color: var(--text-secondary); opacity: 0.6;
  margin-top: 8px;
}

/* ========================================
   COMPETITOR ANALYSIS TABLE
   ======================================== */
.comp-table-wrap {
  overflow-x: auto; margin: 32px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.comp-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  min-width: 700px;
}
.comp-table thead th {
  padding: 14px 16px; text-align: left;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-secondary);
  border-bottom: 2px solid var(--border); white-space: nowrap;
}
.comp-table thead th:first-child { min-width: 160px; }
.comp-table thead th.comp-highlight {
  color: var(--accent); background: var(--accent-light);
  border-radius: 8px 8px 0 0; border-bottom-color: var(--accent);
}
.comp-table tbody td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  color: var(--text-secondary); line-height: 1.4; vertical-align: middle;
}
.comp-table tbody td:first-child {
  font-weight: 600; color: var(--text); font-size: 13px;
}
.comp-table tbody td.comp-highlight {
  background: rgba(43,92,138,0.03);
}
.comp-table tbody tr:last-child td { border-bottom: none; }
.comp-check { color: #4A8C45; font-weight: 700; font-size: 16px; }
.comp-cross { color: #C25555; font-weight: 700; font-size: 16px; }
.comp-partial { color: #C4962C; font-weight: 600; font-size: 13px; }
.comp-insight {
  margin-top: 32px; padding: 24px 28px;
  background: var(--accent-light); border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}
.comp-insight p {
  font-size: 15px; color: var(--text); line-height: 1.6;
  max-width: none; margin-bottom: 0;
}
.comp-insight strong { color: var(--accent); }

@media (max-width: 768px) {
  .comp-table { font-size: 13px; }
  .comp-table thead th, .comp-table tbody td { padding: 10px 12px; }
}

/* ========================================
   TONE VOICE — do / don't cards
   ======================================== */
.tone-intro {
  font-size: 16px; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 8px; max-width: 680px; font-style: italic;
}
.tone-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin: 24px 0;
}
.tone-card {
  padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--border);
}
.tone-card.dont { border-color: #E8B4B4; background: #FDF5F5; }
.tone-card.do { border-color: #A8D5A2; background: #F4FAF3; }
.tone-card-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 16px;
}
.tone-card.dont .tone-card-label { color: #C25555; }
.tone-card.do .tone-card-label { color: #4A8C45; }
.tone-card ul { list-style: none; padding: 0; margin: 0; }
.tone-card ul li {
  position: relative; padding-left: 24px; font-size: 15px;
  color: var(--text); line-height: 1.6; margin-bottom: 8px;
}
.tone-card ul li::before {
  position: absolute; left: 0; top: 2px; font-size: 14px;
}
.tone-card.dont ul li::before { content: '\2717'; color: #C25555; }
.tone-card.do ul li::before { content: '\2713'; color: #4A8C45; }

/* ========================================
   DESIGN SYSTEM SHOWCASE
   ======================================== */
.ds-showcase {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin: 24px 0;
}
.ds-card {
  padding: 24px; border-radius: var(--radius);
  background: var(--card-bg); border: 1px solid var(--border);
}
.ds-card-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 16px;
}
/* Color swatches */
.ds-colors { display: flex; gap: 10px; flex-wrap: wrap; }
.ds-swatch {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.ds-swatch-circle {
  width: 44px; height: 44px; border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.ds-swatch-label { font-size: 11px; color: var(--text-secondary); }
/* Typography samples */
.ds-type-sample {
  margin-bottom: 12px;
}
.ds-type-sample .ds-type-preview {
  font-size: 20px; font-weight: 700; margin-bottom: 2px;
}
.ds-type-sample .ds-type-meta {
  font-size: 12px; color: var(--text-secondary);
}
/* Spacing */
.ds-spacing-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.ds-spacing-bar {
  height: 12px; border-radius: 4px; background: var(--accent-light);
}
.ds-spacing-label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }

/* ========================================
   APP FLOW WITH ARROWS
   ======================================== */
.flow-strip {
  display: flex; align-items: center; gap: 0;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0 32px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.flow-strip .phone-mockup { scroll-snap-align: start; flex-shrink: 0; }
.flow-arrow {
  flex-shrink: 0; display: flex; align-items: center;
  padding: 0 8px; color: var(--accent); opacity: 0.5;
}
.flow-arrow svg { width: 32px; height: 32px; }
.flow-label {
  text-align: center; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); margin-top: 12px;
  letter-spacing: 0.02em;
}

/* ========================================
   SCREENS ROW — centered phone mockups
   ======================================== */
.screens-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin: 24px 0;
  flex-wrap: wrap;
}

/* ========================================
   USER FLOW DIAGRAM — compact flowchart
   ======================================== */
.uf {
  margin: 32px 0;
  font-size: 13px;
}
/* Horizontal row with arrow */
.uf-row {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
  margin-bottom: 0;
}
/* Node */
.uf-node {
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  line-height: 1.3;
  min-width: 120px;
}
.uf-node span {
  display: block;
  font-weight: 400;
  font-size: 11px;
  opacity: 0.75;
  margin-top: 2px;
}
.uf-node.uf-small {
  padding: 8px 14px;
  font-size: 12px;
  min-width: auto;
}
/* Node colors */
.uf-purple { background: #8B7AB8; color: #fff; }
.uf-peach { background: #E8B89A; color: #2C2218; }
.uf-green { background: #75AA7B; color: #fff; }
.uf-outline-purple { background: #fff; color: #2C2218; border: 1.5px solid #8B7AB8; }
.uf-outline-grey { background: #fff; color: #2C2218; border: 1.5px solid #C8C0B8; }
/* Horizontal arrow */
.uf-arrow {
  width: 40px; height: 2px; background: #C8C0B8;
  position: relative; flex-shrink: 0;
}
.uf-arrow::after {
  content: ''; position: absolute; right: -1px; top: -4px;
  border: 5px solid transparent; border-left: 6px solid #C8C0B8;
}
/* Vertical arrow */
.uf-arrow-down {
  width: 2px; height: 20px; background: #C8C0B8;
  margin: 0 auto; position: relative;
}
.uf-arrow-down::after {
  content: ''; position: absolute; bottom: -1px; left: -4px;
  border: 5px solid transparent; border-top: 6px solid #C8C0B8;
}
/* Vertical arrow with label */
.uf-arrow-down-label {
  text-align: center; font-size: 10px; color: var(--text-secondary);
  font-weight: 500; position: relative; padding: 4px 0;
}
.uf-arrow-down-label::before, .uf-arrow-down-label::after {
  content: ''; display: block; width: 2px; background: #C8C0B8; margin: 0 auto;
}
.uf-arrow-down-label::before { height: 8px; margin-bottom: 2px; }
.uf-arrow-down-label::after { height: 8px; margin-top: 2px; position: relative; }
/* Branch line from Tab Bar */
.uf-branch-line {
  width: 2px; height: 24px; background: #C8C0B8; margin: 0 auto;
  position: relative;
}
.uf-branch-line::after {
  content: ''; position: absolute; bottom: -1px; left: -4px;
  border: 5px solid transparent; border-top: 6px solid #C8C0B8;
}
/* Branches container */
.uf-branches {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}
/* Single branch */
.uf-branch {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  padding: 16px 8px 20px;
  background: var(--tag-bg);
  border-radius: var(--radius);
  position: relative;
}
.uf-branch-main {
  background: rgba(139,122,184,0.06);
  border: 1px solid rgba(139,122,184,0.15);
}
.uf-branch-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-secondary);
  margin-bottom: 12px;
}
/* Mood choices row */
.uf-choices {
  display: flex; gap: 6px; justify-content: center; flex-wrap: wrap;
}
.uf-choice {
  padding: 6px 10px; border-radius: 6px;
  background: rgba(139,122,184,0.12); font-size: 12px;
  font-weight: 500; color: #5A4D7A; text-align: center;
}
.uf-choice span { display: block; font-size: 10px; font-weight: 400; opacity: 0.7; }
/* Fork (two paths) */
.uf-fork {
  display: flex; gap: 12px; justify-content: center; width: 100%;
  margin: 4px 0;
}
.uf-fork-path {
  display: flex; flex-direction: column; align-items: center; flex: 1;
}
.uf-fork-label {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 4px; margin-bottom: 2px;
}
.uf-label-green { color: #4A8C45; background: rgba(117,170,123,0.12); }
.uf-label-grey { color: var(--text-secondary); background: rgba(0,0,0,0.04); }

/* ========================================
   FADE-IN ANIMATION
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ========================================
   RTL COMPARISON (full-width image)
   ======================================== */
.rtl-comparison {
  margin: 32px 0; border-radius: var(--radius); overflow: hidden;
}
.rtl-comparison img { width: 100%; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .hero { padding: 100px 20px 60px; }
  .hero-stats { gap: 32px; }
  .case-card { grid-template-columns: 1fr; }
  .case-card:nth-child(even) { direction: ltr; }
  .case-card-body { padding: 24px; }
  .case-img-grid { grid-template-columns: 1fr; }
  .case-img-grid > div { padding: 12px; }
  .hero-split { flex-direction: column; gap: 32px; }
  .hero-avatar img { width: 80px; height: 80px; }
  .case-hero-split { grid-template-columns: 1fr; gap: 32px; }
  .case-hero-media { display: flex; justify-content: center; }
  .case-hero-media .phone-mockup { width: 240px !important; }
  .case-section-split { grid-template-columns: 1fr; }
  .case-img-grid-3 { grid-template-columns: 1fr; }
  .case-img-full { padding: 16px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 280px; }
  section { padding: 60px 20px; }
  .case-hero { padding: 100px 20px 40px; }
  .case-section { padding: 40px 20px; }
  nav .nav-links { display: none; }
  nav .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 64px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 20px 32px; gap: 16px;
  }
  .menu-btn { display: block; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .stat-cards { grid-template-columns: 1fr; }
  .tone-grid { grid-template-columns: 1fr; }
  .ds-showcase { grid-template-columns: 1fr; }
  .before-after { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .dark-section { padding: 60px 0; margin: 32px 0; }
  .phone-mockup { width: 240px; }
  .scroll-gallery { gap: 16px; }
  .uf-branches { grid-template-columns: 1fr 1fr; gap: 12px; }
  .uf-node { min-width: 100px; font-size: 12px; padding: 10px 14px; }
}

@media (max-width: 480px) {
  .results-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .phone-mockup { width: 220px; }
  .uf-branches { grid-template-columns: 1fr; }
  .uf-row { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .uf-arrow { width: 24px; }
}
