/* ==========================================================================
   Design Tokens & CSS Variables
   ========================================================================== */
:root {
  --bg-cream: #FFF7EA;
  --ink: #1B1815;
  --text-muted: #57534E;
  --border-light: #DDD5C7;
  --border-footer: #EBE3D3;
  --amber: #F5A524;
  --amber-hover: #DC8409;
  --link-color: #B96C05;
  --mono-accent: #B08432;
  --font-body: 'Nunito', sans-serif;
  --font-heading: 'Quicksand', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-ar-body: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
  --font-ar-heading: 'Cairo', 'IBM Plex Sans Arabic', sans-serif;
}

/* ==========================================================================
   Arabic / RTL Typography
   ========================================================================== */
[lang="ar"] {
  --font-body: var(--font-ar-body);
  --font-heading: var(--font-ar-heading);
  --font-mono: var(--font-ar-body);
}

[lang="ar"] body {
  line-height: 1.75;
}

[lang="ar"] .brand-name,
[lang="ar"] .hero-badge,
[lang="ar"] .contact-label,
[lang="ar"] .page-updated,
[lang="ar"] .breadcrumbs {
  letter-spacing: 0;
  text-transform: none;
}

[dir="rtl"] .product-link:hover,
[dir="rtl"] .pawspoke-link:hover {
  transform: translateX(-2px);
}

[dir="rtl"] .brand,
[dir="rtl"] .product-header,
[dir="rtl"] .pawspoke-header {
  flex-direction: row;
}

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-cream);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

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

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

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

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 100px 0 110px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 700px;
}

.hero-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--link-color);
}

.hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(34px, 5.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 52ch;
  text-wrap: pretty;
}

/* ==========================================================================
   Language Switch
   ========================================================================== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
}

.lang-switch a,
.lang-switch span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 9999px;
}

.lang-switch a {
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.lang-switch a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.lang-switch [aria-current="true"] {
  color: var(--ink);
  font-weight: 500;
  background-color: #F5F1E8;
}

/* ==========================================================================
   Products Section
   ========================================================================== */
.products-section {
  padding: 20px 0 100px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.products-section h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.pawspoke-card,
.product-card {
  background-color: #FFFFFF;
  border-radius: 28px;
  padding: 48px;
  display: flex;
  gap: 48px;
  align-items: center;
  box-shadow: 0 1px 2px rgba(27, 24, 21, 0.06), 0 18px 40px -20px rgba(27, 24, 21, 0.18);
}

.pawspoke-info,
.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pawspoke-header,
.product-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pawspoke-icon,
.product-icon {
  flex-shrink: 0;
}

.pawspoke-name,
.product-name {
  font-family: var(--font-body);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.pawspoke-desc,
.product-desc {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 44ch;
}

.pawspoke-link,
.product-link {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s ease, color 0.15s ease;
}

.pawspoke-link:hover,
.product-link:hover {
  color: var(--link-color);
  transform: translateX(2px);
}

.screenshot-container {
  flex: 1;
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  background-color: var(--bg-cream);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 20px;
}

.next-up-card {
  border: 1px dashed var(--border-light);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.next-up-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background-color: #F5F1E8;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--mono-accent);
  font-family: var(--font-mono);
}

.next-up-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.next-up-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-muted);
}

.next-up-desc {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #8A8175;
}

/* ==========================================================================
   Services & Pricing
   ========================================================================== */
.services-section {
  padding: 20px 0 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.services-heading,
.section-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.section-intro {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 62ch;
  text-wrap: pretty;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.service-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 22px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(27, 24, 21, 0.28);
}

.service-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

.service-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  flex: 1;
}

.service-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--link-color);
  border-top: 1px dashed var(--border-light);
  padding-top: 14px;
}

.services-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8A8175;
  margin-top: 4px;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  overflow: hidden;
  margin-top: 16px;
}

.pricing-table th,
.pricing-table td {
  text-align: start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14.5px;
}

.pricing-table th {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--ink);
  background-color: #F5F1E8;
}

.pricing-table td:last-child {
  font-family: var(--font-mono);
  color: var(--link-color);
  white-space: nowrap;
}

.pricing-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Portfolio / Work Grid
   ========================================================================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.work-card {
  background-color: #FFFFFF;
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 2px rgba(27, 24, 21, 0.06), 0 18px 40px -20px rgba(27, 24, 21, 0.18);
}

/* ==========================================================================
   Page Hero (inner pages)
   ========================================================================== */
.page-hero {
  padding: 72px 0 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 780px;
}

.page-hero .hero-badge {
  margin-bottom: 2px;
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(30px, 4.5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.page-hero p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 62ch;
  text-wrap: pretty;
}

.page-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8A8175;
}

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8A8175;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--ink);
}

/* ==========================================================================
   Legal / Policy Content
   ========================================================================== */
.legal-content {
  max-width: 760px;
  padding: 12px 0 100px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legal-content h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink);
  margin-top: 22px;
  letter-spacing: -0.01em;
}

.legal-content h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16.5px;
  color: var(--ink);
  margin-top: 10px;
}

.legal-content p,
.legal-content li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-muted);
}

.legal-content ul,
.legal-content ol {
  padding-inline-start: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-content a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-callout {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-inline-start: 4px solid var(--amber);
  border-radius: 14px;
  padding: 20px 24px;
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ==========================================================================
   Contact Page
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 8px;
}

.contact-item {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link-color);
}

.contact-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
}

.contact-value a {
  color: var(--ink);
}

.contact-value a:hover {
  color: var(--link-color);
}

.contact-sub {
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Forms (mailto fallback, no backend required)
   ========================================================================== */
.contact-form {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 22px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background-color: var(--bg-cream);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
}

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

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

.contact-card .contact-value,
.contact-card .contact-value a {
  color: var(--bg-cream);
}

.contact-card .contact-sub {
  color: #C9C0B0;
}

.contact-invert,
.contact-card .contact-invert {
  color: var(--bg-cream);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-invert:hover,
.contact-card .contact-invert:hover {
  color: var(--amber);
}

.work-case-study {
  margin-top: 22px;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-section {
  padding: 20px 0 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 700px;
}

.about-section h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.about-section p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-section {
  padding: 20px 0 110px;
}

.contact-card {
  background-color: var(--ink);
  border-radius: 28px;
  padding: 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.contact-card h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 28px;
  color: var(--bg-cream);
  letter-spacing: -0.01em;
  max-width: 22ch;
}

.btn-amber {
  background-color: var(--amber);
  color: var(--ink);
  padding: 14px 26px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 800;
  margin-top: 6px;
  display: inline-block;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-amber:hover {
  background-color: var(--amber-hover);
  color: var(--ink);
  transform: translateY(-1px);
}

/* ==========================================================================
   Stats / Value props
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 6px;
}

.stat-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 30px;
  color: var(--ink);
}

.stat-label {
  font-size: 13.5px;
  color: var(--text-muted);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.btn-dark {
  background-color: var(--ink);
  color: var(--bg-cream);
  padding: 14px 26px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 800;
  display: inline-block;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-dark:hover {
  background-color: #000000;
  color: var(--bg-cream);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 12.5px 24px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 800;
  display: inline-block;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-outline:hover {
  background-color: var(--ink);
  color: var(--bg-cream);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-footer);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-container .brand-name {
  font-size: 14px;
}

.footer-nav {
  display: flex;
  gap: 26px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13.5px;
  font-weight: 700;
  color: #78716C;
  transition: color 0.15s ease;
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-copyright {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8A8175;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .services-section,
  .page-hero {
    padding: 20px 0 60px;
  }

  .services-grid,
  .work-grid,
  .contact-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .legal-content {
    padding-bottom: 60px;
  }

  .contact-form {
    padding: 24px;
  }

  .pricing-table {
    display: block;
    overflow-x: auto;
  }

  .hero {
    padding: 60px 0 70px;
    gap: 20px;
  }

  .pawspoke-card,
  .product-card {
    flex-direction: column;
    align-items: stretch;
    padding: 28px;
    gap: 32px;
  }

  .pawspoke-info,
  .product-info {
    width: 100%;
  }

  .screenshot-container {
    width: 100%;
  }

  .products-section {
    padding: 20px 0 60px;
  }

  .about-section {
    padding: 20px 0 60px;
  }

  .contact-section {
    padding: 20px 0 70px;
  }

  .contact-card {
    padding: 40px 28px;
  }

  .footer-container {
    padding: 28px 24px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .site-header {
    padding: 20px 0;
  }

  .site-nav {
    gap: 20px;
  }

  .site-header {
    row-gap: 10px;
  }

  .next-up-card {
    padding: 24px;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 20px;
  }

  .footer-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 20px;
  }
}
