/*
 * CY-PRUS brand skin.
 *
 * Implements the approved design canvas (25 Aug 2026): deep navy, stone cream,
 * sea teal, terracotta. No gold. Hebrew display type is Frank Ruhl Libre, the
 * Latin brand face is Marcellus, body and UI are Assistant. Loaded site-wide
 * after atlas.css and the theme stylesheet, so its overrides win the cascade.
 * Logical properties throughout: the same file serves RTL and LTR.
 */

:root {
  --cy-navy: #12293E;
  --cy-night: #0C1C2B;
  --cy-cream: #F4EFE6;
  --cy-surface: #FBF8F2;
  --cy-teal: #178076;
  --cy-teal-light: #2FA79A;
  --cy-terracotta: #B85C38;
  --cy-ink: #1B2833;
  --cy-muted: #5A6B76;
  --cy-line: #E3DCCE;
  --cy-navy-line: #2A445C;
  --cy-navy-soft: #17324A;
  --cy-font-display: 'Frank Ruhl Libre', Georgia, serif;
  --cy-font-brand: 'Marcellus', Georgia, serif;
  --cy-font-body: 'Assistant', 'Segoe UI', system-ui, sans-serif;
}

/* ------------------------------------------------------------------ base */

body {
  margin: 0;
  background: var(--cy-cream);
  color: var(--cy-ink);
  font-family: var(--cy-font-body);
}

body h1, body h2, body h3 {
  font-family: var(--cy-font-display);
  color: var(--cy-navy);
}

body a { color: var(--cy-teal); }
body a:hover { color: var(--cy-terracotta); }

/* Hide the theme's own chrome; the plugin renders the brand header and
   footer on every page through wp_body_open and wp_footer. Covers both the
   block theme (front page and WP pages) and core's theme-compat markup
   (atlas routes). */
body .wp-site-blocks > header,
body .wp-site-blocks > footer,
body header.wp-block-template-part,
body footer.wp-block-template-part,
body .atlas-brand,
body #blog-title,
body #blog-description,
body > #header,
body > #footer,
body #page > #header,
body #page > #footer {
  display: none;
}

/* The front page hero carries the visible H1; the theme's post-title block
   would be a second one. */
body.home .wp-block-post-title,
body.home .entry-title { display: none; }

/* ------------------------------------------------------------- wordmark */

.cy-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--cy-font-brand);
  letter-spacing: 0.14em;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.cy-wordmark i {
  display: inline-block;
  width: 0.68em;
  height: 0.17em;
  margin: 0 0.22em;
  border-radius: 2px;
  background: var(--cy-teal-light);
  transform: translateY(-0.18em);
}
.cy-wordmark.on-light i { background: var(--cy-teal); }

/* ------------------------------------------------------------------ nav */

.cy-nav {
  background: var(--cy-navy);
  color: #FBF8F2;
}
.cy-nav-in {
  max-width: 1240px;
  margin-inline: auto;
  padding: 0 24px;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.cy-nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #FBF8F2;
  text-decoration: none;
  flex: 0 0 auto;
}
.cy-nav-brand .cy-wordmark { font-size: 23px; }
.cy-nav-tag {
  font-family: var(--cy-font-display);
  font-size: 14px;
  color: #9FB3C2;
  border-inline-start: 1px solid var(--cy-navy-line);
  padding-inline-start: 14px;
}
.cy-nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15.5px;
  font-weight: 600;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cy-nav-links::-webkit-scrollbar { display: none; }
.cy-nav-links a { color: #FBF8F2; text-decoration: none; white-space: nowrap; }
.cy-nav-links a:hover { color: var(--cy-teal-light); }
.cy-nav-links a.cy-nav-cta {
  color: var(--cy-night);
  background: var(--cy-teal-light);
  padding: 9px 18px;
  border-radius: 5px;
}
.cy-nav-links a.cy-nav-cta:hover { background: #45BBAE; color: var(--cy-night); }

@media (max-width: 860px) {
  .cy-nav-tag { display: none; }
  .cy-nav-in { padding: 10px 16px; flex-wrap: wrap; }
  .cy-nav-links { gap: 18px; font-size: 15px; }
}

/* --------------------------------------------------------------- footer */

.cy-footer {
  background: var(--cy-night);
  color: #9FB3C2;
  margin-block-start: 48px;
}
.cy-footer-in {
  max-width: 1240px;
  margin-inline: auto;
  padding: 36px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cy-footer .cy-wordmark { font-size: 21px; color: #FBF8F2; }
.cy-footer-id { display: flex; flex-direction: column; gap: 7px; }
.cy-footer-tag { font-size: 13px; color: var(--cy-muted); }
.cy-footer-grid { align-items: flex-start; display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 28px; }
.cy-footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.cy-footer-col strong { color: #F4EFE6; font-size: 14.5px; margin-block-end: 4px; }
.cy-footer-col a { color: #9FB3C2; text-decoration: none; }
.cy-footer-col a:hover { color: var(--cy-teal-light); }
@media (max-width: 900px) { .cy-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cy-footer-id { grid-column: 1 / -1; } }

/* ------------------------------------------------------- full-bleed util */

/* Full-bleed sections carry .alignfull so the theme's constrained layout
   stretches them itself; the old 100vw trick fought the scrollbar in RTL. */
.cy-full { width: 100%; }
body { overflow-x: clip; }

/* The theme opens the page with 140px of stacked padding and margin across
   three nested wrappers; the hero starts flush at the nav instead. Verified
   against the live DOM: main carries margin, a nested group carries padding. */
body.home .wp-site-blocks { padding-block-start: 0 !important; }
body.home main { margin-block-start: 0 !important; }
body.home main .wp-block-group { padding-block-start: 0 !important; }
body.home .entry-content { margin-block-start: 0 !important; }
.cy-wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ----------------------------------------------------------------- hero */

.cy-hero { background: var(--cy-cream); }
.cy-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  min-height: 460px;
}
.cy-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding-block: 56px 48px;
  padding-inline-end: 36px;
  padding-inline-start: max(24px, calc(50vw - 620px));
}
.cy-hero-kicker {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cy-terracotta);
}
h1.cy-hero-title {
  font-family: var(--cy-font-display);
  font-weight: 900;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.1;
  color: var(--cy-navy);
  margin: 0;
}
.cy-hero-lede {
  font-size: 18.5px;
  font-weight: 300;
  line-height: 1.6;
  color: #40525E;
  max-width: 470px;
  margin: 0;
}
.cy-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cy-surface);
  border: 1px solid var(--cy-line);
  border-radius: 7px;
  padding: 14px 16px;
  max-width: 470px;
  color: #8A968F;
  font-size: 16px;
  text-decoration: none;
}
.cy-search:hover { border-color: var(--cy-teal); color: var(--cy-muted); }
.cy-hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; max-width: 470px; }

.cy-hero-media { position: relative; overflow: hidden; min-height: 320px; }
.cy-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 50%;
}
.cy-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to var(--cy-hero-fade, left), rgba(18,41,62,0.10) 0%, rgba(18,41,62,0) 45%, rgba(244,239,230,0.5) 90%, var(--cy-cream) 100%);
}
[dir="rtl"] .cy-hero-media::after { --cy-hero-fade: right; }
.cy-hero-chips {
  position: absolute;
  z-index: 2;
  top: 40px;
  inset-inline-start: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cy-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(12,28,43,0.86);
  border: 1px solid var(--cy-navy-line);
  border-radius: 8px;
  padding: 10px 16px;
  color: #FBF8F2;
}
.cy-chip strong {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 21px;
}
.cy-chip span { font-size: 13px; color: #9FB3C2; }
.cy-chip.t strong { color: var(--cy-teal-light); }
.cy-chip.c strong { color: #D98A64; }

@media (max-width: 900px) {
  .cy-hero-grid { grid-template-columns: 1fr; }
  .cy-hero-media { order: -1; min-height: 220px; }
  .cy-hero-media::after { background: linear-gradient(to bottom, rgba(18,41,62,0) 55%, var(--cy-cream) 100%); }
  .cy-hero-chips { top: auto; bottom: 18px; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .cy-chip { padding: 7px 12px; }
  .cy-chip strong { font-size: 17px; }
  .cy-hero-copy { padding: 26px 20px 8px; margin-inline-start: 0; }
}

/* -------------------------------------------------------------- buttons */

.cy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--cy-teal);
  color: #FBF8F2;
  font-size: 16.5px;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 7px;
  text-decoration: none;
}
.cy-btn:hover { background: #10695F; color: #FBF8F2; }
.cy-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--cy-navy);
  font-size: 16.5px;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 7px;
  border: 1.5px solid var(--cy-navy);
  text-decoration: none;
}
.cy-btn-outline:hover { background: var(--cy-navy); color: #FBF8F2; }

/* ------------------------------------------------------- projects strip */

.cy-projects { padding-block: 44px 8px; }
.cy-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-block-end: 20px;
}
.cy-sec-head h2 {
  font-family: var(--cy-font-display);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 31px);
  color: var(--cy-navy);
  margin: 0;
}
.cy-sec-head a { font-size: 15.5px; font-weight: 700; text-decoration: none; }
.cy-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
@media (max-width: 900px) { .cy-cards { grid-template-columns: 1fr; } }

.cy-card {
  background: var(--cy-surface);
  border: 1px solid var(--cy-line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--cy-ink);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.cy-card:hover { border-color: var(--cy-teal); box-shadow: 0 10px 28px -18px rgba(12,28,43,0.45); color: var(--cy-ink); }
.cy-card-top { height: 4px; background: var(--cy-teal); }
.cy-card-map { display: block; width: 100%; height: 140px; }
.cy-card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 9px; }
.cy-card-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cy-card-name {
  font-family: var(--cy-font-display);
  font-weight: 700;
  font-size: 21px;
  color: var(--cy-navy);
}
.cy-card-figs { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: #40525E; font-variant-numeric: tabular-nums; }
.cy-card-price { display: flex; align-items: baseline; gap: 7px; }
.cy-card-price small { font-size: 13px; color: var(--cy-muted); }
.cy-card-price strong { font-weight: 700; font-size: 21px; color: var(--cy-terracotta); font-variant-numeric: tabular-nums; }

.cy-stage {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  color: var(--cy-teal);
  background: #E2EFEC;
}
.cy-stage.warm { color: var(--cy-terracotta); background: #F4E4DA; }
.cy-card-loc { font-size: 13px; color: var(--cy-muted); }

/* ----------------------------------------------------------- areas band */

.cy-areas { background: var(--cy-navy); padding-block: 44px 48px; margin-block-start: 40px; }
.cy-areas h2 {
  font-family: var(--cy-font-display);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 29px);
  color: #FBF8F2;
  margin: 0 0 20px;
}
.cy-areas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 980px) { .cy-areas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cy-areas-grid { grid-template-columns: 1fr; } }

.cy-area {
  background: var(--cy-navy-soft);
  border: 1px solid var(--cy-navy-line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #FBF8F2;
  text-decoration: none;
  transition: border-color .15s;
}
.cy-area:hover { border-color: var(--cy-teal-light); color: #FBF8F2; }
.cy-area-media { position: relative; height: 104px; overflow: hidden; }
.cy-area-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cy-area-media .lat {
  position: absolute;
  inset-inline-start: 18px;
  bottom: 10px;
  font-family: var(--cy-font-brand);
  font-size: 17px;
  letter-spacing: 0.12em;
  color: #9FB3C2;
}
.cy-area-body { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 5px; }
.cy-area-body strong { font-family: var(--cy-font-display); font-weight: 700; font-size: 20px; }
.cy-area-body span { font-size: 13.5px; color: #9FB3C2; font-variant-numeric: tabular-nums; }

.cy-areas-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .cy-areas-grid.cols-3 { grid-template-columns: 1fr; } }
.cy-areas-more { margin: 18px 0 0; }
.cy-areas-more a { color: var(--cy-teal-light); font-weight: 700; text-decoration: none; }

/* ------------------------------------------------------- map heading */

.cy-map-head { padding-block: 40px 4px; }
.cy-map-head h2 { font-family: var(--cy-font-display); font-weight: 900; font-size: clamp(24px, 3vw, 31px); color: var(--cy-navy); margin: 0 0 6px; }
.cy-map-head p { color: var(--cy-muted); margin: 0; }

/* ---------------------------------------------------- curated routes */

.cy-routes-wrap { padding-block: 40px 8px; }
.cy-routes-wrap h2 { font-family: var(--cy-font-display); font-weight: 900; font-size: clamp(24px, 3vw, 31px); color: var(--cy-navy); margin: 0 0 18px; }
.cy-routes { display: flex; flex-wrap: wrap; gap: 10px; }
.cy-routes a {
  background: var(--cy-surface);
  border: 1px solid var(--cy-line);
  border-radius: 20px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--cy-navy);
  text-decoration: none;
}
.cy-routes a:hover { border-color: var(--cy-teal); color: var(--cy-teal); }

/* -------------------------------------------------- relocation steps */

.cy-transition { padding-block: 44px 8px; }
.cy-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .cy-steps { grid-template-columns: 1fr; } }
.cy-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--cy-surface);
  border: 1px solid var(--cy-line);
  border-radius: 8px;
  padding: 20px 22px;
  color: var(--cy-ink);
  text-decoration: none;
  transition: border-color .15s;
}
.cy-step:hover { border-color: var(--cy-teal); color: var(--cy-ink); }
.cy-step-n {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--cy-teal);
  color: #FBF8F2;
  border-radius: 50%;
  font-weight: 700;
  font-size: 15px;
  margin-block-end: 4px;
}
.cy-step strong { font-family: var(--cy-font-display); font-size: 19px; color: var(--cy-navy); }
.cy-step span:last-child { font-size: 14px; color: var(--cy-muted); }

/* ----------------------------------------- atlas pages: token re-skin */

body .atlas-page {
  --atlas-fg: var(--cy-ink);
  --atlas-muted: var(--cy-muted);
  --atlas-line: var(--cy-line);
  --atlas-accent: var(--cy-teal);
  --atlas-bg-soft: var(--cy-surface);
  --atlas-ink: var(--cy-night);
  max-width: 1240px;
}
body .atlas-h1 {
  font-family: var(--cy-font-display);
  font-weight: 900;
  color: var(--cy-navy);
}
body .atlas-stat strong { color: var(--cy-navy); font-variant-numeric: tabular-nums; }
body .atlas-stat-total { background: var(--cy-teal); }
body .atlas-pagination a.is-current { background: var(--cy-teal); }
body .atlas-pillars li a { color: var(--cy-navy); }
body .atlas-inline-links a:hover { border-color: var(--cy-teal); background: var(--cy-surface); }
body .atlas-map { border-color: var(--cy-line); }

/* The brand look is one deliberate palette; the ad-hoc dark variant from the
   generic skin fought it, so both schemes now resolve to the same tokens. */
@media (prefers-color-scheme: dark) {
  body .atlas-page {
    --atlas-fg: var(--cy-ink);
    --atlas-muted: var(--cy-muted);
    --atlas-line: var(--cy-line);
    --atlas-bg-soft: var(--cy-surface);
  }
  body .atlas-ctrl input,
  body .atlas-ctrl select { background: #fff; color: var(--cy-ink); }
  body .atlas-editor-note { background: #fffaf0; }
  body .atlas-pillars li { border-block-end-color: var(--cy-line); }
  body .atlas-provenance { border-inline-start-color: var(--cy-line); }
}

/* WhatsApp bar in brand colours; layout comes from atlas.css. */
body .atlas-wa { background: var(--cy-night); border-radius: 10px; }
body .atlas-wa:hover, body .atlas-wa:focus-visible { background: #0A1723; }
body .atlas-wa-brand { font-size: 19px; }
body .atlas-wa-text small { color: #9FB3C2; opacity: 1; }

/* ------------------------------------------------------------ map marks */

/* Labelled pills: the map answers before anyone clicks. Projects carry
   name + price; businesses carry their name close in. */
.atlas-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 210px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--cy-navy);
  color: #FBF8F2;
  font-family: var(--cy-font-body);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(12,28,43,0.3);
  position: relative;
  cursor: pointer;
}
.atlas-pill::after {
  content: "";
  position: absolute;
  top: 100%;
  inset-inline-start: 50%;
  margin-inline-start: -4px;
  border: 4px solid transparent;
  border-top-color: var(--cy-navy);
}
.atlas-pill .atlas-pill-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
.atlas-pill .atlas-pill-price {
  color: #6FD3C6;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
.atlas-pill:hover, .atlas-pill:focus-visible {
  background: var(--cy-terracotta);
  color: #FBF8F2;
  z-index: 5;
}
.atlas-pill:hover::after, .atlas-pill:focus-visible::after { border-top-color: var(--cy-terracotta); }

.atlas-pill.is-place {
  background: var(--cy-surface);
  color: var(--cy-navy);
  font-weight: 600;
  border: 1px solid var(--cy-line);
  box-shadow: 0 1px 5px rgba(12,28,43,0.18);
}
.atlas-pill.is-place::after { border-top-color: var(--cy-surface); }
.atlas-pill.is-place:hover { background: var(--cy-navy); color: #FBF8F2; border-color: var(--cy-navy); }
.atlas-pill.is-place:hover::after { border-top-color: var(--cy-navy); }

/* The plain dot: small, branded, still a link with a name. */
body .atlas-pin {
  display: block;
  inline-size: 11px;
  block-size: 11px;
  border-radius: 50%;
  background: var(--cy-teal);
  border: 2px solid #FBF8F2;
  box-shadow: 0 1px 4px rgba(12,28,43,0.35);
}
body .atlas-pin:hover { background: var(--cy-terracotta); }

/* Far-zoom clusters: quiet navy orientation marks, not the interface. */
body .atlas-cluster {
  background: var(--cy-navy);
  border: 2px solid rgba(251,248,242,0.9);
  color: #FBF8F2;
  font-family: var(--cy-font-body);
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(12,28,43,0.3);
}
body .atlas-cluster:hover { background: var(--cy-teal); }

/* Project page CTA stays reachable on a phone. */
@media (max-width: 782px) {
  body .atlas-view-place .atlas-wa-wrap {
    position: sticky;
    bottom: 10px;
    z-index: 40;
  }
}

/* Locality header photo */
.cy-loc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}
.cy-loc-head img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--cy-line);
}
@media (max-width: 860px) {
  .cy-loc-head { grid-template-columns: 1fr; }
  .cy-loc-head img { height: 200px; }
}

/* Front page spacing niceties */
body.home .atlas-home-intro { display: none; }
body.home .wp-site-blocks { padding-block-start: 0; }
body.home .entry-content > * { margin-block-start: 0; }
