/* ==========================================================================
   Menjo Land Agency Ltd — Design Tokens
   Phase 1. Single source of truth. No hex values anywhere outside :root.
   ========================================================================== */

:root {

  /* --- Colour ------------------------------------------------------------ */
  --green:        #0B6B2E;   /* primary: section blocks, accents            */
  --green-deep:   #053D19;   /* card panels, hero scrim, hover              */
  --green-mist:   #E8F1EA;   /* light green tint — now used sparingly       */

  /* Dark surfaces are black, not green. Green is an accent, not a canvas. */
  --night:        #101210;   /* primary dark surface: panels, footer, bands */
  --night-2:      #1B1F1B;   /* raised dark surface inside a dark section   */
  --mist:         #F4F2EC;   /* neutral warm light band, alternates w/ white*/
  --gold:         #C8892A;   /* seal base, CTA gradient start               */
  --gold-light:   #E8B54B;   /* seal highlight, CTA end, focus ring         */
  --yellow:       #F2D024;   /* one highlight per screen. Not decoration.   */
  --clay:         #A44A28;   /* rare accent — echoes the red soil on site   */
  --paper:        #FBFAF6;   /* page background                             */
  --ink:          #151915;   /* body text on light                          */
  --ink-soft:     #5A625B;   /* secondary text on light                     */
  --line:         #DEDCD2;   /* hairlines, borders on light                 */

  /* Added in build: --ink-soft is unreadable on --green-deep, so dark
     panels need their own secondary tone. */
  --on-dark:      #FFFFFF;
  --on-dark-soft: rgba(255, 255, 255, 0.74);
  --on-dark-fill: rgba(255, 255, 255, 0.09);   /* neutral, not green-tinted */

  /* --- Type -------------------------------------------------------------- */
  --font-display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  --t-display: clamp(2.25rem, 8vw + 0.5rem, 5rem);
  --t-h2:      clamp(1.5rem, 3.5vw + 0.5rem, 3rem);
  --t-h3:      clamp(1.125rem, 2vw + 0.25rem, 1.375rem);
  --t-price:   clamp(1.875rem, 4vw, 2.25rem);
  --t-body:    clamp(0.9375rem, 1.5vw + 0.25rem, 1rem);
  --t-small:   0.875rem;
  --t-micro:   0.75rem;

  /* --- Spacing (4px base) ------------------------------------------------ */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;  --s5: 24px;
  --s6: 32px;  --s7: 48px;  --s8: 64px;  --s9: 96px;  --s10: 128px;

  /* --- Radii ------------------------------------------------------------- */
  --r-pill: 100px;
  --r-card: 16px;
  --r-sm:   6px;

  /* --- Elevation --------------------------------------------------------- */
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-lift: 0 18px 44px rgba(0, 0, 0, 0.20);

  /* --- Motion ------------------------------------------------------------ */
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --dur:      220ms;
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

h1, .t-display { font-size: var(--t-display); line-height: 0.92; }
h2, .t-h2      { font-size: var(--t-h2);      line-height: 1.0;  }

/* h3 is Inter, not Anton — Anton is caps-only and reads badly at small sizes */
h3, .t-h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--t-h3);
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

.t-small { font-size: var(--t-small); line-height: 1.5; }

.t-micro {
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}

.num { font-variant-numeric: tabular-nums; }

/* --- Focus. Visible on every interactive element, always. ----------------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

.btn-menjo,
.btn-menjo-ghost {
  font-family: var(--font-body);
  font-size: var(--t-small);
  font-weight: 600;
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  cursor: pointer;
  transition: transform var(--dur) var(--ease),
              filter var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

/* Ink on gold, never white — white on gold fails 4.5:1 */
.btn-menjo {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--ink);
}
.btn-menjo:hover { filter: brightness(1.06); color: var(--ink); }

.btn-menjo-ghost {
  background: transparent;
  border-color: var(--gold-light);
  color: var(--gold-light);
}
.btn-menjo-ghost:hover {
  background: rgba(232, 181, 75, 0.12);
  color: var(--gold-light);
}

/* ==========================================================================
   Listing card — the signature component
   ========================================================================== */

.menjo-card {
  position: relative;
  border-radius: var(--r-card);
  background: var(--night);
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.menjo-card:hover,
.menjo-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

/* --- Photo -------------------------------------------------------------- */

.card-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-card) var(--r-card) 0 0;
  overflow: hidden;
  background: var(--night);
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Scrim keeps the seal and badge legible against a bright sky */
.card-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
              var(--night) 0%,
              rgba(0, 0, 0, 0.55) 22%,
              rgba(0, 0, 0, 0) 48%);
  pointer-events: none;
}

/* --- Title badge --------------------------------------------------------- */

.card-badge {
  position: absolute;
  top: var(--s4);
  left: var(--s4);
  z-index: 3;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--ink);
  padding: var(--s1) var(--s3);
  border-radius: var(--r-pill);
}

.card-badge--soon {
  background: transparent;
  border: 2px solid var(--yellow);
  color: var(--yellow);
}

/* --- Gold seal ----------------------------------------------------------- */

.seal {
  position: absolute;
  right: var(--s5);
  bottom: calc(var(--s6) * -1);
  width: 104px;
  height: 104px;
  z-index: 4;
  display: grid;
  place-items: center;
  transition: transform var(--dur) var(--ease);
}

/* Sunburst notches: gold spokes on transparent, clipped to a circle */
.seal::before {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    var(--gold) 0deg 9deg,
    transparent 9deg 18deg
  );
}

.seal-disc {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold-light) 0%, var(--gold) 100%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1;
}

.seal-price {
  font-family: var(--font-display);
  font-size: var(--t-price);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.seal-unit {
  display: block;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink);
  opacity: 0.75;
  margin-top: 2px;
}

.menjo-card:hover .seal,
.menjo-card:focus-within .seal {
  transform: rotate(8deg) scale(1.06);
}

/* --- Panel --------------------------------------------------------------- */

.card-panel {
  background: var(--night);
  color: var(--on-dark);
  padding: var(--s5) var(--s5) var(--s5);
  border-radius: 0 0 var(--r-card) var(--r-card);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Clears the seal so the title never collides with it */
.card-head { padding-right: 92px; margin-bottom: var(--s4); }

.card-place {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}
.card-place a { color: var(--on-dark); text-decoration: none; }
.card-place a:hover { color: var(--gold-light); }

.card-project {
  font-size: var(--t-small);
  color: var(--on-dark-soft);
  margin: var(--s1) 0 0;
}

/* --- Amenity pills ------------------------------------------------------- */

.card-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s4);
}

.pill {
  display: flex;
  align-items: center;
  gap: var(--s2);
  background: var(--on-dark-fill);
  color: var(--on-dark);
  border-radius: var(--r-pill);
  padding: var(--s2) var(--s3);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill i { font-size: 14px; color: var(--gold-light); flex: none; }

.card-note {
  font-size: var(--t-small);
  color: var(--on-dark-soft);
  margin: 0 0 var(--s5);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-top: auto;
}

/* ==========================================================================
   State: Coming soon
   ========================================================================== */

.is-soon .card-photo img { opacity: 0.4; }
.is-soon .pill            { opacity: 0.55; }

.soon-mark {
  position: absolute;
  right: var(--s5);
  bottom: calc(var(--s6) * -1);
  width: 104px;
  height: 104px;
  z-index: 4;
  border-radius: 50%;
  border: 3px solid var(--yellow);
  background: var(--night);
  color: var(--yellow);
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.1;
  transition: transform var(--dur) var(--ease);
}

.soon-mark .seal-price { color: var(--yellow); font-size: 1.5rem; }
.soon-mark .seal-unit  { color: var(--yellow); opacity: 1; }

.menjo-card:hover .soon-mark { transform: scale(1.06); }

/* ==========================================================================
   State: Sold — stays on the site. Proof the business moves land.
   ========================================================================== */

.is-sold .card-photo img { filter: grayscale(1); opacity: 0.55; }
.is-sold .seal-disc      { filter: grayscale(0.85); }
.is-sold .seal::before   { filter: grayscale(0.85); }
.is-sold .pill           { opacity: 0.5; }
.is-sold:hover           { transform: translateY(-2px); }
.is-sold:hover .seal     { transform: none; }

.sold-ribbon {
  position: absolute;
  top: 22px;
  right: -34px;
  z-index: 5;
  transform: rotate(45deg);
  background: var(--clay);
  color: var(--on-dark);
  padding: var(--s2) var(--s7);
  font-size: var(--t-micro);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card-sold-line {
  margin-top: auto;
  font-size: var(--t-small);
  color: var(--on-dark-soft);
  border-top: 1px solid var(--on-dark-fill);
  padding-top: var(--s4);
}
.card-sold-line a { color: var(--gold-light); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 400px) {
  .card-pills   { grid-template-columns: 1fr; }
  .card-actions { grid-template-columns: 1fr; }
  .seal, .soon-mark { width: 88px; height: 88px; right: var(--s4); }
  .seal-price   { font-size: 1.75rem; }
  .card-head    { padding-right: 76px; }
}

/* ==========================================================================
   Reduced motion — transforms drop out entirely
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .menjo-card:hover,
  .menjo-card:focus-within { transform: none; }
  .menjo-card:hover .seal,
  .menjo-card:focus-within .seal,
  .menjo-card:hover .soon-mark { transform: none; }
  .menjo-card:hover { box-shadow: var(--shadow-lift); }
}

/* ==========================================================================
   Skip link — first thing a keyboard or screen-reader user meets
   ========================================================================== */

.skip-link {
  position: absolute;
  left: var(--s4);
  top: calc(var(--s4) * -6);
  z-index: 1100;
  background: var(--gold-light);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--t-small);
  padding: var(--s3) var(--s5);
  border-radius: var(--r-sm);
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s4); color: var(--ink); }
