/* Homestay Systems - Modern SaaS Look (vanilla CSS) */

:root {
  --background: 0 0% 100%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;

  /* Vibrant Blue Primary */
  --primary: 217 91% 60%;
  /* Electric Cyan */
  --secondary: 189 94% 43%;
  /* Warm Amber */
  --accent: 38 92% 50%;

  --muted: 214 32% 91%;
  --muted-foreground: 215 16% 47%;
  --border: 214 32% 91%;

  --radius: 0.75rem;

  --gradient-primary: linear-gradient(135deg, hsl(217 91% 60%), hsl(189 94% 43%));
  --gradient-hero: linear-gradient(135deg, hsl(217 91% 60% / 0.1), hsl(189 94% 43% / 0.1));
  --gradient-accent: linear-gradient(135deg, hsl(38 92% 50%), hsl(45 93% 47%));

  --shadow-soft: 0 2px 8px hsl(217 91% 60% / 0.1);
  --shadow-medium: 0 8px 30px hsl(217 91% 60% / 0.15);
  --shadow-glow: 0 0 40px hsl(217 91% 60% / 0.2);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid hsl(var(--border)); }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: -0.025em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; cursor: pointer; padding: 0; }

.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 2rem; } }

/* ---------- Icons ---------- */
.icon {
  width: 1.25rem; height: 1.25rem; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 1.75rem; height: 1.75rem; }

/* ---------- Utilities ---------- */
.gradient-primary { background: var(--gradient-primary); }
.gradient-hero { background: var(--gradient-hero); }
.gradient-accent { background: var(--gradient-accent); }
.shadow-medium { box-shadow: var(--shadow-medium); }
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.text-primary { color: hsl(var(--primary)); }
.text-secondary { color: hsl(var(--secondary)); }
.text-faint { color: hsl(var(--muted-foreground) / 0.3); }
.muted { color: hsl(var(--muted-foreground)); }
.small { font-size: 0.875rem; }
.xsmall { font-size: 0.75rem; }
.center { text-align: center; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-16 { margin-bottom: 4rem; }
.bg-muted { background: hsl(var(--muted) / 0.3); }
.stack-4 > * + * { margin-top: 1rem; }
.stack-6 > * + * { margin-top: 1.5rem; }
.stack-8 > * + * { margin-top: 2rem; }
.link:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  white-space: nowrap; border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem; font-weight: 500;
  height: 2.5rem; padding: 0 1rem;
  transition: all 0.2s ease;
}
.btn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.btn-lg { height: 2.75rem; padding: 0 2rem; }
.btn-block { width: 100%; }
.btn-hero {
  background: var(--gradient-primary); color: #fff; font-weight: 600;
  box-shadow: var(--shadow-medium);
}
.btn-hero:hover { opacity: 0.9; box-shadow: var(--shadow-glow); }
.btn-outline {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
}
.btn-outline:hover { background: hsl(var(--accent)); color: #fff; }
.btn-arrow .icon { transition: transform 0.2s ease; }
.btn-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: transparent;
  transition: all 0.3s ease;
}
.nav.is-scrolled {
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; height: 5rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; transition: opacity 0.2s; }
a.brand:hover { opacity: 0.8; }
.brand-logo {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; display: block; }
.nav-links { display: none; align-items: center; gap: 2rem; }
.nav-links > a:not(.btn) { color: hsl(var(--foreground) / 0.8); font-weight: 500; transition: color 0.2s; }
.nav-links > a:not(.btn):hover { color: hsl(var(--primary)); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  padding: 1.5rem 0;
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 0 0 1rem 1rem;
  box-shadow: var(--shadow-medium);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu > a {
  display: block; padding: 0.5rem 1rem; margin-bottom: 1rem;
  border-radius: var(--radius); font-weight: 500;
  color: hsl(var(--foreground) / 0.8); transition: all 0.2s;
}
.mobile-menu > a:hover { color: hsl(var(--primary)); background: hsl(var(--muted) / 0.5); }
.mobile-menu-cta { padding: 0.5rem 1rem 0; }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle, .mobile-menu { display: none !important; }
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-head { text-align: center; margin-bottom: 4rem; }
.section-head h2 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 700; }
.section-head h2 .text-gradient { padding-bottom: 0.15em; }
.section-head p {
  margin: 1rem auto 0; max-width: 48rem;
  font-size: 1.125rem; color: hsl(var(--muted-foreground));
}
@media (min-width: 1024px) {
  .section { padding: 8rem 0; }
  .section-head h2 { font-size: 3rem; line-height: 1; }
}

.card {
  background: hsl(var(--card)); padding: 1.5rem;
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}
.card:hover { box-shadow: var(--shadow-medium); }
.card h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.card-lift:hover { transform: translateY(-4px); }
.card-lg {
  background: hsl(var(--card)); padding: 2rem;
  border-radius: 1rem; box-shadow: var(--shadow-soft);
}
@media (min-width: 1024px) { .prose.card-lg { padding: 3rem; } }
.card-lg.shadow-medium { box-shadow: var(--shadow-medium); }
.prose { max-width: 64rem; margin: 0 auto; color: hsl(var(--foreground) / 0.9); line-height: 1.625; }
.prose p { font-size: 1.125rem; }
.prose p + p { margin-top: 1.5rem; }
.prose h3 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: hsl(var(--foreground)); margin: 2.5rem 0 1rem; }
.prose h3:first-child { margin-top: 0; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin: 1rem 0 1.5rem; font-size: 1.125rem; }
.prose li + li { margin-top: 0.5rem; }
.prose.prose-even > * { margin: 0; }
.prose.prose-even > * + *, .prose.prose-even li + li { margin-top: 1.25rem; }

.grid-4 { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.icon-box {
  width: 3rem; height: 3rem; border-radius: var(--radius); margin-bottom: 1rem;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-inner { padding-top: 5rem; padding-bottom: 5rem; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
.hero-content > * + * { margin-top: 2rem; }
.pill {
  display: inline-block; padding: 0.5rem 1rem; border-radius: 999px;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.2);
  font-size: 0.875rem; font-weight: 500;
}
.hero-title { font-size: 3rem; line-height: 1.25; font-weight: 700; }
.hero-lead { font-size: 1.125rem; line-height: 1.625; color: hsl(var(--muted-foreground)); max-width: 42rem; }
.hero-actions { display: flex; flex-direction: column; gap: 1rem; }
.hero-stats { display: flex; align-items: center; gap: 2rem; padding-top: 1rem; flex-wrap: wrap; }
.stat-value { font-size: 1.875rem; font-weight: 700; color: hsl(var(--primary)); }
.stat-label { font-size: 0.875rem; color: hsl(var(--muted-foreground)); }
.divider-v { width: 1px; height: 3rem; background: hsl(var(--border)); }
.hero-media { position: relative; }
.hero-media img { width: 100%; filter: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15)); }
.floating-badge {
  position: absolute; top: -1rem; right: -1rem;
  background: hsl(var(--accent)); color: #fff;
  padding: 0.75rem 1.5rem; border-radius: 999px; font-weight: 600;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
@media (min-width: 640px) { .hero-actions { flex-direction: row; } }
@media (min-width: 1024px) {
  .hero-inner { padding-top: 8rem; padding-bottom: 8rem; }
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 3.75rem; }
  .hero-lead { font-size: 1.25rem; }
  .hero-media { animation: float 3s ease-in-out infinite; }
}
@media (min-width: 1280px) { .hero-title { font-size: 4.5rem; } }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; gap: 2rem; max-width: 64rem; margin: 0 auto 4rem; }
@media (min-width: 768px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
.pricing-grid.pricing-single { grid-template-columns: 1fr; max-width: 32rem; }
.pricing-note { text-align: center; }
.price-card {
  position: relative; overflow: hidden;
  background: hsl(var(--card)); padding: 2rem; border-radius: 1rem;
  box-shadow: var(--shadow-medium); border: 2px solid transparent;
  transition: all 0.2s ease;
}
.price-card h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.price-card-public:hover { border-color: hsl(var(--primary)); }
.price-card-private { border-color: hsl(var(--secondary)); }
.price { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 1.5rem; }
.price-amount { font-size: 3rem; line-height: 1; font-weight: 700; }
.badge-popular {
  position: absolute; top: 1rem; right: 1rem;
  padding: 0.25rem 0.75rem; border-radius: 999px;
  color: #fff; font-size: 0.75rem; font-weight: 600;
}
.check-list li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.875rem; }
.check-list li + li { margin-top: 0.75rem; }
.check-list .icon { margin-top: 0.125rem; }

/* ---------- Features table ---------- */
.features-table-wrap { max-width: 64rem; margin: 0 auto; }
.table-hint { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; margin-bottom: 1rem; }
.table-card { background: hsl(var(--card)); border-radius: 1rem; box-shadow: var(--shadow-soft); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.features-table { width: 100%; border-collapse: collapse; }
.features-table th, .features-table td { padding: 1rem; }
.features-table th { text-align: left; font-weight: 600; }
.features-table th.center { text-align: center; }
.features-table thead tr { background: hsl(var(--muted) / 0.3); border-bottom: 1px solid hsl(var(--border)); }
.features-table tbody tr { border-bottom: 1px solid hsl(var(--border)); transition: background 0.2s; }
.features-table tbody tr:last-child { border-bottom: 0; }
.features-table tbody tr:hover { background: hsl(var(--muted) / 0.2); }
.features-table td { font-size: 0.875rem; }
.features-table td .icon-md { display: block; margin: 0 auto; }
.section-row td { font-weight: 700; }
.table-note { margin-top: 1rem; }

.info-btn {
  display: inline-flex; vertical-align: middle; margin-left: 0.375rem;
  color: hsl(var(--primary)); border-radius: 999px; transition: color 0.2s;
}
.info-btn:hover { color: hsl(var(--secondary)); }
.info-btn:focus { outline: none; }
.info-btn:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }

.popover {
  position: absolute; z-index: 60;
  width: 20rem; max-width: calc(100vw - 2rem);
  padding: 1rem; border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--card)); color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  font-size: 0.875rem; line-height: 1.625;
  animation: fade-in 0.15s ease-out;
}
.popover[hidden] { display: none; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 3rem; max-width: 72rem; margin: 0 auto; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
.h3-lg { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-label { font-weight: 500; margin-bottom: 0.25rem; }
.contact-icon {
  width: 2.5rem; height: 2.5rem; border-radius: var(--radius); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.tint-primary { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.tint-secondary { background: hsl(var(--secondary) / 0.1); color: hsl(var(--secondary)); }
.tint-accent { background: hsl(var(--accent) / 0.1); color: hsl(var(--accent)); }
.why-box {
  background: hsl(var(--primary) / 0.05); border: 1px solid hsl(var(--primary) / 0.1);
  border-radius: 1rem; padding: 2rem;
}
.why-box h4 { font-size: 1.25rem; margin-bottom: 1rem; }
.dot-list li {
  position: relative; padding-left: 0.875rem;
  font-size: 0.875rem; color: hsl(var(--muted-foreground));
}
.dot-list li + li { margin-top: 0.75rem; }
.dot-list li::before {
  content: ""; position: absolute; left: 0; top: 0.5rem;
  width: 0.375rem; height: 0.375rem; border-radius: 999px; background: hsl(var(--primary));
}

label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
input, textarea {
  display: block; width: 100%;
  padding: 0.5rem 0.75rem; border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border)); background: hsl(var(--background));
  font-size: 1rem;
}
input { height: 2.5rem; }
textarea { resize: none; }
input::placeholder, textarea::placeholder { color: hsl(var(--muted-foreground)); }
input:focus-visible, textarea:focus-visible {
  outline: none; box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--primary));
}
@media (min-width: 768px) { input, textarea { font-size: 0.875rem; } }

/* ---------- About ---------- */
.about-wrap { max-width: 64rem; margin: 0 auto; }
.about-wrap > * + * { margin-top: 3rem; }
.value-card { text-align: center; }
.value-icon {
  width: 3.5rem; height: 3.5rem; border-radius: 999px; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: transform 0.2s ease;
}
.value-card:hover .value-icon { transform: scale(1.1); }

/* ---------- Footer ---------- */
.footer { background: hsl(var(--foreground) / 0.05); border-top: 1px solid hsl(var(--border)); padding: 3rem 0; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-title { font-size: 1rem; margin-bottom: 1rem; }
.footer-links li + li { margin-top: 0.5rem; }
.footer-links a, .footer-contact a { font-size: 0.875rem; color: hsl(var(--muted-foreground)); transition: color 0.2s; }
.footer-links a:hover, .footer-contact a:hover { color: hsl(var(--primary)); }
.footer-contact li { display: flex; align-items: center; gap: 0.5rem; }
.footer-contact li + li { margin-top: 0.75rem; }
.footer-bottom { padding-top: 2rem; border-top: 1px solid hsl(var(--border)); text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 100; right: 1rem; bottom: 1rem;
  width: calc(100% - 2rem); max-width: 26rem;
  padding: 1.5rem; border-radius: calc(var(--radius) - 2px);
  background: hsl(var(--background)); border: 1px solid hsl(var(--border));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  animation: slide-up 0.3s ease-out;
}
.toast[hidden] { display: none; }
.toast-title { font-size: 0.875rem; font-weight: 600; }
.toast-desc { font-size: 0.875rem; opacity: 0.9; margin-top: 0.25rem; }

/* ---------- Animations ---------- */
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.animate-fade-in { animation: fade-in 0.6s ease-out; }
.animate-slide-up { animation: slide-up 0.6s ease-out; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Scroll reveal (class added by JS, so content stays visible without it) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
