/* ==========================================================================
   nomemoo - Modern Warm Design
   Inspired by Squid Club aesthetics, adapted for light theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Theme Variables)
   -------------------------------------------------------------------------- */
:root {
  /* Colors - Warm light palette with improved contrast */
  --color-text: #1a1816;          /* Slightly warmer black */
  --color-text-soft: #3d3833;     /* Darker for better contrast */
  --color-text-muted: #6b645c;    /* Darker for WCAG compliance */

  /* Primary accent - Warm Terracotta (refined) */
  --color-accent: #a86d52;        /* Slightly deeper for contrast */
  --color-accent-hover: #8f5940;
  --color-accent-soft: rgba(168, 109, 82, 0.1);
  --color-accent-glow: rgba(168, 109, 82, 0.2);

  /* Secondary accent - Warm Sage (new) */
  --color-secondary: #7a8a72;     /* Muted sage green */
  --color-secondary-hover: #68776a;
  --color-secondary-soft: rgba(122, 138, 114, 0.1);
  --color-secondary-glow: rgba(122, 138, 114, 0.18);

  /* Terracotta palette extensions */
  --color-clay: #7d4e35;          /* Deeper clay */
  --color-clay-soft: rgba(125, 78, 53, 0.1);
  --color-clay-glow: rgba(125, 78, 53, 0.16);

  --color-sand: #c99a64;          /* Richer sand */
  --color-sand-soft: rgba(201, 154, 100, 0.08);
  --color-sand-glow: rgba(201, 154, 100, 0.14);

  --color-stone: #8a7968;         /* Warmer stone */
  --color-stone-soft: rgba(138, 121, 104, 0.08);

  /* Legacy colors mapped to new palette for compatibility */
  --color-purple: #7d4e35;
  --color-purple-soft: rgba(125, 78, 53, 0.1);
  --color-purple-glow: rgba(125, 78, 53, 0.16);

  --color-orange: #c99a64;
  --color-orange-soft: rgba(201, 154, 100, 0.1);
  --color-orange-glow: rgba(201, 154, 100, 0.16);

  --color-pink: #8a7968;
  --color-pink-soft: rgba(138, 121, 104, 0.1);

  --color-blue: #a86d52;
  --color-blue-soft: rgba(168, 109, 82, 0.1);

  /* Warm backgrounds - refined */
  --color-bg: #f9f6f2;            /* Slightly lighter */
  --color-surface: #ffffff;        /* Pure white for cards */
  --color-surface-warm: #f4f0ea;   /* Warmer hover state */
  --color-surface-hover: #faf8f5;
  --color-border: #ddd7ce;         /* Warmer border */
  --color-border-soft: #ebe5dc;

  /* Typography - expanded scale for more impact */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Font sizes - refined scale with better progression */
  --text-xs: 0.8125rem;    /* 13px */
  --text-sm: 0.9375rem;    /* 15px */
  --text-base: 1.0625rem;  /* 17px */
  --text-lg: 1.1875rem;    /* 19px */
  --text-xl: 1.375rem;     /* 22px */
  --text-2xl: 1.75rem;     /* 28px */
  --text-3xl: 2.375rem;    /* 38px - increased */
  --text-4xl: 3.25rem;     /* 52px - increased */
  --text-5xl: 4rem;        /* 64px - increased */

  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line heights - improved for readability */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.35;
  --leading-normal: 1.7;   /* Increased from 1.65 */
  --leading-relaxed: 1.85; /* Increased from 1.8 */
  --leading-loose: 2;

  /* Spacing - generous for breathing room */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout - optimal reading width */
  --max-width: 780px;       /* Reduced for better readability */
  --max-width-wide: 1000px;
  --content-width: 680px;   /* Ideal line length for reading */

  /* Effects - softer, more refined */
  --shadow-sm: 0 1px 2px rgba(26, 25, 22, 0.04), 0 1px 3px rgba(26, 25, 22, 0.06);
  --shadow-md: 0 4px 6px rgba(26, 25, 22, 0.04), 0 10px 20px rgba(26, 25, 22, 0.06);
  --shadow-lg: 0 10px 25px rgba(26, 25, 22, 0.06), 0 20px 48px rgba(26, 25, 22, 0.08);
  --shadow-glow: 0 0 0 3px var(--color-accent-glow);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --transition-fast: 0.15s ease;
  --transition: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* --------------------------------------------------------------------------
   Base & Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  /* Offset for sticky header when scrolling to anchors */
  scroll-padding-top: 80px;
  /* Prevent horizontal scroll from decorative elements */
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-bg);
  /* Subtle grainy texture - paper-like warmth */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-blend-mode: overlay;
  margin: 0;
  padding: 0;
  /* Prevent horizontal scroll from decorative elements */
  overflow-x: hidden;
}

/* Page load animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body > main {
  animation: fadeInUp 0.6s ease-out;
}

/* --------------------------------------------------------------------------
   Typography - Warm, grounded, readable
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin-top: var(--space-16);
  margin-bottom: var(--space-8);
  font-weight: var(--font-bold);
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-4xl);
  margin-top: 0;
  margin-bottom: var(--space-6);
  font-weight: var(--font-extrabold);
  letter-spacing: -0.03em;
}

/* Hero headline - extra large with warmth */
main > h1:first-child {
  font-size: var(--text-5xl);
  line-height: 1.08;
  margin-bottom: var(--space-8);
  font-weight: var(--font-extrabold);
}

h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  margin-top: var(--space-24);
  margin-bottom: var(--space-8);
  display: inline-block;
  position: relative;
  font-weight: var(--font-bold);
}

/* Warm underline accent on section headings */
main > h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-sand));
}

.rtl-interface main > h2::after {
  left: auto;
  right: 0;
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  letter-spacing: -0.015em;
  color: var(--color-text);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  letter-spacing: -0.01em;
  color: var(--color-text-soft);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

p {
  margin: 0 0 var(--space-6);
  line-height: var(--leading-normal);
}

/* Lead paragraph - first paragraph after h1 */
.lead, main > h1:first-child + p, main > h1:first-child + p + p {
  font-size: var(--text-lg);
  color: var(--color-text-soft);
  line-height: var(--leading-relaxed);
  max-width: 640px;
}

/* Bold text */
strong {
  font-weight: var(--font-semibold);
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   Links - with smooth animations
   -------------------------------------------------------------------------- */
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
}

a:active {
  opacity: 0.8;
}

/* Underline style for content links */
main p a, main li a {
  text-decoration: underline;
  text-decoration-color: var(--color-accent-soft);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: all var(--transition-fast);
}

main p a:hover, main li a:hover {
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
}

/* Arrow links with animation */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: gap var(--transition-fast);
}

.link-arrow::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.link-arrow:hover {
  gap: var(--space-3);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Background Presence - Gradient washes and organic shapes
   -------------------------------------------------------------------------- */

/* Organic blob decorator - positioned behind content */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  right: -5%;
  width: 70%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(212, 165, 116, 0.25) 0%, rgba(212, 165, 116, 0.08) 40%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  left: -10%;
  width: 60%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(176, 125, 98, 0.2) 0%, rgba(176, 125, 98, 0.06) 40%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  filter: blur(50px);
}

/* Main content area - warm glow from top */
main::before {
  content: '';
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  max-width: 1400px;
  height: 500px;
  background: linear-gradient(
    180deg,
    rgba(212, 165, 116, 0.15) 0%,
    rgba(176, 125, 98, 0.05) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: -1;
}

/* Additional decorative element - mid-page accent */
main::after {
  content: '';
  position: absolute;
  top: 60%;
  right: -20%;
  width: 50%;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(139, 90, 60, 0.12) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  filter: blur(30px);
}

/* Service section gradient wash */
.services-grid {
  position: relative;
}

.services-grid::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -150px;
  right: -150px;
  bottom: -60px;
  background: linear-gradient(
    135deg,
    rgba(176, 125, 98, 0.1) 0%,
    rgba(212, 165, 116, 0.06) 50%,
    rgba(139, 90, 60, 0.08) 100%
  );
  pointer-events: none;
  z-index: -1;
  border-radius: var(--radius-xl);
}

/* --------------------------------------------------------------------------
   Layout - More breathing room
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

header, main, footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

header {
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Header scroll effect - subtle shadow when scrolled */
header.scrolled {
  border-bottom-color: var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}

main {
  padding-top: var(--space-20);
  padding-bottom: var(--space-32);
  position: relative;
}

footer {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
  border-top: 1px solid var(--color-border-soft);
  margin-top: var(--space-8);
}

/* Section dividers - warm gradient */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
  margin: var(--space-24) 0;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Logo/Brand - bolder with clear separation */
.nav-brand {
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-right: var(--space-8);
  text-decoration: none;
  letter-spacing: -0.03em;
  transition: color var(--transition-fast);
  padding-right: var(--space-6);
  border-right: 1px solid var(--color-border-soft);
}

.nav-brand:hover {
  color: var(--color-accent);
}

/* Nav links container */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

/* Individual nav links */
.nav-link {
  color: var(--color-text-soft);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-text);
  background: var(--color-surface-warm);
}

/* Language toggle */
.language-toggle {
  margin-left: var(--space-4);
  padding-left: var(--space-4);
  border-left: 1px solid var(--color-border);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-warm);
}

/* Mobile navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-2);
  cursor: pointer;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.nav-toggle:hover {
  background: var(--color-surface-warm);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 700px) {
  .nav-toggle {
    display: block;
  }

  /* Remove brand separator on mobile */
  .nav-brand {
    border-right: none;
    padding-right: 0;
    margin-right: auto;
  }

  .rtl-interface .nav-brand {
    border-left: none;
    padding-left: 0;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-2);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-base);
  }

  header {
    position: relative;
  }

  .language-toggle {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: var(--space-4);
    margin-top: var(--space-3);
    border-top: 1px solid var(--color-border-soft);
    width: 100%;
  }

  header, main, footer {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }

  main > h1:first-child {
    font-size: var(--text-3xl);
  }
}

/* --------------------------------------------------------------------------
   Hero Section - Impactful landing with clear hierarchy
   -------------------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: var(--space-16) 0 var(--space-20);
  position: relative;
  margin-bottom: var(--space-8);
}

/* Decorative gradient background for hero */
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  max-width: 1200px;
  height: 120%;
  background: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    rgba(168, 109, 82, 0.12) 0%,
    rgba(201, 154, 100, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 var(--space-6);
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-clay) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--color-accent);
  margin: 0 0 var(--space-6);
  letter-spacing: -0.01em;
}

.hero-description {
  font-size: var(--text-lg);
  color: var(--color-text-soft);
  line-height: var(--leading-relaxed);
  max-width: 580px;
  margin: 0 auto var(--space-10);
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  background: var(--color-accent);
  color: var(--color-surface);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.cta-primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cta-primary:active {
  transform: translateY(0);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  background: transparent;
  color: var(--color-text-soft);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.cta-secondary:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* Mobile hero adjustments */
@media (max-width: 700px) {
  .hero {
    padding: var(--space-10) 0 var(--space-14);
    text-align: center;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-tagline {
    font-size: var(--text-xl);
  }

  .hero-description {
    font-size: var(--text-base);
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .cta-primary,
  .cta-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* RTL hero adjustments */
.rtl-interface .hero {
  text-align: center;
}

/* --------------------------------------------------------------------------
   Service Cards - Modern with subtle depth
   -------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin: var(--space-14) 0 var(--space-16);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-xl);
  padding: var(--space-10) var(--space-8);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  box-shadow: var(--shadow-sm);
}

/* Colored top accent bar - thinner and more refined */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-color, var(--color-accent));
  transition: height var(--transition-fast);
}

/* Gradient background on hover */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(160deg, var(--card-color-soft, var(--color-accent-soft)) 0%, transparent 40%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  z-index: 0;
}

.service-card:hover {
  border-color: var(--card-color, var(--color-accent));
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card:hover::before {
  height: 4px;
}

.service-card:hover::after {
  opacity: 1;
}

/* Different colors for each card */
.service-card:nth-child(1) {
  --card-color: var(--color-accent);
  --card-color-soft: var(--color-accent-soft);
  --card-color-glow: var(--color-accent-glow);
}

.service-card:nth-child(2) {
  --card-color: var(--color-purple);
  --card-color-soft: var(--color-purple-soft);
  --card-color-glow: var(--color-purple-glow);
}

.service-card:nth-child(3) {
  --card-color: var(--color-orange);
  --card-color-soft: var(--color-orange-soft);
  --card-color-glow: var(--color-orange-glow);
}

.service-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-4);
  font-size: var(--text-xl);
  position: relative;
  z-index: 1;
  color: var(--card-color, var(--color-text));
}

.service-card p {
  color: var(--color-text-soft);
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
  position: relative;
  z-index: 1;
}

/* Card content grows to push button down */
.service-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-card .card-content h3 {
  margin-top: 0;
}

.service-card .card-content p:last-child {
  margin-bottom: 0;
}

.service-card p:last-of-type {
  margin-bottom: 0;
}

/* Service card CTA button - anchored at bottom */
.service-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding: var(--space-3) var(--space-6);
  background: var(--card-color, var(--color-text));
  color: var(--color-surface);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
  z-index: 1;
  align-self: flex-start;
}

.service-cta::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.service-cta:hover {
  filter: brightness(1.1);
  color: var(--color-surface);
  transform: translateX(2px);
}

.service-cta:hover::after {
  transform: translateX(4px);
}

/* RTL adjustment for CTA arrow */
.rtl-interface .service-cta::after {
  content: '←';
}

.rtl-interface .service-cta:hover {
  transform: translateX(-2px);
}

.rtl-interface .service-cta:hover::after {
  transform: translateX(-4px);
}

.rtl-interface .service-cta {
  align-self: flex-end;
}

/* --------------------------------------------------------------------------
   Section Headings - Clear hierarchy above interactive content
   -------------------------------------------------------------------------- */
/* Section headings that precede post lists need extra bottom margin */
h2 + p + .post-list,
h2 + .post-list {
  margin-top: var(--space-10);
}

/* Section intro text styling */
h2 + p {
  color: var(--color-text-soft);
  font-size: var(--text-base);
  margin-bottom: var(--space-6);
}

/* --------------------------------------------------------------------------
   Post/Article Entries - With color accents
   -------------------------------------------------------------------------- */
.post-list {
  margin: var(--space-10) 0 var(--space-12);
  /* Visual container to distinguish from section headings */
  padding: var(--space-6) var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}

.post-entry {
  padding: var(--space-5) var(--space-5);
  margin: 0;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  border-left: 3px solid transparent;
  /* Clean background within container */
  background: transparent;
  cursor: pointer;
}

.post-entry:hover {
  background: var(--color-surface-warm);
  border-left-color: var(--color-accent);
  transform: translateX(4px);
}

/* RTL hover transform */
.rtl-interface .post-entry:hover {
  transform: translateX(-4px);
}

/* Alternate colors for variety */
.post-entry:nth-child(2):hover {
  border-left-color: var(--color-purple);
}

.post-entry:nth-child(3):hover {
  border-left-color: var(--color-orange);
}

.post-entry + .post-entry {
  margin-top: var(--space-2);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border-soft);
}

.post-entry h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.post-entry h3 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.post-entry h3 a:hover {
  color: var(--color-accent);
}

.post-entry:nth-child(2) h3 a:hover {
  color: var(--color-purple);
}

.post-entry:nth-child(3) h3 a:hover {
  color: var(--color-orange);
}

.post-summary {
  color: var(--color-text-soft);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  margin: 0 0 var(--space-3);
}

.post-meta {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.project-status {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Contact Section - Warm terracotta gradient with modern feel
   -------------------------------------------------------------------------- */
.contact-section {
  background: linear-gradient(145deg, var(--color-accent-soft) 0%, var(--color-clay-soft) 60%, var(--color-sand-soft) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-14) var(--space-12);
  margin: var(--space-16) 0;
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}

.contact-section h2 {
  margin-top: 0;
  margin-bottom: var(--space-6);
}

.contact-section h2::after {
  display: none;
}

.contact-section p {
  margin-bottom: var(--space-4);
}

.contact-section p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Footer - Cleaner
   -------------------------------------------------------------------------- */
footer {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

footer p {
  margin: 0;
}

footer a {
  color: var(--color-text-soft);
  transition: color var(--transition-fast);
}

footer a:hover {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   Language Switch (bottom of page)
   -------------------------------------------------------------------------- */
.language-switch {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border-soft);
}

.language-switch a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text-soft);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.language-switch a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
  box-shadow: var(--shadow-glow);
}

/* --------------------------------------------------------------------------
   RTL Support (Hebrew)
   -------------------------------------------------------------------------- */
.rtl-interface {
  direction: rtl;
}

.rtl-interface header nav {
  flex-direction: row-reverse;
}

.rtl-interface .nav-brand {
  margin-right: 0;
  margin-left: var(--space-8);
  padding-right: 0;
  padding-left: var(--space-6);
  border-right: none;
  border-left: 1px solid var(--color-border-soft);
}

.rtl-interface .nav-links {
  flex-direction: row-reverse;
}

.rtl-interface .language-toggle {
  margin-left: 0;
  margin-right: var(--space-4);
  padding-left: 0;
  padding-right: var(--space-4);
  border-left: none;
  border-right: 1px solid var(--color-border);
}

.rtl-interface main {
  text-align: right;
}

.rtl-interface .post-entry h3,
.rtl-interface .service-card h3 {
  text-align: right;
}

.rtl-interface .link-arrow::after {
  content: '←';
}

.rtl-interface .link-arrow:hover::after {
  transform: translateX(-4px);
}

@media (max-width: 700px) {
  .rtl-interface .nav-links {
    flex-direction: column;
    align-items: stretch;
    text-align: right;
  }

  .rtl-interface .language-toggle {
    border-right: none;
    padding-right: 0;
  }
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Fade in animation for sections */
.fade-in {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* --------------------------------------------------------------------------
   Enhanced Animations - Subtle and performant
   -------------------------------------------------------------------------- */

/* Staggered card animation on page load */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply to service cards with stagger */
.service-card {
  animation: slideInUp 0.5s ease-out backwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }

/* Post entries subtle slide */
.post-entry {
  animation: slideInUp 0.4s ease-out backwards;
}

.post-entry:nth-child(1) { animation-delay: 0.05s; }
.post-entry:nth-child(2) { animation-delay: 0.1s; }
.post-entry:nth-child(3) { animation-delay: 0.15s; }

/* Button press effect */
.service-cta:active,
.lang-btn:active,
.nav-link:active {
  transform: scale(0.97);
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible,
.service-cta:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  body > main {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Tags - Colored tag system for blog posts
   -------------------------------------------------------------------------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: var(--transition-fast);
}

.tag:hover {
  transform: translateY(-1px);
}

/* Tag colors by topic */
.tag-finance {
  background: var(--color-sand-soft);
  color: var(--color-clay);
}

.tag-finance:hover {
  background: var(--color-sand-glow);
}

.tag-learning,
.tag-writing,
.tag-meta {
  background: var(--color-secondary-soft);
  color: var(--color-secondary);
}

.tag-learning:hover,
.tag-writing:hover,
.tag-meta:hover {
  background: var(--color-secondary-glow);
}

.tag-tech,
.tag-claude-code,
.tag-ai-development,
.tag-automation,
.tag-meta-programming {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.tag-tech:hover,
.tag-claude-code:hover,
.tag-ai-development:hover,
.tag-automation:hover,
.tag-meta-programming:hover {
  background: var(--color-accent-glow);
}

.tag-systems,
.tag-mental-models,
.tag-workflow {
  background: var(--color-stone-soft);
  color: var(--color-stone);
}

.tag-systems:hover,
.tag-mental-models:hover,
.tag-workflow:hover {
  background: rgba(138, 121, 104, 0.15);
}

/* Default tag style for unmatched tags */
.tag-default {
  background: var(--color-surface-warm);
  color: var(--color-text-soft);
}

.tag-default:hover {
  background: var(--color-border-soft);
}

/* Tags page specific styles */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.tags-list .tag {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
}

.tag-section {
  margin-bottom: var(--space-8);
}

.tag-section h2 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.tag-section h2 .tag {
  font-size: var(--text-sm);
}

/* RTL support for tags */
.rtl-interface .tags {
  direction: rtl;
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  header nav, .language-switch, .nav-toggle {
    display: none;
  }

  main {
    max-width: 100%;
    padding: 0;
    animation: none;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .service-card {
    break-inside: avoid;
    border: 1px solid #ccc;
    box-shadow: none;
    transform: none;
  }

  .service-card::before {
    display: none;
  }
}
