/* Rodol Homes — Design Tokens */
:root {
  /* Type families (swappable via tweaks) */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-sans: "Geist", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* Palette — editorial luxury */
  --bone: #F4F1EC;
  --bone-2: #EBE6DE;
  --paper: #FAF8F4;
  --ink: #0F0F0F;
  --ink-2: #1A1A1A;
  --ink-soft: #2C2A26;
  --muted: #6B665E;
  --line: rgba(15, 15, 15, 0.12);
  --line-soft: rgba(15, 15, 15, 0.06);

  --forest: #1B4332;
  --forest-deep: #0E2C20;
  --forest-soft: #2D5F49;

  --gold: #B8893E;
  --gold-emaar: #C1A26D;
  --terracotta: #B8763E;

  /* Spacing */
  --pad-x: clamp(20px, 5vw, 72px);
  --max-w: 1560px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; scrollbar-gutter: stable; overflow-x: clip; background: var(--ink); }
/* background on html (the root), NOT just body: iOS Safari paints the strip above
   the web viewport (behind the status bar) and the overscroll areas with the
   CANVAS background. With no background on html, body's light --bone propagates to
   the canvas and shows as a white strip above the dark sticky header (the long-
   hunted "gap" — the nav itself measures flush, top:0). A dark canvas here makes
   that strip match the header; body keeps --bone, so the visible page is unchanged. */
/* overflow-x: clip on the root (not just body): body's clip only contains in-flow
   and absolutely-positioned children. The off-canvas .mobile-menu is position:fixed
   parked at translateX(100%) — its containing block is the viewport, so it escapes
   body's clip and adds phantom horizontal scroll. Clipping at html contains it.
   clip (not hidden) avoids making the viewport a scroll container, keeping the
   fixed nav pinned on iOS — same rationale as the body rule below. */

body {
  font-family: var(--font-sans);
  background: var(--bone);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: clip; /* clip (not hidden): blocks h-overflow without making body a
                       scroll container, which on iOS Safari un-pins the fixed nav
                       and opens a gap at the top as the address bar collapses */
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--forest); color: var(--bone); }

/* Typography utilities */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dash { display: inline-block; width: 24px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 12px; }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-feature-settings: "liga", "dlig";
}
.display em {
  font-style: normal;
  font-weight: 400;
  color: var(--gold-emaar);
}

.body-lg { font-size: 18px; line-height: 1.6; color: var(--ink-soft); }
.body { font-size: 15px; line-height: 1.65; color: var(--ink-soft); }
.caption { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); font-family: var(--font-sans); }
.mono { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Standard WP accessibility utility — hides visually, keeps content for screen readers.
   Without this, WP emits visible "Posts pagination", "Skip to content" labels, etc. */
.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;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background-color: #f1f1f1;
  clip: auto !important;
  clip-path: none;
  color: var(--ink);
  display: block;
  font-size: 14px;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  transition: all 0.4s var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-primary { background: var(--forest); color: var(--bone); }
.btn-primary:hover { background: var(--forest-deep); transform: translateY(-1px); }
.btn-primary-light { background: var(--bone); color: var(--ink); }
.btn-primary-light:hover { background: var(--bone-2); transform: translateY(-1px); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--bone); }
.btn-ghost-light { border-color: rgba(255,255,255,0.4); color: white; background: transparent; }
.btn-ghost-light:hover { background: white; color: var(--ink); border-color: white; }
.btn .arrow { transition: transform 0.3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Mask reveal for headlines */
.mask-reveal { display: inline-block; overflow: hidden; }
.mask-reveal > span { display: inline-block; transform: translateY(0); }
.mask-reveal.armed > span { transform: translateY(110%); transition: transform 1.2s var(--ease-out); }
.mask-reveal.armed.in > span { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .mask-reveal.armed > span { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Grain overlay */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bone); }
::-webkit-scrollbar-thumb { background: var(--ink); }

/* Responsive */
@media (max-width: 768px) {
  body { font-size: 15px; }
}
