/* ============================================
   園滙 GardenHub — Design Tokens & Styles
   Art direction: Organic / Nature / Professional
   Palette: Deep forest green + warm sand
   ============================================ */

:root {
  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Font families */
  --font-display: 'Zodiak', 'Georgia', serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
}

/* ========== LIGHT MODE (default) ========== */
:root,
[data-theme='light'] {
  --color-bg: #faf9f5;
  --color-surface: #f5f3ed;
  --color-surface-2: #edeae2;
  --color-border: #d4d0c6;
  --color-text: #1a2e1a;
  --color-text-muted: #5a6b5a;
  --color-text-faint: #98a698;
  --color-text-inverse: #faf9f5;
  --color-primary: #2d6a4f;
  --color-primary-hover: #1b4332;
  --color-primary-active: #143026;
  --color-primary-light: #d8f3dc;
  --color-accent: #c9a96e;
  --color-accent-hover: #b8943d;

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 120 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.02 120 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.02 120 / 0.12);
}

/* ========== DARK MODE ========== */
[data-theme='dark'] {
  --color-bg: #141c14;
  --color-surface: #1a241a;
  --color-surface-2: #212d21;
  --color-border: #2f3f2f;
  --color-text: #d4dfd4;
  --color-text-muted: #8a9e8a;
  --color-text-faint: #5a6b5a;
  --color-text-inverse: #141c14;
  --color-primary: #52b788;
  --color-primary-hover: #74c69d;
  --color-primary-active: #95d5b2;
  --color-primary-light: #1b3326;
  --color-accent: #d4a95a;
  --color-accent-hover: #e0be78;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #141c14;
    --color-surface: #1a241a;
    --color-surface-2: #212d21;
    --color-border: #2f3f2f;
    --color-text: #d4dfd4;
    --color-text-muted: #8a9e8a;
    --color-text-faint: #5a6b5a;
    --color-text-inverse: #141c14;
    --color-primary: #52b788;
    --color-primary-hover: #74c69d;
    --color-primary-active: #95d5b2;
    --color-primary-light: #1b3326;
    --color-accent: #d4a95a;
    --color-accent-hover: #e0be78;

    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ========== GLOBAL ========== */
a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  color: var(--color-primary-hover);
}

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-8);
  }
}

/* ========== HEADER / NAV ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 250;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}
.logo img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
}
.logo-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}
.logo-text span {
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: var(--text-sm);
  margin-left: var(--space-2);
}

.nav-links {
  display: none;
  list-style: none;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}
.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
  font-weight: 500;
}
.nav-links a:hover {
  color: var(--color-text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive);
}
.theme-toggle:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.mobile-menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}
@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--color-bg);
  z-index: 200;
  padding: var(--space-8) var(--space-4);
  overflow-y: auto;
}
.mobile-nav.open {
  display: block;
}
.mobile-nav a {
  display: block;
  padding: var(--space-4) 0;
  font-size: var(--text-lg);
  color: var(--color-text);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  font-weight: 500;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    oklch(from var(--color-bg) l c h / 0.93) 0%,
    oklch(from var(--color-bg) l c h / 0.80) 50%,
    oklch(from var(--color-bg) l c h / 0.55) 100%
  );
}
@media (max-width: 767px) {
  .hero-overlay {
    background: linear-gradient(
      180deg,
      oklch(from var(--color-bg) l c h / 0.92) 0%,
      oklch(from var(--color-bg) l c h / 0.85) 60%,
      oklch(from var(--color-bg) l c h / 0.6) 100%
    );
  }
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-16) 0;
  max-width: 640px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-bottom: var(--space-6);
  letter-spacing: 0.02em;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
  text-shadow: 0 1px 3px oklch(from var(--color-bg) l c h / 0.5);
}
.hero p {
  font-size: var(--text-base);
  color: var(--color-text);
  opacity: 0.8;
  margin-bottom: var(--space-8);
  line-height: 1.7;
  text-shadow: 0 1px 2px oklch(from var(--color-bg) l c h / 0.4);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
  min-height: 48px;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
}

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

/* ========== SECTIONS ========== */
section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}
.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  line-height: 1.7;
}

/* ========== HOW IT WORKS ========== */
.how-section {
  background: var(--color-surface);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-top: var(--space-12);
}
@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.step {
  position: relative;
}
.step-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: var(--space-4);
}
.step h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}
.step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* step connector line on desktop */
@media (min-width: 768px) {
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    right: calc(-1 * var(--space-3));
    width: calc(var(--space-6));
    height: 1px;
    background: var(--color-border);
  }
}

/* ========== SERVICES ========== */
.services-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-top: var(--space-12);
  align-items: center;
}
@media (min-width: 768px) {
  .services-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.services-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.services-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.service-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.service-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.service-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-md);
}
.service-item h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}
.service-item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ========== WHY US ========== */
.why-section {
  background: var(--color-surface);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}
@media (min-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
}
.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ========== ABOUT ========== */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-top: var(--space-12);
  align-items: center;
}
@media (min-width: 768px) {
  .about-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}
.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  order: -1;
}
@media (min-width: 768px) {
  .about-image {
    order: 1;
  }
}
.about-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.about-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}
.about-text p:last-of-type {
  margin-bottom: var(--space-8);
}

/* ========== CTA SECTION ========== */
.cta-section {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  text-align: center;
}
.cta-section .section-label {
  color: oklch(from var(--color-text-inverse) l c h / 0.7);
}
.cta-section .section-title {
  color: var(--color-text-inverse);
}
.cta-section .section-desc {
  color: oklch(from var(--color-text-inverse) l c h / 0.8);
  margin-inline: auto;
}
.cta-section .btn {
  margin-top: var(--space-8);
  background: var(--color-text-inverse);
  color: var(--color-primary);
  font-weight: 700;
}
.cta-section .btn:hover {
  background: var(--color-text-inverse);
  opacity: 0.92;
  color: var(--color-primary-hover);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--color-surface);
  padding-block: var(--space-12);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-brand p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
  max-width: 32ch;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: var(--space-12);
}
.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.footer-col a:hover {
  color: var(--color-text);
}

.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
}

/* ========== SCROLL ANIMATIONS ========== */
.fade-in {
  opacity: 1;
}
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}
@keyframes reveal-fade {
  to {
    opacity: 1;
  }
}

/* ========== WHATSAPP FLOAT ========== */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 100;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px oklch(0.2 0.05 150 / 0.3);
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px oklch(0.2 0.05 150 / 0.4);
}
.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}
