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

:root {
  --sidebar-w: 260px;
  --notion-text: #37352F;
  --notion-text-secondary: #787774;
  --notion-text-tertiary: #9B9A97;
  --notion-bg: #FFFFFF;
  --notion-bg-secondary: #F7F6F3;
  --notion-bg-tertiary: #F1F1EF;
  --notion-border: #E3E2DE;
  --notion-hover: #EBEBEA;
  --notion-accent: #2383E2;
  --notion-accent-hover: #1B6EC2;
  --notion-accent-light: #E8F0FE;
  --notion-green: #0F7B6C;
  --notion-green-bg: #DBEDDB;
  --notion-orange: #D9730D;
  --notion-orange-bg: #FADEC9;
  --notion-red: #E03E3E;
  --notion-red-bg: #FBE4E4;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--notion-text);
  background: var(--notion-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Sidebar ─────────────────────────────────────────── */
#sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--notion-bg-secondary);
  border-right: 1px solid var(--notion-border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.3s ease;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
}

.logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--notion-text);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: var(--notion-text-secondary);
  display: flex;
  align-items: center;
  transition: background var(--ease), color var(--ease);
}

.sidebar-toggle:hover {
  background: var(--notion-hover);
  color: var(--notion-text);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px 0;
  gap: 2px;
  overflow-y: auto;
  flex: 1;
}

.sidebar-footer {
  padding: 12px 16px;
}

.sidebar-email {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--notion-text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  padding: 6px 0;
  transition: color var(--ease);
}

.sidebar-email:hover {
  color: var(--notion-text);
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--notion-border); border-radius: 4px; }

.sidebar-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--notion-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background var(--ease), color var(--ease);
}

.sidebar-nav a:hover {
  background: var(--notion-hover);
  color: var(--notion-text);
}

.sidebar-nav a.active {
  background: var(--notion-hover);
  color: var(--notion-text);
  font-weight: 600;
}

/* Sidebar dropdown (mobile only) */
.sidebar-dropdown { position: relative; }

.sidebar-dropdown > a { display: flex; align-items: center; justify-content: space-between; }

.sidebar-chevron {
  display: none;
  width: 16px; height: 16px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar-submenu {
  display: none;
  flex-direction: column;
  padding: 2px 0 4px 16px;
  gap: 1px;
}

.sidebar-submenu a {
  font-size: 0.82rem;
  padding: 5px 12px;
  color: var(--notion-text-tertiary);
  font-weight: 400;
}

.sidebar-submenu a:hover {
  color: var(--notion-text-secondary);
}

@media (max-width: 860px) {
  .sidebar-chevron { display: block; }

  .sidebar-dropdown.open > a .sidebar-chevron {
    transform: rotate(90deg);
  }

  .sidebar-dropdown.open > .sidebar-submenu {
    display: flex;
  }
}

/* Collapsed state */
body.sidebar-collapsed #sidebar {
  transform: translateX(calc(-1 * var(--sidebar-w)));
}

body.sidebar-collapsed #main-content {
  margin-left: 0;
}

body.sidebar-collapsed .expand-btn {
  opacity: 1;
  pointer-events: auto;
}

.expand-btn {
  position: fixed;
  left: 12px;
  top: 14px;
  z-index: 150;
  background: var(--notion-bg);
  border: 1px solid var(--notion-border);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background var(--ease);
  color: var(--notion-text-secondary);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.expand-btn:hover {
  background: var(--notion-hover);
  color: var(--notion-text);
}

/* ── Main Content ────────────────────────────────────── */
#main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.section {
  padding: 80px 48px;
  max-width: 960px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--notion-text-secondary);
  font-size: 1rem;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--notion-border);
  margin: 0 48px;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Home Section ────────────────────────────────────── */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  padding-bottom: 120px;
  text-align: center;
  max-width: 100%;
}

.home-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-bottom: 40px;
  max-width: 620px;
}

.prompt-container {
  width: 100%;
  max-width: 680px;
  position: relative;
}

.prompt-box {
  width: 100%;
  background: var(--notion-bg);
  border: 1px solid var(--notion-border);
  border-radius: 16px;
  padding: 20px 60px 20px 24px;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--notion-text);
  outline: none;
  resize: none;
  min-height: 112px;
  max-height: 240px;
  line-height: 1.5;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.prompt-box::placeholder {
  color: var(--notion-text-tertiary);
}

.prompt-box:focus {
  border-color: var(--notion-accent);
  box-shadow: 0 0 0 2px var(--notion-accent-light);
}

.prompt-send {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: var(--notion-text);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease), transform 0.1s ease;
}

.prompt-send:hover {
  background: #555350;
}

.prompt-send:active {
  transform: scale(0.94);
}

/* ── About Section ───────────────────────────────────── */
#about .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.about-card {
  padding: 24px;
  border-radius: 8px;
  background: var(--notion-bg-secondary);
}

.about-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.about-card p {
  font-size: 0.875rem;
  color: var(--notion-text-secondary);
  line-height: 1.6;
}

.about-intro {
  font-size: 1.05rem;
  color: var(--notion-text-secondary);
  max-width: 720px;
  line-height: 1.75;
}

/* ── Two-Column Section (Services / Products) ────────── */
.two-col {
  display: flex;
  gap: 40px;
  position: relative;
}

.sub-nav {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
  align-self: flex-start;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding-right: 8px;
}

.sub-nav::-webkit-scrollbar { width: 4px; }
.sub-nav::-webkit-scrollbar-thumb { background: var(--notion-border); border-radius: 4px; }

.sub-nav-item {
  display: block;
  padding: 7px 12px;
  color: var(--notion-text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  border-left: 2px solid transparent;
  margin-bottom: 1px;
  transition: all var(--ease);
  cursor: pointer;
}

.sub-nav-item:hover {
  background: var(--notion-hover);
  color: var(--notion-text);
}

.sub-nav-item.active {
  background: var(--notion-hover);
  color: var(--notion-text);
  border-left-color: var(--notion-accent);
  font-weight: 600;
}

.sub-content {
  flex: 1;
  min-width: 0;
}

.content-card {
  padding: 32px 0;
  border-bottom: 1px solid var(--notion-border);
}

.content-card:first-child { padding-top: 0; }
.content-card:last-child { border-bottom: none; }

.content-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.content-card p {
  color: var(--notion-text-secondary);
  font-size: 0.925rem;
  line-height: 1.75;
}

.content-card .tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 4px;
  margin-bottom: 10px;
}

.tag-service { background: var(--notion-accent-light); color: var(--notion-accent); }
.tag-product { background: var(--notion-green-bg); color: var(--notion-green); }

/* ── Why Choose Us ───────────────────────────────────── */
.reasons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.reason-card {
  padding: 28px;
  border-radius: 8px;
  border: 1px solid var(--notion-border);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.reason-card:hover {
  border-color: var(--notion-accent);
  box-shadow: 0 2px 12px rgba(35,131,226,0.08);
}

.reason-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--notion-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.reason-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.reason-card p {
  font-size: 0.875rem;
  color: var(--notion-text-secondary);
  line-height: 1.7;
}

/* ── Contact Section ─────────────────────────────────── */
.contact-form {
  max-width: 560px;
}

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

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

.form-group label .optional {
  color: var(--notion-text-tertiary);
  font-weight: 400;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--notion-border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--notion-text);
  background: var(--notion-bg);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--notion-accent);
  box-shadow: 0 0 0 2px var(--notion-accent-light);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--ease), transform 0.1s ease;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--notion-accent);
  color: #fff;
}

.btn-primary:hover { background: var(--notion-accent-hover); }

.btn-secondary {
  background: var(--notion-bg-secondary);
  color: var(--notion-text);
  border: 1px solid var(--notion-border);
}

.btn-secondary:hover { background: var(--notion-hover); }

.form-status {
  margin-top: 12px;
  font-size: 0.85rem;
  display: none;
}

.form-status.success { display: block; color: var(--notion-green); }
.form-status.error { display: block; color: var(--notion-red); }

/* ── Modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--notion-bg);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.16);
  overflow: hidden;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 20px 24px 0;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-header p {
  font-size: 0.85rem;
  color: var(--notion-text-secondary);
  margin-top: 4px;
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--notion-border);
}

/* ── Footer ───────────────────────────────────────────── */
footer {
  padding: 32px 48px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--notion-text-tertiary);
  border-top: 1px solid var(--notion-border);
}

/* ── Mobile Header ───────────────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: var(--notion-bg);
  border-bottom: 1px solid var(--notion-border);
  z-index: 150;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.mobile-header .logo { font-size: 0.95rem; }

.mobile-contact-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 4px;
  color: var(--notion-text-secondary);
  transition: color var(--ease);
}

.mobile-contact-btn:hover {
  color: var(--notion-text);
}

.mobile-menu-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--notion-text-secondary);
  display: flex;
  align-items: center;
}

#sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 190;
  display: none;
}

#sidebar-overlay.open { display: block; }

/* ── Toast ────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--notion-green-bg); color: var(--notion-green); }
.toast.error { background: var(--notion-red-bg); color: var(--notion-red); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 860px) {
  #sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
  }

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

  #main-content {
    margin-left: 0;
  }

  body.sidebar-collapsed #main-content { margin-left: 0; }
  .expand-btn { display: none !important; }

  .mobile-header { display: flex; }

  .section { padding: 80px 24px 48px; }
  #home { padding: 80px 24px 48px; }

  .home-title { font-size: 1.75rem; }

  .two-col {
    flex-direction: column;
    gap: 0;
  }

  .sub-nav {
    width: 100%;
    position: sticky;
    top: 52px;
    display: flex;
    overflow-x: auto;
    max-height: none;
    gap: 0;
    background: var(--notion-bg);
    border-bottom: 1px solid var(--notion-border);
    z-index: 10;
    padding: 8px 4px;
    margin-bottom: 16px;
  }

  .sub-nav::-webkit-scrollbar { display: none; }

  .sub-nav-item {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
  }

  .sub-nav-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--notion-accent);
  }

  #services-nav, #products-nav { display: none; }

  #about .about-grid { grid-template-columns: 1fr; }
  .reasons-grid { grid-template-columns: 1fr; }

  .section-header h2 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .home-title { font-size: 1.4rem; }
  .section { padding: 72px 16px 40px; }
  #home { padding: 72px 16px 40px; }
}
