/* ═══════════════════════════════════════
   CSS VARIABLES — edit here to retheme
   ═══════════════════════════════════════ */
:root {
  /* Brand */
  --primary:       #81D4FA;
  --primary-deep:  #4FC3F7;
  --primary-soft:  #B3E5FC;
  --accent:        #FF8A65;
  --accent-hover:  #FF7043;

  /* Light theme */
  --bg:            #F8FCFF;
  --bg-card:       #FFFFFF;
  --bg-nav:        rgba(248, 252, 255, 0.88);
  --bg-footer:     #0D1B2A;
  --text:          #1A2332;
  --text-muted:    #5A6A7A;
  --text-on-dark:  #E8F0F8;
  --border:        #D6E8F4;
  --shadow:        0 2px 20px rgba(13, 27, 42, 0.06);
  --shadow-card:   0 4px 24px rgba(13, 27, 42, 0.08);
  --shadow-hover:  0 12px 40px rgba(13, 27, 42, 0.14);

  /* Dark theme overrides */
  --dark-bg:           #0D1B2A;
  --dark-bg-card:      #152238;
  --dark-bg-nav:       rgba(13, 27, 42, 0.92);
  --dark-text:         #E8F0F8;
  --dark-text-muted:   #8DA4BE;
  --dark-border:       #1E3450;
  --dark-shadow:       0 2px 20px rgba(0, 0, 0, 0.3);
  --dark-shadow-card:  0 4px 24px rgba(0, 0, 0, 0.25);
  --dark-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4);

  /* Layout */
  --nav-height:    72px;
  --radius:        12px;
  --radius-sm:     8px;
  --max-width:     1200px;

  /* Type */
  --font-display:  'DM Serif Display', 'Noto Sans TC', serif;
  --font-body:     'Inter', 'Noto Sans TC', sans-serif;
}

[data-theme="dark"] {
  --bg:          var(--dark-bg);
  --bg-card:     var(--dark-bg-card);
  --bg-nav:      var(--dark-bg-nav);
  --text:        var(--dark-text);
  --text-muted:  var(--dark-text-muted);
  --border:      var(--dark-border);
  --shadow:      var(--dark-shadow);
  --shadow-card: var(--dark-shadow-card);
  --shadow-hover:var(--dark-shadow-hover);
}

/* ═══════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.4s, color 0.4s;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s, border-color 0.4s;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-family: var(--font-display);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: color 0.25s, background 0.25s;
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: rgba(129, 212, 250, 0.12);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: background 0.25s, color 0.25s;
}

.btn-icon:hover { background: rgba(129, 212, 250, 0.12); color: var(--text); }

.btn-lang {
  font-size: 0.78rem;
  font-weight: 600;
  width: auto;
  padding: 0 12px;
  letter-spacing: 0.04em;
}

/* Mobile menu */
.hamburger { display: none; }

.mobile-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 99;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}

.mobile-menu {
  display: none;
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 101;
  width: 280px;
  background: var(--bg-card);
  padding: 80px 24px 24px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 30px rgba(0,0,0,0.1);
}

.mobile-menu.open { transform: translateX(0); }

.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 40px; height: 40px;
  background: none; border: none;
  font-size: 1.4rem; color: var(--text);
  cursor: pointer;
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 40px) 24px 60px;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(79, 195, 247, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 20% 70%, rgba(129, 212, 250, 0.1), transparent);
}

[data-theme="dark"] .hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(79, 195, 247, 0.06), transparent),
    radial-gradient(ellipse 60% 50% at 20% 70%, rgba(129, 212, 250, 0.04), transparent);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative; z-index: 1;
}

.hero-text .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-deep);
  margin-bottom: 20px;
}

.hero-text .eyebrow::before {
  content: '';
  width: 24px; height: 2px;
  background: var(--primary-deep);
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.hero-text h1 span {
  background: linear-gradient(135deg, var(--primary-deep), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 138, 101, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 138, 101, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary-deep);
  background: rgba(129, 212, 250, 0.08);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4/3;
}

.hero-card {
  position: absolute;
  width: 85%;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-card:nth-child(1) { top: 0; left: 0; z-index: 3; }
.hero-card:nth-child(2) { top: 20px; left: 40px; z-index: 2; opacity: 0.7; }
.hero-card:nth-child(3) { top: 40px; left: 80px; z-index: 1; opacity: 0.4; }

.hero-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary));
  position: relative;
  display: flex; align-items: flex-end; padding: 16px;
}

.hero-card-img .price-tag {
  background: rgba(255,255,255,0.92);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #1A2332;
}

.hero-card-body { padding: 16px 18px; }

.hero-card-body h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.hero-card-body p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-stats {
  position: absolute;
  bottom: -20px; left: -20px;
  z-index: 5;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 24px;
}

.hero-stat strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-deep);
}

.hero-stat span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════
   SECTION COMMONS
   ═══════════════════════════════════════ */
.section {
  padding: 100px 24px;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header .eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-deep);
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ═══════════════════════════════════════
   ABOUT
   ═══════════════════════════════════════ */
.about-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-content h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.about-feat {
  padding: 18px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.about-feat:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-card);
}

.about-feat .feat-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.about-feat h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.about-feat p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

.about-visual {
  position: relative;
}

.about-image-box {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--primary-soft) 0%, var(--primary) 50%, var(--primary-deep) 100%);
  position: relative;
  overflow: hidden;
}

.about-image-box::after {
  content: '🏠';
  position: absolute;
  font-size: 8rem;
  bottom: 20px;
  right: 20px;
  opacity: 0.2;
}

.about-badge {
  position: absolute;
  bottom: 30px;
  left: -20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.about-badge strong {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-deep);
  line-height: 1;
}

.about-badge span { font-size: 0.78rem; color: var(--text-muted); }

/* ═══════════════════════════════════════
   PROPERTY CARDS
   ═══════════════════════════════════════ */
.properties-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.prop-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s, box-shadow 0.35s;
  border: 1px solid var(--border);
}

.prop-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.prop-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
}

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

.prop-card-img .img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.prop-card-img .tag {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prop-card-img .tag.rent { background: var(--primary-deep); }

.prop-card-body { padding: 18px 20px; }

.prop-card-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.prop-card-body .location {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.prop-card-meta {
  display: flex;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.prop-card-meta span {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.prop-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

.prop-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-deep);
}

.prop-price small {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.8rem;
}

/* ═══════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════ */
.contact-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.contact-detail .cd-icon {
  width: 44px; height: 44px;
  background: rgba(129, 212, 250, 0.12);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-detail strong { font-size: 0.88rem; display: block; margin-bottom: 2px; }
.contact-detail span { font-size: 0.84rem; color: var(--text-muted); }

.contact-form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-deep);
  box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.15);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-submit { width: 100%; padding: 16px; font-size: 0.95rem; }

.form-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer {
  background: var(--bg-footer);
  color: var(--text-on-dark);
  padding: 60px 24px 30px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  font-size: 0.88rem;
  color: #8DA4BE;
  margin-top: 12px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  color: #8DA4BE;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: #C8D8E8;
  padding: 5px 0;
  transition: color 0.25s;
}

.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #1E3450;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #5A7A9A;
}

/* ═══════════════════════════════════════
   ALTERNATE BG
   ═══════════════════════════════════════ */
.bg-alt {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(129, 212, 250, 0.04) 50%, var(--bg) 100%);
}

[data-theme="dark"] .bg-alt {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(129, 212, 250, 0.02) 50%, var(--bg) 100%);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { order: -1; }
  .about-image-box { aspect-ratio: 16/9; }
  .properties-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }

  .section { padding: 70px 20px; }
  .properties-grid { grid-template-columns: 1fr; max-width: 480px; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 2rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero-stats { position: relative; bottom: auto; left: auto; margin-top: 24px; }
}

/* ═══════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════
   DARK MODE TOGGLE
   ═══════════════════════════════════════ */
.theme-toggle {
  position: relative;
  width: 48px; height: 28px;
  background: var(--border);
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}

.theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

[data-theme="dark"] .theme-toggle {
  background: var(--primary-deep);
}

[data-theme="dark"] .theme-toggle::after {
  transform: translateX(20px);
}

.theme-toggle-label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  color: var(--text);
  padding: 14px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: transform 0.4s, opacity 0.4s;
  border: 1px solid var(--border);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
