/*
Theme Name: Madak
Theme URI: https://madak.app/
Author: Madak
Author URI: https://madak.app/
Description: قالب مداك الرسمي — استثمار عقاري كسري، عربي أولاً (RTL)، بهوية بصرية مؤسسية مستوحاة من تداول وغولدمان ساكس. يطابق تصميم madak.app بالكامل.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: Proprietary
Text Domain: madak
Tags: rtl-language-support, custom-colors, custom-menu, featured-images, full-width-template, threaded-comments, translation-ready
*/

/* ==========================================================================
   MADAK — Design System (mirrors src/index.css)
   ========================================================================== */

:root {
  /* Brand — Navy */
  --m-navy: 210 100% 20%;
  --m-navy-deep: 211 100% 11%;
  --m-navy-darker: 213 100% 7%;
  --m-navy-light: 211 85% 27%;

  /* Brand — Teal */
  --m-teal: 172 60% 37%;
  --m-teal-deep: 172 59% 30%;
  --m-teal-light: 172 49% 47%;

  /* Brand — Coral (CTA only) */
  --m-coral: 9 76% 57%;
  --m-coral-deep: 9 62% 50%;

  /* Brand — Yellow / Gold */
  --m-yellow: 38 78% 57%;
  --m-gold: 40 55% 62%;

  /* Neutrals */
  --m-black: 220 20% 4%;
  --m-white: 0 0% 100%;
  --m-cream: 44 33% 97%;
  --m-bone: 40 25% 94%;
  --m-gray-50: 60 9% 95%;
  --m-gray-100: 45 12% 89%;
  --m-gray-200: 50 8% 80%;
  --m-gray-400: 45 5% 56%;
  --m-gray-600: 220 8% 32%;
  --m-gray-800: 220 12% 14%;

  /* Shadows */
  --shadow-xs: 0 1px 2px hsl(var(--m-navy) / 0.04);
  --shadow-sm: 0 2px 4px hsl(var(--m-navy) / 0.04), 0 1px 2px hsl(var(--m-navy) / 0.03);
  --shadow-md: 0 8px 24px -8px hsl(var(--m-navy) / 0.10), 0 2px 6px hsl(var(--m-navy) / 0.04);
  --shadow-lg: 0 24px 56px -12px hsl(var(--m-navy) / 0.18), 0 6px 16px hsl(var(--m-navy) / 0.06);

  /* Motion */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  /* Type scale */
  --text-display: clamp(3.75rem, 7.5vw, 7.5rem);
  --text-h1: clamp(2.75rem, 5vw, 4.5rem);
  --text-h2: clamp(2.25rem, 3.6vw, 3.25rem);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  font-feature-settings: "tnum" on, "lnum" on, "ss01" on, "cv11" on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: hsl(var(--m-black));
  background: hsl(var(--m-cream));
  text-rendering: optimizeLegibility;
  letter-spacing: 0;
  direction: rtl;
}

/* No negative tracking on Arabic */
html[dir="rtl"] *:not([dir="ltr"]):not(.latin):not(.latin *) {
  letter-spacing: 0 !important;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color 300ms var(--ease-expo); }

button { font-family: inherit; cursor: pointer; border: 0; background: transparent; }

input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.25;
  color: hsl(var(--m-navy));
}

p { line-height: 1.7; color: hsl(var(--m-gray-600)); }

::selection { background: hsl(var(--m-navy)); color: hsl(var(--m-white)); }

:focus-visible {
  outline: 2px solid hsl(var(--m-navy));
  outline-offset: 3px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: hsl(var(--m-cream)); }
::-webkit-scrollbar-thumb { background: hsl(var(--m-navy) / 0.15); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: hsl(var(--m-navy) / 0.3); }

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  margin-inline: auto;
  padding-inline: 1.25rem;
  max-width: 1280px;
}
@media (min-width: 768px) { .container { padding-inline: 2rem; } }
@media (min-width: 1280px) { .container { padding-inline: 3rem; } }

.section { padding: 5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }
@media (min-width: 1024px) { .section { padding: 8rem 0; } }

.section-cream { background: hsl(var(--m-cream)); }
.section-white { background: hsl(var(--m-white)); }
.section-bone { background: hsl(var(--m-bone)); }
.section-navy { background: hsl(var(--m-navy-deep)); color: hsl(var(--m-white)); }
.section-navy h1, .section-navy h2, .section-navy h3 { color: hsl(var(--m-white)); }

/* ==========================================================================
   Type utilities
   ========================================================================== */

.text-display { font-size: var(--text-display); line-height: 1.15; font-weight: 600; color: hsl(var(--m-navy)); }
.text-h1 { font-size: var(--text-h1); line-height: 1.2; font-weight: 600; }
.text-h2 { font-size: var(--text-h2); line-height: 1.25; font-weight: 600; }
.text-h3 { font-size: 1.625rem; line-height: 1.3; font-weight: 600; }

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: hsl(var(--m-teal));
  letter-spacing: 0.15em !important;
  margin-bottom: 1rem;
  display: inline-block;
}

.lead { font-size: 1.25rem; line-height: 1.6; color: hsl(var(--m-gray-600)); max-width: 42rem; }

.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" on; }

.text-navy { color: hsl(var(--m-navy)); }
.text-teal { color: hsl(var(--m-teal)); }
.text-coral { color: hsl(var(--m-coral)); }
.text-muted { color: hsl(var(--m-gray-600)); }
.text-white { color: hsl(var(--m-white)); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 400ms var(--ease-expo);
  white-space: nowrap;
  line-height: 1;
}

.btn-cta {
  background: hsl(var(--m-coral));
  color: hsl(var(--m-white));
  box-shadow: var(--shadow-md);
}
.btn-cta:hover {
  background: hsl(var(--m-coral-deep));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary {
  background: hsl(var(--m-navy));
  color: hsl(var(--m-white));
}
.btn-primary:hover { background: hsl(var(--m-navy-light)); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: hsl(var(--m-navy));
  border: 1px solid hsl(var(--m-navy) / 0.2);
}
.btn-outline:hover { border-color: hsl(var(--m-navy)); background: hsl(var(--m-navy) / 0.04); }

.btn-ghost-white {
  background: transparent;
  color: hsl(var(--m-white));
  border: 1px solid hsl(var(--m-white) / 0.2);
}
.btn-ghost-white:hover { background: hsl(var(--m-white) / 0.08); border-color: hsl(var(--m-white) / 0.4); }

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  transition: all 500ms var(--ease-expo);
  background: transparent;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: hsl(var(--m-cream) / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: hsl(var(--m-gray-100));
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.brand { display: flex; flex-direction: column; line-height: 1; }
.brand-ar { color: hsl(var(--m-navy)); font-weight: 700; font-size: 1.5rem; }
.brand-en { color: hsl(var(--m-gray-400)); font-weight: 500; font-size: 0.625rem; letter-spacing: 0.2em !important; margin-top: 0.125rem; }

.main-nav { display: none; align-items: center; gap: 2.25rem; }
@media (min-width: 1024px) { .main-nav { display: flex; } }
.main-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--m-gray-600));
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a {
  color: hsl(var(--m-navy));
}

.header-cta { display: none; align-items: center; gap: 0.75rem; }
@media (min-width: 1024px) { .header-cta { display: flex; } }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; font-weight: 500; color: hsl(var(--m-gray-600));
  padding: 0.375rem 0.5rem;
}
.lang-toggle:hover { color: hsl(var(--m-navy)); }
.header-divider { width: 1px; height: 1.5rem; background: hsl(var(--m-gray-100)); }

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem;
  color: hsl(var(--m-navy));
}
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.mobile-menu {
  position: fixed;
  inset-inline: 0;
  top: 5rem;
  bottom: 0;
  background: hsl(var(--m-cream));
  opacity: 0; visibility: hidden;
  pointer-events: none;
  transition: all 500ms var(--ease-expo);
  z-index: 49;
  padding: 2.5rem 0;
  overflow-y: auto;
}
.mobile-menu.open { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-size: 1.5rem;
  font-weight: 500;
  color: hsl(var(--m-navy));
  padding: 0.875rem 0;
  border-bottom: 1px solid hsl(var(--m-gray-100));
}

/* ==========================================================================
   Page Hero (subpages)
   ========================================================================== */

.page-hero {
  position: relative;
  background: linear-gradient(180deg, hsl(var(--m-navy-deep)) 0%, hsl(var(--m-navy)) 100%);
  color: hsl(var(--m-white));
  padding: 11rem 0 6rem;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, hsl(var(--m-teal) / 0.15), transparent 60%);
  pointer-events: none;
}
.page-hero .eyebrow { color: hsl(var(--m-teal-light)); }
.page-hero h1 { color: hsl(var(--m-white)); margin-top: 0.75rem; max-width: 48rem; }
.page-hero p { color: hsl(var(--m-white) / 0.8); margin-top: 1.5rem; max-width: 42rem; font-size: 1.125rem; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: hsl(var(--m-navy-deep));
  color: hsl(var(--m-white));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 5rem 0;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }

.footer-brand-ar { color: hsl(var(--m-white)); font-weight: 700; font-size: 1.875rem; }
.footer-brand-en { color: hsl(var(--m-white) / 0.4); font-weight: 500; font-size: 0.6875rem; letter-spacing: 0.2em !important; margin-top: 0.25rem; }
.footer-tagline { font-size: 1.25rem; font-weight: 300; color: hsl(var(--m-white) / 0.9); line-height: 1.4; margin-top: 1.5rem; }
.footer-desc { font-size: 0.875rem; color: hsl(var(--m-white) / 0.6); line-height: 1.7; margin-top: 0.75rem; max-width: 18rem; }

.footer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em !important;
  text-transform: uppercase;
  color: hsl(var(--m-teal-light));
  margin-bottom: 1.25rem;
}
.footer-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-list a { font-size: 0.875rem; color: hsl(var(--m-white) / 0.8); }
.footer-list a:hover { color: hsl(var(--m-white)); }

.footer-contact { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.footer-contact a {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.875rem; color: hsl(var(--m-white) / 0.9);
}
.footer-contact .icon { color: hsl(var(--m-teal-light)); width: 1rem; height: 1rem; flex-shrink: 0; }

.footer-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid hsl(var(--m-white) / 0.15);
  font-size: 0.6875rem;
  color: hsl(var(--m-white) / 0.7);
  margin-top: 2rem;
}
.footer-badge .dot { width: 0.375rem; height: 0.375rem; border-radius: 9999px; background: hsl(var(--m-teal-light)); }

.social-links { display: flex; gap: 0.5rem; margin-top: 2rem; }
.social-links a {
  width: 2.25rem; height: 2.25rem;
  border-radius: 0.375rem;
  border: 1px solid hsl(var(--m-white) / 0.15);
  display: inline-flex; align-items: center; justify-content: center;
  color: hsl(var(--m-white) / 0.7);
  transition: all 300ms var(--ease-expo);
}
.social-links a:hover { color: hsl(var(--m-white)); border-color: hsl(var(--m-white) / 0.4); }

.footer-bottom {
  border-top: 1px solid hsl(var(--m-white) / 0.1);
  padding: 1.5rem 0;
  font-size: 0.75rem;
  color: hsl(var(--m-white) / 0.5);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: hsl(var(--m-white));
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid hsl(var(--m-gray-100));
  transition: all 700ms var(--ease-expo);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: hsl(var(--m-navy) / 0.12);
}
.card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.card p { font-size: 0.9375rem; }

.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-2, .grid-3, .grid-4 { gap: 2rem; }
}

/* Stat numbers */
.stat-num {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 600;
  color: hsl(var(--m-navy));
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1;
}
.stat-label { font-size: 0.875rem; color: hsl(var(--m-gray-600)); margin-top: 0.5rem; }

/* Hairline divider */
.hairline {
  height: 1px;
  background: linear-gradient(to left, transparent, hsl(var(--m-gold) / 0.4), transparent);
  width: 100%;
}

/* ==========================================================================
   WordPress core: Posts / Single / Blog
   ========================================================================== */

.main-content { padding-top: 5rem; min-height: 60vh; }

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 768px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  background: hsl(var(--m-white));
  border-radius: 1rem;
  border: 1px solid hsl(var(--m-gray-100));
  overflow: hidden;
  transition: all 700ms var(--ease-expo);
  display: flex; flex-direction: column;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.post-card-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: hsl(var(--m-bone));
}
.post-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1400ms var(--ease-expo);
}
.post-card:hover .post-card-thumb img { transform: scale(1.06); }
.post-card-body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.post-card-meta { font-size: 0.75rem; color: hsl(var(--m-teal)); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em !important; margin-bottom: 0.75rem; }
.post-card-title { font-size: 1.25rem; font-weight: 600; color: hsl(var(--m-navy)); line-height: 1.35; margin-bottom: 0.75rem; }
.post-card-excerpt { font-size: 0.9375rem; color: hsl(var(--m-gray-600)); line-height: 1.6; flex: 1; }
.post-card-more {
  margin-top: 1.25rem;
  font-size: 0.875rem; font-weight: 500;
  color: hsl(var(--m-navy));
  display: inline-flex; align-items: center; gap: 0.375rem;
}
.post-card-more::after {
  content: "←"; transition: transform 300ms var(--ease-expo);
}
.post-card:hover .post-card-more::after { transform: translateX(-4px); }

/* Single post */
.single-article {
  max-width: 48rem;
  margin: 0 auto;
}
.single-article .article-meta {
  font-size: 0.75rem; color: hsl(var(--m-teal));
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em !important;
  margin-bottom: 1rem;
}
.single-article h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}
.single-article .featured-img {
  margin: 2.5rem -1rem;
  border-radius: 1rem;
  overflow: hidden;
}
@media (min-width: 768px) { .single-article .featured-img { margin: 3rem 0; } }
.single-article .entry-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: hsl(var(--m-gray-800));
}
.single-article .entry-content > * + * { margin-top: 1.5rem; }
.single-article .entry-content h2 {
  font-size: 1.75rem; margin-top: 3rem; margin-bottom: 1rem;
}
.single-article .entry-content h3 {
  font-size: 1.375rem; margin-top: 2.5rem; margin-bottom: 0.75rem;
}
.single-article .entry-content p { color: hsl(var(--m-gray-800)); }
.single-article .entry-content a { color: hsl(var(--m-teal-deep)); text-decoration: underline; text-underline-offset: 4px; }
.single-article .entry-content a:hover { color: hsl(var(--m-navy)); }
.single-article .entry-content ul,
.single-article .entry-content ol { padding-inline-start: 1.5rem; }
.single-article .entry-content li { margin: 0.5rem 0; }
.single-article .entry-content blockquote {
  border-inline-start: 3px solid hsl(var(--m-teal));
  padding: 0.5rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 500;
  color: hsl(var(--m-navy));
  margin: 2rem 0;
}
.single-article .entry-content code {
  background: hsl(var(--m-bone));
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.875em;
}
.single-article .entry-content img { border-radius: 0.75rem; margin: 2rem 0; }

/* Page (legal/static) */
.page-content {
  max-width: 48rem;
  margin: 0 auto;
}
.page-content .entry-content { font-size: 1rem; line-height: 1.8; color: hsl(var(--m-gray-800)); }
.page-content .entry-content > * + * { margin-top: 1.25rem; }
.page-content .entry-content h2 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 0.75rem; color: hsl(var(--m-navy)); }
.page-content .entry-content h3 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.5rem; color: hsl(var(--m-navy)); }
.page-content .entry-content ul,
.page-content .entry-content ol { padding-inline-start: 1.5rem; }
.page-content .entry-content li { margin: 0.5rem 0; }
.page-content .entry-content a { color: hsl(var(--m-teal-deep)); text-decoration: underline; text-underline-offset: 3px; }

/* Pagination */
.pagination {
  display: flex; gap: 0.5rem; justify-content: center;
  margin-top: 4rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.5rem; height: 2.5rem; padding: 0 0.875rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--m-gray-100));
  font-size: 0.875rem; font-weight: 500;
  color: hsl(var(--m-gray-600));
  transition: all 300ms var(--ease-expo);
}
.pagination a:hover { border-color: hsl(var(--m-navy)); color: hsl(var(--m-navy)); }
.pagination .current { background: hsl(var(--m-navy)); color: hsl(var(--m-white)); border-color: hsl(var(--m-navy)); }

/* Comments */
.comments-area { max-width: 48rem; margin: 4rem auto 0; }
.comments-area h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; }
.comment-list li { padding: 1.5rem 0; border-bottom: 1px solid hsl(var(--m-gray-100)); }
.comment-meta { font-size: 0.8125rem; color: hsl(var(--m-gray-600)); margin-bottom: 0.5rem; }
.comment-meta strong { color: hsl(var(--m-navy)); font-weight: 600; }

.comment-form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.comment-form label { font-size: 0.875rem; font-weight: 500; color: hsl(var(--m-navy)); display: block; margin-bottom: 0.375rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--m-gray-100));
  background: hsl(var(--m-white));
  font-size: 0.9375rem;
  transition: border-color 300ms;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: hsl(var(--m-navy));
}
.comment-form .submit, .comment-form input[type="submit"] {
  background: hsl(var(--m-coral));
  color: hsl(var(--m-white));
  padding: 0.875rem 1.75rem;
  border-radius: 9999px;
  font-weight: 500;
  cursor: pointer;
  align-self: flex-start;
  transition: all 400ms var(--ease-expo);
}
.comment-form .submit:hover, .comment-form input[type="submit"]:hover {
  background: hsl(var(--m-coral-deep));
  transform: translateY(-2px);
}

/* Search / 404 */
.search-form { display: flex; gap: 0.5rem; max-width: 32rem; margin: 0 auto; }
.search-form input[type="search"] {
  flex: 1; padding: 0.875rem 1.25rem; border-radius: 9999px;
  border: 1px solid hsl(var(--m-gray-100));
  background: hsl(var(--m-white));
}
.search-form input[type="submit"] {
  padding: 0.875rem 1.75rem; border-radius: 9999px;
  background: hsl(var(--m-navy)); color: hsl(var(--m-white));
  font-weight: 500; cursor: pointer;
}

.error-404 { text-align: center; padding: 6rem 0; }
.error-404 .big { font-size: 8rem; font-weight: 700; color: hsl(var(--m-navy)); line-height: 1; opacity: 0.15; }

/* WP alignment & captions */
.alignleft { float: right; margin: 0 0 1rem 1.5rem; } /* RTL flipped */
.alignright { float: left; margin: 0 1.5rem 1rem 0; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8125rem; color: hsl(var(--m-gray-600)); margin-top: 0.5rem; text-align: center; }

/* Screen-reader only */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: hsl(var(--m-cream)); clip: auto !important; clip-path: none;
  color: hsl(var(--m-navy)); display: block; font-size: 0.875rem; font-weight: 600;
  height: auto; left: 1rem; line-height: normal; padding: 1rem 1.5rem;
  text-decoration: none; top: 1rem; width: auto; z-index: 100000;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-expo), transform 1s var(--ease-expo);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
