/* ============================================================
   IZMSTAR REAL ESTATE LLC — Ring Gallery Styles
   Uses IZMSTAR design tokens (assets/ds/*.css)
   ============================================================ */

* { box-sizing: border-box; }

:root {
  /* Logo brand colors */
  --brand-navy: #16325C;
  --brand-gold: #C9A24B;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--surface-canvas);
}

a { color: var(--text-ink); text-decoration: none; }
a:hover { color: var(--accent-primary-dark); }

img { display: block; }

button {
  font-family: var(--font-sans);
  cursor: pointer;
}

/* ---------------- NAV ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--brand-navy);
  color: var(--text-on-dark);
  animation: navIn 0.7s ease both;
}
@keyframes navIn { from { opacity: 0; } to { opacity: 1; } }

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-logo {
  color: var(--text-on-dark);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.nav-logo:hover { color: var(--text-on-dark); }
.nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--izm-white);
  align-self: center;
}
.nav-logo-sub {
  font-size: var(--text-utility-xs-size);
  font-weight: var(--text-utility-xs-weight);
  letter-spacing: var(--text-utility-xs-tracking);
  color: var(--text-on-dark-muted);
}

.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
}
.nav-link {
  position: relative;
  color: var(--text-on-dark-muted);
  font-size: var(--text-button-sm-size);
  font-weight: 700;
  padding: 6px 0;
  transition: color 120ms ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}
.nav-link:hover { color: var(--text-on-dark); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--text-on-dark); }

.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-lang {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-interactive, 2px);
  color: var(--text-on-dark);
  font-size: var(--text-button-sm-size);
  font-weight: 700;
  padding: 8px 14px;
  transition: border-color 120ms ease;
}
.nav-lang:hover { border-color: var(--izm-white); }

.nav-burger {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--izm-white);
}
.nav-mobile { display: none; }

/* ---------------- HERO ---------------- */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: var(--surface-canvas);
}

.hero-copy {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  text-align: center;
  width: min(720px, 92vw);
  animation: fadeUp 0.9s 0.15s ease both;
  pointer-events: none;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(24px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(44px, 5.6vw, 78px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--text-ink);
  text-wrap: balance;
}
.hero-sub {
  margin: 0 auto;
  max-width: 620px;
  font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.45;
  color: var(--text-body);
  text-wrap: pretty;
}

/* Text buttons (Filter / Grid view) */
.text-btn {
  background: none;
  border: none;
  padding: 4px 0;
  font-size: var(--text-button-sm-size);
  font-weight: 700;
  color: var(--text-ink);
  border-bottom: 2px solid var(--text-ink);
  transition: color 120ms ease, border-color 120ms ease;
}
.text-btn:hover {
  color: var(--accent-primary-dark);
  border-color: var(--accent-primary);
}
.text-btn .plus { color: var(--accent-primary); }

.hero-filter,
.hero-grid {
  position: absolute;
  top: 50%;
  z-index: 30;
  cursor: pointer;
}
.hero-filter { left: 40px; }
.hero-grid { right: 40px; }

/* Category labels */
.hero-cats { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
.cat-label {
  position: absolute;
  pointer-events: auto;
  background: none;
  border: none;
  padding: 2px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-ink);
  border-bottom: 1px solid var(--izm-gray-200);
  white-space: nowrap;
  transition: border-color 150ms ease, color 150ms ease, transform 150ms ease;
  animation: catIn 0.8s ease both;
}
@keyframes catIn { from { opacity: 0; } to { opacity: 1; } }
.cat-label sup {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 3px;
}
.cat-label:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}
.cat-label.is-active {
  color: var(--accent-primary-dark);
  border-color: var(--accent-primary);
}

/* ---------------- RING ---------------- */
.ring-stage {
  position: absolute;
  left: 50%;
  top: 60%;
  width: 100%;
  height: 60vh;
  transform: translate(-50%, -50%);
  perspective: 1200px;
  z-index: 10;
  outline: none;
}
.ring-stage:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: -2px; }

.ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: ringIn 1.2s 0.25s ease both;
}
@keyframes ringIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.panel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--panel-w, 44px);
  height: var(--panel-h, 116px);
  margin: calc(var(--panel-h, 116px) / -2) 0 0 calc(var(--panel-w, 44px) / -2);
  border-radius: 2px;
  overflow: hidden;
  background: #ddd;
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}
.panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.panel.is-hovered { border-color: rgba(0, 0, 0, 0.45); }
.panel.is-locked { border-color: var(--accent-primary); }

/* ---------------- CENTER PREVIEW ---------------- */
.center-preview {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  z-index: 60;
  text-align: center;
  width: min(380px, 74vw);
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms ease, visibility 320ms ease;
  pointer-events: none;
}
.center-preview.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.preview-imgwrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface-soft);
  border: 1px solid var(--border-hairline);
  border-radius: 2px;
  overflow: hidden;
}
.corner-square {
  position: absolute;
  top: 0; left: 0;
  width: 12px; height: 12px;
  background: var(--accent-primary);
  z-index: 3;
}
.preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 300ms ease;
}
.preview-img.is-front { opacity: 1; }

.preview-title {
  margin: 14px 0 4px;
  font-size: var(--text-heading-xl-size);
  font-weight: var(--text-heading-xl-weight);
  line-height: var(--text-heading-xl-lh);
  color: var(--text-ink);
}
.preview-meta {
  margin: 0;
  font-size: var(--text-utility-xs-size);
  font-weight: var(--text-utility-xs-weight);
  letter-spacing: var(--text-utility-xs-tracking);
  text-transform: uppercase;
  color: var(--text-muted);
}
.preview-cta {
  display: inline-block;
  margin-top: 10px;
  font-size: var(--text-button-sm-size);
  font-weight: 700;
  color: var(--text-ink);
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: 2px;
}
.preview-cta:hover { color: var(--accent-primary-dark); }
.preview-cta .plus { color: var(--accent-primary); }

.hero-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

/* ---------------- CURSOR DOT ---------------- */
.cursor-dot {
  position: fixed;
  left: 0; top: 0;
  width: 10px; height: 10px;
  border-radius: 9999px;
  background: var(--izm-black);
  z-index: 500;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: width 150ms ease, height 150ms ease, opacity 200ms ease;
}
.cursor-dot.is-on { opacity: 1; }
.cursor-dot.is-big { width: 22px; height: 22px; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot { display: none; }
  .hero { cursor: auto; }
}

/* ---------------- GRID VIEW ---------------- */
.gridview {
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: 128px 24px 64px;
}
.gridview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 24px;
  margin-bottom: 40px;
}
.gridview-eyebrow {
  margin: 0 0 6px;
  font-size: var(--text-utility-xs-size);
  font-weight: var(--text-utility-xs-weight);
  letter-spacing: var(--text-utility-xs-tracking);
  text-transform: uppercase;
  color: var(--text-muted);
}
.gridview-title {
  margin: 0;
  font-size: var(--text-display-lg-size);
  font-weight: var(--text-display-lg-weight);
  line-height: var(--text-display-lg-lh);
  color: var(--text-ink);
}
.gridview-actions { display: flex; gap: 24px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.g-card {
  position: relative;
  background: var(--surface-canvas);
  border: 1px solid var(--border-hairline);
  border-radius: 2px;
  overflow: hidden;
  text-align: left;
  padding: 0;
  transition: border-color 120ms ease;
}
.g-card:hover { border-color: var(--border-strong); }
.g-card .corner-square { z-index: 4; }
.g-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--surface-soft);
}
.g-card-body { padding: 20px 24px 24px; }
.g-card-status {
  display: inline-block;
  margin: 0 0 10px;
  font-size: var(--text-utility-xs-size);
  font-weight: var(--text-utility-xs-weight);
  letter-spacing: var(--text-utility-xs-tracking);
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-hairline);
  border-radius: 2px;
  padding: 3px 8px;
}
.g-card-status.is-launch { color: var(--accent-primary-dark); border-color: var(--accent-primary); }
.g-card-title {
  margin: 0 0 4px;
  font-size: var(--text-card-title-size);
  font-weight: var(--text-card-title-weight);
  line-height: var(--text-card-title-lh);
  color: var(--text-ink);
}
.g-card-meta {
  margin: 0 0 12px;
  font-size: var(--text-caption-sm-size);
  line-height: var(--text-caption-sm-lh);
  color: var(--text-muted);
}
.g-card-price {
  margin: 0;
  font-size: var(--text-body-strong-size);
  font-weight: 700;
  color: var(--text-body);
}

.grid-more-wrap { text-align: center; margin-top: 48px; }

/* Buttons (DS spec: 2px radius, black/white, green primary) */
.btn-primary {
  background: var(--accent-primary);
  color: var(--on-accent-primary);
  border: 1px solid var(--accent-primary);
  border-radius: 2px;
  font-size: var(--text-button-md-size);
  font-weight: 700;
  padding: 12px 24px;
  transition: background 120ms ease;
}
.btn-primary:hover, .btn-primary:active { background: var(--accent-primary-dark); border-color: var(--accent-primary-dark); }
.btn-outline {
  white-space: nowrap;
  background: none;
  color: var(--text-ink);
  border: 1px solid var(--izm-black);
  border-radius: 2px;
  font-size: var(--text-button-md-size);
  font-weight: 700;
  padding: 12px 24px;
  transition: background 120ms ease, color 120ms ease;
}
.btn-outline:hover { background: var(--izm-black); color: var(--izm-white); }

/* ---------------- FILTER OVERLAY ---------------- */
.filter-overlay[hidden] { display: none; }
.filter-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: flex-end;
}
.filter-panel {
  width: min(480px, 100vw);
  height: 100%;
  background: var(--surface-canvas);
  display: flex;
  flex-direction: column;
  animation: panelIn 260ms ease both;
}
@keyframes panelIn {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-hairline);
}
.filter-heading {
  margin: 0;
  font-size: var(--text-heading-xl-size);
  font-weight: 700;
  color: var(--text-ink);
}
.filter-close {
  background: none;
  border: 1px solid var(--border-hairline);
  border-radius: 2px;
  width: 40px; height: 40px;
  font-size: 22px;
  line-height: 1;
  color: var(--text-ink);
  transition: border-color 120ms ease;
}
.filter-close:hover { border-color: var(--izm-black); }

.filter-groups {
  flex: 1;
  overflow-y: auto;
  padding: 8px 32px 24px;
}
.filter-group { border-bottom: 1px solid var(--border-hairline); padding: 20px 0; }
.filter-group-name {
  margin: 0 0 12px;
  font-size: var(--text-caption-md-size);
  font-weight: var(--text-caption-md-weight);
  letter-spacing: var(--text-caption-md-tracking);
  text-transform: uppercase;
  color: var(--text-ink);
}
.filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chip {
  white-space: nowrap;
  background: none;
  border: 1px solid var(--border-hairline);
  border-radius: 2px;
  padding: 8px 14px;
  font-size: var(--text-button-sm-size);
  font-weight: 700;
  color: var(--text-body);
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}
.filter-chip:hover { border-color: var(--izm-black); }
.filter-chip.is-on {
  background: var(--izm-black);
  border-color: var(--izm-black);
  color: var(--izm-white);
}

.filter-foot {
  border-top: 1px solid var(--border-hairline);
  padding: 20px 32px 24px;
}
.filter-result {
  margin: 0 0 14px;
  font-size: var(--text-caption-sm-size);
  color: var(--text-muted);
}
.filter-foot-btns { display: flex; gap: 12px; }
.filter-foot-btns .btn-primary { flex: 1; }

/* ---------------- FOOTER ---------------- */
.footer {
  background: var(--brand-navy);
  color: var(--text-on-dark);
  padding: 56px 24px 32px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.footer-col-brand { display: flex; flex-direction: column; align-items: flex-start; }
.footer-logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--izm-white);
  margin-bottom: 16px;
}
.footer-brand {
  margin: 0 0 8px;
  font-size: var(--text-caption-md-size);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.footer-note {
  margin: 0;
  font-size: var(--text-caption-sm-size);
  color: var(--text-on-dark-muted);
}
.footer-head {
  margin: 0 0 14px;
  font-size: var(--text-utility-xs-size);
  font-weight: var(--text-utility-xs-weight);
  letter-spacing: var(--text-utility-xs-tracking);
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}
.footer-line {
  display: block;
  margin: 0 0 10px;
  font-size: var(--text-body-sm-size);
  line-height: 1.5;
  color: var(--text-on-dark);
}
a.footer-line:hover { color: var(--brand-gold); }
p.footer-line { color: var(--text-on-dark-muted); }
.footer-social { display: flex; gap: 12px; }
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  color: var(--text-on-dark);
  transition: border-color 120ms ease, color 120ms ease;
}
.social-btn:hover {
  border-color: var(--brand-gold);
  color: var(--brand-gold);
}
.footer-legal {
  max-width: 1280px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: var(--text-caption-sm-size);
  color: var(--text-on-dark-muted);
  text-align: left;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1023px) {
  .hero-filter { left: 24px; }
  .hero-grid { right: 24px; }
}

@media (max-width: 767px) {
  .nav-links, .nav-lang { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile.is-open {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 20px;
    background: var(--brand-navy);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
  }
  .nav-mobile .nav-link { padding: 10px 0; font-size: 16px; }

  .hero { cursor: auto; }
  .hero-copy { top: 13%; }
  .hero-title { font-size: clamp(38px, 11vw, 52px); }
  .hero-sub { font-size: 15px; }

  .hero-filter, .hero-grid {
    top: auto;
    bottom: 56px;
  }
  .hero-filter { left: 24px; }
  .hero-grid { right: 24px; }

  /* Category labels become a scroll row */
  .hero-cats {
    position: absolute;
    inset: auto 0 auto 0;
    top: calc(13% + 150px);
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 8px 24px;
    scrollbar-width: none;
    pointer-events: auto;
  }
  .hero-cats::-webkit-scrollbar { display: none; }
  .cat-label { position: static !important; flex: 0 0 auto; }

  .ring-stage { top: 66%; height: 46vh; }
  .center-preview { top: 64%; width: min(260px, 70vw); }
  .preview-title { font-size: 18px; }
  .hero-hint { font-size: 9px; letter-spacing: 3px; bottom: 20px; }

  .gridview { padding-top: 104px; }
  .gridview-head { flex-direction: column; align-items: flex-start; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------------- REDUCED MOTION ---------------- */
@media (prefers-reduced-motion: reduce) {
  .nav, .hero-copy, .ring, .cat-label { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

.footer-legal-link { color: var(--text-on-dark-muted); text-decoration: underline; }
.footer-legal-link:hover { color: var(--brand-gold); }
