:root {
  /* Notion Light Canvas */
  --bg-page: #fbfbfa;
  --bg-surface: #ffffff;
  --bg-subtle: #f7f6f3;
  --bg-hover: #f1f0eb;
  
  --text-main: #37352f;
  --text-muted: #6f6d66;
  --text-dim: #9b9a97;
  
  --brand-ink: #191919;
  --jaapi-red: #c83232;
  --jaapi-red-subtle: rgba(200, 50, 50, 0.08);
  
  --border-light: rgba(55, 53, 47, 0.12);
  --border-strong: rgba(55, 53, 47, 0.22);
  --shadow-sm: 0 1px 3px rgba(15, 15, 15, 0.06), 0 2px 6px rgba(15, 15, 15, 0.03);
  --shadow-md: 0 4px 16px rgba(15, 15, 15, 0.08);
  --radius: 8px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-page: #191919;
  --bg-surface: #202020;
  --bg-subtle: #262626;
  --bg-hover: #2f2f2f;
  
  --text-main: #ebebeb;
  --text-muted: #9b9b9b;
  --text-dim: #6e6e6e;
  
  --brand-ink: #ffffff;
  --border-light: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.22);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(100% - 2.5rem, 1140px);
  margin-inline: auto;
}

h1 { font-size: clamp(2.1rem, 1.8rem + 2vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; color: var(--brand-ink); }
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem); font-weight: 600; letter-spacing: -0.02em; color: var(--brand-ink); }
h3 { font-size: 1.1rem; font-weight: 600; color: var(--brand-ink); }
p { color: var(--text-muted); }

/* Buttons & Badges */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--brand-ink);
  color: var(--bg-page);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-surface);
  color: var(--text-main);
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.btn-secondary:hover { background-color: var(--bg-hover); }

/* Notion Cards & Images */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-preview-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
  display: block;
}

/* Interactive Prompt Bar */
.interactive-prompt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 0.5rem 0.6rem 0.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  max-width: 680px;
  margin: 0 auto;
}
.interactive-prompt-bar:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.prompt-placeholder {
  font-size: 0.9rem;
  color: var(--text-dim);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Filters & Badges */
.filter-bar {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-subtle);
  padding: 0.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}
.filter-btn {
  background: transparent;
  border: none;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}
.filter-btn.active, .filter-btn:hover {
  background: var(--bg-surface);
  color: var(--brand-ink);
  box-shadow: var(--shadow-sm);
}
.badge {
  font-size: 0.75rem;
  font-weight: 400;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}
.link-arrow {
  display: inline-flex;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--brand-ink);
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.75rem;
}
.link-arrow:hover { text-decoration: underline; }

/* Estimator Drawer Styles */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(100%, 420px);
  background: var(--bg-surface); z-index: 100; border-left: 1px solid var(--border-light);
  transform: translateX(100%); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem; border-bottom: 1px solid var(--border-light); }
.drawer-body { padding: 1.25rem; flex: 1; overflow-y: auto; }
.choice-list { display: flex; flex-direction: column; gap: 0.65rem; }
.choice-btn {
  text-align: left; background: var(--bg-subtle); border: 1px solid var(--border-light);
  padding: 0.85rem 1rem; border-radius: var(--radius); cursor: pointer; color: var(--text-main);
  transition: var(--transition);
}
.choice-btn:hover { background: var(--bg-hover); border-color: var(--brand-ink); }
.choice-btn strong { display: block; font-size: 0.95rem; }
.choice-btn span { font-size: 0.8rem; color: var(--text-muted); }
.input-notion {
  background: var(--bg-subtle); border: 1px solid var(--border-light); padding: 0.75rem;
  border-radius: var(--radius); color: var(--text-main); font-size: 0.95rem; width: 100%;
}
.input-notion:focus { outline: none; border-color: var(--brand-ink); background: var(--bg-surface); }

/* Centered Estimator Modal */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: min(calc(100% - 2rem), 480px);
  max-height: 88vh;
  background: var(--bg-surface);
  z-index: 100;
  border: 1px solid var(--border-strong);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-md), 0 20px 45px -10px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.drawer.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.drawer-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

/* ======================================================= */
/* RESPONSIVE REFINEMENTS FOR MOBILE VIEW (< 768px)        */
/* ======================================================= */

@media (max-width: 768px) {
  /* Container Padding */
  .container {
    width: min(100% - 1.5rem, 1140px);
  }

  /* Typography */
  h1 {
    font-size: 1.85rem;
    line-height: 1.2;
  }
  h2 {
    font-size: 1.35rem;
  }

  /* Hero Prompt Bar becomes clean vertical/stacked tap card */
  .interactive-prompt-bar {
    border-radius: var(--radius);
    padding: 0.85rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .interactive-prompt-bar div {
    justify-content: flex-start;
  }

  .prompt-placeholder {
    white-space: normal;
    font-size: 0.84rem;
    text-align: left;
  }

  .interactive-prompt-bar button {
    width: 100%;
    justify-content: center;
    padding: 0.65rem;
  }

  /* Filter Tabs Bar (Horizontal scrolling on small screens) */
  .filter-bar {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding: 0.35rem;
  }

  .filter-btn {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.45rem 0.65rem;
  }

  /* Single Column Grid for Cards */
  .grid-cards {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  /* Centered Modal Responsive Adaptation */
  .drawer {
    width: calc(100% - 1.5rem);
    max-height: 85vh;
    border-radius: var(--radius);
  }

  .drawer-header {
    padding: 1rem 1.25rem;
  }

  .drawer-body {
    padding: 1rem 1.25rem;
  }

  /* Growth / Call to Action Card */
  .card[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    padding: 1.5rem !important;
  }
}

/* Contact Grid Layout */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.contact-form-card {
  padding: 2rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--brand-ink);
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

/* Custom Notion-Styled Select Field */
.select-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
}

.select-custom {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 2.25rem 0.75rem 0.85rem !important;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: var(--bg-subtle) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: var(--radius) !important;
  color: var(--text-main) !important;
}

/* Accessible Pure CSS Dropdown Arrow Indicator */
.select-wrapper::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 5px;
  background-color: var(--text-dim);
  clip-path: polygon(100% 0%, 0 0%, 50% 100%);
  pointer-events: none;
}

.contact-info-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Mobile Breakpoint for Contact Form (< 768px) */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-form-card {
    padding: 1.25rem;
  }

  /* Force 2-column input rows into 1-column on mobile */
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .select-custom {
    font-size: 0.88rem;
    padding-top: 0.8rem !important;
    padding-bottom: 0.8rem !important;
  }
}

/* Mobile Touch & Dropdown Sizing Overrides */
@media (max-width: 768px) {
  /* Prevent browser auto-zoom and expand touch targets */
  .select-custom,
  .input-notion,
  select,
  input,
  textarea {
    font-size: 16px !important; /* 16px prevents iOS Safari from shrinking the control or auto-zooming */
    min-height: 52px !important; /* Meets ergonomic touch target requirements */
    line-height: 1.4 !important;
  }

  .select-custom {
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
    padding-left: 1rem !important;
    padding-right: 2.75rem !important;
    border-radius: calc(var(--radius) + 2px) !important;
  }

  /* Increase chevron size and touch position on phones */
  .select-wrapper::after {
    right: 18px;
    width: 10px;
    height: 6px;
  }

  /* Expand the native options list inside OS picker sheets */
  .select-custom option {
    font-size: 16px !important;
    padding: 12px 10px !important;
  }

  /* Larger touch target for the form submit button */
  .form-stack button[type="submit"] {
    min-height: 52px;
    font-size: 1rem !important;
    font-weight: 600;
  }
}

/* Reviews Auto-Slide Container */
.reviews-slider-container {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.reviews-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Base: 3 cards per view on wide screens */
.review-slide {
  flex: 0 0 calc((100% - 3rem) / 3);
  box-sizing: border-box;
  justify-content: space-between;
  min-height: 240px;
}

.review-quote {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.review-author-meta {
  border-top: 1px solid var(--border-light);
  padding-top: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Responsive: 2 cards on tablet */
@media (max-width: 992px) {
  .review-slide {
    flex: 0 0 calc((100% - 1.5rem) / 2);
  }
}

/* Responsive: 1 card per slide on phones */
@media (max-width: 640px) {
  .review-slide {
    flex: 0 0 100%;
  }
}

/* Service Card Image Styling */
.card-preview-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
  display: block;
}

/* Floating WhatsApp Button & Micro-Tooltip */
.wa-float-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-direction: row-reverse;
}

.wa-float-btn {
  width: 54px;
  height: 54px;
  background-color: #25d366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  position: relative;
  text-decoration: none;
  flex-shrink: 0;
}

.wa-float-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

.wa-icon-svg {
  fill: #ffffff;
  display: block;
}

/* Green Pulse Beacon */
.wa-online-pulse {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background-color: #22c55e;
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
}

/* Notion-style Dismissible Tooltip */
.wa-tooltip {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--brand-ink);
  white-space: nowrap;
  animation: waFadeIn 0.3s ease-out forwards;
}

.wa-tooltip-status {
  width: 6px;
  height: 6px;
  background-color: #22c55e;
  border-radius: 50%;
}

.wa-tooltip-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0 2px;
  display: flex;
  align-items: center;
}
.wa-tooltip-close:hover { color: var(--brand-ink); }

@keyframes waFadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Mobile Ergonomics (< 768px) */
@media (max-width: 768px) {
  .wa-float-container {
    bottom: 18px;
    right: 18px;
  }
  .wa-float-btn {
    width: 50px;
    height: 50px;
  }
  /* Hide the tooltip on smaller mobile screens so it does not block reading */
  .wa-tooltip {
    display: none;
  }
}

/* ======================================================= */
/* NOTION-STYLE EXPANDED FOOTER                            */
/* ======================================================= */

.site-footer {
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
  padding: 4.5rem 0 2rem;
  margin-top: 6rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(160px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col-brand {
  display: flex;
  flex-direction: column;
}

.footer-tagline {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.footer-address {
  font-style: normal;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-main);
  border-left: 2px solid var(--border-strong);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

.footer-contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.footer-contact-links a {
  color: var(--brand-ink);
  text-decoration: none;
  font-weight: 500;
}
.footer-contact-links a:hover {
  text-decoration: underline;
}

.footer-social-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-heading {
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-ink);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.86rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--brand-ink);
  text-decoration: underline;
}

.footer-bottom-strip {
  border-top: 1px solid var(--border-light);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-bottom-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
}

.compName {
  color: var(--text-dim);
}

/* Tablet & Mobile Breakpoints */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
  .footer-col-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom-strip {
    flex-direction: column;
    align-items: flex-start;
  }
}