/* ==========================================================================
   Example Co. — Global Styles
   - Consistent, commented CSS used across all pages
   - Includes variables, layout, header, drawer, modal, utilities
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* Root variables */
:root {
  --bg: #e7ecf3;
  --card: #dbe0e8;
  --surface: #cfd5e0;
  --text: #0b0c10;
  --muted: #41484f;
  --brand: #ff7f00;
  --brand-700: #cc6500;
  --line: #b6bcc7;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Global reset + base */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  overflow-x: hidden; /* prevent sideways scroll when drawer sits off-canvas */
}

/* Backdrop that appears when menu opens */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  z-index: 59; /* below the drawer (60), above header (40) */
}

/* Drawer panel (mobile menu) */
#mobile-menu.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(84vw, 360px); /* comfy width, never too wide */
  max-width: 100%;
  transform: translateX(100%); /* fully off-canvas by default */
  transition: transform 260ms ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff; /* or your panel color */
  z-index: 60; /* above header */
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.2);
}

/* When opened, slide in */
#mobile-menu.drawer[data-open="true"] {
  transform: translateX(0);
}

/* Show/animate the backdrop when the menu is open */
html[data-menu-open="true"] .menu-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* Also lock page scroll when menu is open */
html[data-menu-open="true"] {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.6)
    ),
    url("https://images.unsplash.com/photo-1587293852726-70cdb56c2866")
      no-repeat center center fixed;
  background-size: cover;
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--brand);
  text-decoration: none;
}
p {
  color: var(--muted);
}
hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 12px 0;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 24px 0 64px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--bg);
  border: 1px solid var(--brand-700);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.06s ease, background 0.2s ease, border-color 0.2s ease,
    opacity 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--brand-700);
}
.btn:active {
  transform: translateY(0);
}
.btn.cta {
  background: var(--brand);
  color: var(--bg);
  border: none;
}

/* Main content card */
main#content.container {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px auto;
  box-shadow: var(--shadow);
  width: min(1100px, 92vw);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card.plan .price {
  font-size: 28px;
  margin: 8px 0 12px;
}
.card.plan .price span {
  font-size: 14px;
  color: var(--muted);
}

/* Layout helpers */
.hero {
  padding: 72px 0 32px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 8px;
}
.hero p {
  margin: 0 auto 18px;
  max-width: 700px;
}
.hero .actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  margin: 12px 0 6px;
}
.grid-3 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(1, 1fr);
}
@media (min-width: 720px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.prose {
  max-width: 720px;
}
.prose h2 {
  margin-top: 28px;
}
.link {
  color: var(--brand);
}

/* ========================================================================== Header + Navigation */
#site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 14px 0;
}
.brand {
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.2px;
  font-size: 20px;
}
.brand span {
  color: var(--text);
}
.primary-nav {
  display: none;
  gap: 14px;
}
.primary-nav a {
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
}
.primary-nav a:hover {
  background: var(--surface);
  color: var(--text);
}

.actions {
  display: none;
}
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.menu-toggle .icon-burger {
  display: inline;
}
.menu-toggle .icon-close {
  display: none;
}
html[data-menu-open="true"] .menu-toggle .icon-burger {
  display: none;
}
html[data-menu-open="true"] .menu-toggle .icon-close {
  display: inline;
}

@media (min-width: 900px) {
  .primary-nav {
    display: inline-flex;
  }
  .actions {
    display: inline-flex;
    gap: 10px;
  }
  .menu-toggle {
    display: none;
  }
}

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 86vw);
  height: 100dvh;
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 60;
}
.drawer .drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
}
.drawer a,
.drawer .btn {
  padding: 12px 10px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  text-align: left;
}
.drawer a:hover,
.drawer .btn:hover {
  background: var(--surface);
  border-color: var(--line);
}
.drawer[data-open="true"] {
  transform: translateX(0%);
}

/* ========================================================================== Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 50;
}
.modal-dialog {
  width: min(680px, 96vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
}
.modal .close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.contact-form {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}
.contact-form label span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

/* ========================================================================== Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--card);
}
table.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 15px;
}
.table caption {
  text-align: left;
  font-weight: 700;
  padding: 14px 16px 8px;
  color: var(--text);
}
.table thead th {
  text-align: left;
  font-weight: 700;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--surface) 70%, white);
  color: var(--text);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table tbody td {
  padding: 12px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table--striped tbody tr:nth-child(odd) td {
  background: color-mix(in srgb, var(--card) 80%, white);
}
.table tbody tr:hover td {
  background: color-mix(in srgb, var(--surface) 35%, white);
}

/* Helpers */
.t-num {
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.t-muted {
  color: var(--muted);
}
.t-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Mobile stacking pattern */
@media (max-width: 560px) {
  table.table {
    min-width: 0;
  }
  .table thead {
    display: none;
  }
  .table tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }
  .table tbody tr:last-child {
    border-bottom: 0;
  }
  .table tbody td {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 0;
  }
  .table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 600;
  }
  .t-num {
    text-align: left;
  }
}

/* ========================================================================== Footer (optional placeholder) */
/* Add a footer section here if needed */
