/* ==========================================
   GLOBAL THEME – same as your main site
   ========================================== */

:root { 
  --bg-1: #8ef3c0;
  --bg-2: #22d3ee;
  --text-main: #041317;
  --text-muted: rgba(4, 19, 23, 0.78);
  --card: rgba(255, 255, 255, 0.97);
  --card-soft: rgba(255, 255, 255, 0.94);
  --glass-bg: rgba(255, 255, 255, 0.97);
  --border-soft: rgba(255, 255, 255, 0.8);
  --accent: #22c55e;
  --accent-blue: #0ea5e9;
  --accent-dark: #022c22;
  --radius-lg: 28px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.32);
  --shadow-small: 0 12px 28px rgba(15, 23, 42, 0.18);
  --transition-fast: 200ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-med: 300ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Extra tokens used only by LandCalc */
  --brand-gradient-1: var(--bg-1);
  --brand-gradient-2: #bef264;
  --brand-gradient-3: var(--bg-2);

  --bg-primary: #ffffff;
  --bg-secondary: var(--card);
  --bg-glass: var(--glass-bg);

  --border-light: var(--border-soft);
  --border-subtle: rgba(4, 19, 23, 0.12);

  --text-light: #ffffff;
  --text-dark: var(--text-main);
  --text-grey: var(--text-muted);

  --btn-primary-bg: var(--accent-dark);
  --btn-primary-text: #e3ffe9;
  --btn-primary-shadow: 0 14px 34px rgba(15, 118, 110, 0.45);

  --btn-secondary-bg: rgba(255, 255, 255, 0.4);
  --btn-secondary-border: var(--border-soft);
  --btn-secondary-text: var(--text-main);

  --success: var(--accent);
  --warning: #facc15;
  --error: #ef4444;
}

/* ===== RESET ===== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  background: transparent;
}

/* ===== GLOBAL BACKGROUND (same style as your portfolio hero) ===== */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 0% 0%, #bbf7d0 0, transparent 46%),
    radial-gradient(circle at 100% 100%, #38bdf8 0, transparent 40%),
    linear-gradient(
      135deg,
      var(--bg-1) 0%,
      #bef264 22%,
      #5eead4 55%,
      var(--bg-2) 100%
    );
  filter: saturate(1.05);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.18),
      transparent 35%,
      rgba(0, 0, 0, 0.2)
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.28),
      rgba(255, 255, 255, 0.28) 1px,
      transparent 1px,
      transparent 2px
    );
  mix-blend-mode: soft-light;
  opacity: 0.6;
  pointer-events: none;
}

/* ===== BASIC LAYOUT CONTAINER ===== */

.lc-container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

/* Wrap for the whole calculator page */
.app-bg {
  position: relative;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ===============================
   LAND CALCULATOR UI
   =============================== */

/* ===== HEADER ===== */

.lc-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.86)
  );
}

.lc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 12px;
}

/* Logo block similar to your “Ajith M” header feel */
.lc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lc-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, #ecfdf5 0, transparent 45%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: var(--shadow-small);
}

.lc-logo-text {
  display: flex;
  flex-direction: column;
  color: var(--text-main);
}

.lc-logo-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.lc-logo-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* AREA / DISTANCE toggle pills */

.lc-mode-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lc-pill {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(15, 23, 42, 0.16);
  background: rgba(15, 23, 42, 0.06);
  color: rgba(15, 23, 42, 0.82);
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    border-color var(--transition-fast);
}

.lc-pill:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.lc-pill-active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border-color: rgba(15, 23, 42, 0.4);
  box-shadow: var(--btn-primary-shadow);
}

/* ===== HERO SECTION ===== */

.lc-main {
  position: relative;
  z-index: 1;
  padding-top: 48px;
}

.lc-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding-bottom: 24px;
  color: var(--text-main);
}

.lc-hero-text {
  max-width: 640px;
}

.lc-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(4, 19, 23, 0.7);
  margin: 0 0 8px;
}

.lc-hero-title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 2.7vw, 2.6rem);
  letter-spacing: -0.06em;
}

.lc-hero-subtitle {
  margin: 0;
  max-width: 620px;
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.lc-hero-subtitle strong {
  font-weight: 700;
}

/* ===== GRID & CARDS ===== */

.lc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
  gap: 24px;
  margin-top: 12px;
}

.lc-card {
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: 20px 20px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(24px);
}

.lc-card-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--text-dark);
}

.lc-card-sub {
  margin: 0 0 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ===== FORM FIELDS ===== */

.lc-field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.lc-field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-dark);
}

.lc-field input,
.lc-field select {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  padding: 9px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #ffffff;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast),
    background var(--transition-fast);
}

.lc-field input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.lc-field input:focus,
.lc-field select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
  background: #f9fffb;
}

.lc-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== RESULTS PANEL ===== */

.lc-results-card {
  display: flex;
  flex-direction: column;
}

.lc-results-header {
  margin-bottom: 8px;
}

.lc-results-sub {
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.lc-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.lc-result-item {
  background: #ffffff;
  border-radius: 18px;
  padding: 10px 12px 11px;
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: var(--shadow-small);
}

.lc-result-main {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.lc-result-unit {
  font-weight: 600;
  color: var(--text-dark);
}

.lc-result-value {
  font-weight: 700;
  color: var(--accent-blue);
}

.lc-result-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.lc-status-text {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== FOOTER ===== */

.lc-footer {
  position: relative;
  z-index: 1;
  padding: 16px 0 24px;
  font-size: 0.8rem;
  color: rgba(15, 23, 42, 0.8);
}

.lc-footer-inner {
  text-align: center;
}

/* ===== UTILITY ===== */

.lc-hidden {
  display: none;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .lc-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .lc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .lc-container {
    width: min(100% - 24px, 480px);
  }

  .lc-hero-title {
    font-size: 1.9rem;
  }

  .lc-main {
    padding-top: 40px;
  }
}
