/* Gift Rocket documentation — publishable static site */
:root {
  --gr-primary: #7f54b3;
  --gr-primary-light: #bb98e7;
  --gr-primary-deep: #7d60a9;
  --gr-bg: #f8fafb;
  --gr-bg-alt: #e7eff2;
  --gr-surface: #ffffff;
  --gr-text: #1f2937;
  --gr-text-muted: #6b7280;
  --gr-border: #e5e7eb;
  --gr-success: #047857;
  --gr-success-bg: #ecfdf5;
  --gr-warning: #b45309;
  --gr-warning-bg: #fffbeb;
  --gr-info: #1d4ed8;
  --gr-info-bg: #eff6ff;
  --gr-radius: 10px;
  --gr-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --gr-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gr-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;
  --gr-sidebar-w: 280px;
  --gr-header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--gr-header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--gr-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--gr-text);
  background: var(--gr-bg);
}

a {
  color: var(--gr-primary-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--gr-primary);
}

code,
pre {
  font-family: var(--gr-mono);
  font-size: 0.9em;
}

code {
  background: var(--gr-bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1rem 1.25rem;
  border-radius: var(--gr-radius);
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Header */
.gr-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--gr-header-h);
  background: var(--gr-surface);
  border-bottom: 1px solid var(--gr-border);
  box-shadow: var(--gr-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  gap: 1rem;
}

.gr-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--gr-text);
  text-decoration: none;
}

.gr-brand:hover {
  color: var(--gr-primary);
}

.gr-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gr-primary) 0%, var(--gr-primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.gr-header-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gr-header-nav a {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gr-text-muted);
}

.gr-header-nav a:hover,
.gr-header-nav a.is-active {
  background: var(--gr-bg-alt);
  color: var(--gr-primary-deep);
}

.gr-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gr-border);
  border-radius: 6px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 1.25rem;
}

/* Layout */
.gr-layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - var(--gr-header-h));
}

.gr-sidebar {
  width: var(--gr-sidebar-w);
  flex-shrink: 0;
  padding: 1.25rem 1rem 2rem;
  background: var(--gr-surface);
  border-right: 1px solid var(--gr-border);
  position: sticky;
  top: var(--gr-header-h);
  align-self: flex-start;
  max-height: calc(100vh - var(--gr-header-h));
  overflow-y: auto;
}

.gr-sidebar h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gr-text-muted);
  margin: 1.25rem 0 0.5rem;
  padding: 0 0.5rem;
}

.gr-sidebar h2:first-child {
  margin-top: 0;
}

.gr-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gr-sidebar li a {
  display: block;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--gr-text);
  text-decoration: none;
}

.gr-sidebar li a:hover {
  background: var(--gr-bg);
  color: var(--gr-primary-deep);
}

.gr-main {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem 4rem;
  background: var(--gr-surface);
}

/* Home hero */
.gr-hero {
  max-width: 720px;
  padding: 3rem 0 2rem;
}

.gr-hero h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--gr-text);
}

.gr-hero .lead {
  font-size: 1.2rem;
  color: var(--gr-text-muted);
  margin-bottom: 2rem;
}

.gr-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.gr-card {
  border: 1px solid var(--gr-border);
  border-radius: var(--gr-radius);
  padding: 1.5rem;
  background: var(--gr-bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.gr-card:hover {
  border-color: var(--gr-primary-light);
  box-shadow: 0 4px 12px rgba(127, 84, 179, 0.12);
}

.gr-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--gr-primary-deep);
}

.gr-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gr-text-muted);
}

/* Content typography */
.gr-main h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.gr-main h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gr-border);
}

.gr-main h2:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.gr-main h3 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--gr-primary-deep);
}

.gr-main h4 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.4rem;
}

.gr-main p,
.gr-main ul,
.gr-main ol {
  margin: 0 0 1rem;
}

.gr-main ul,
.gr-main ol {
  padding-left: 1.5rem;
}

.gr-main li {
  margin-bottom: 0.35rem;
}

.gr-meta {
  color: var(--gr-text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Callouts */
.gr-callout {
  border-radius: var(--gr-radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-left: 4px solid;
}

.gr-callout-title {
  font-weight: 700;
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.gr-callout p:last-child {
  margin-bottom: 0;
}

.gr-callout-tip {
  background: var(--gr-success-bg);
  border-color: var(--gr-success);
}

.gr-callout-warn {
  background: var(--gr-warning-bg);
  border-color: var(--gr-warning);
}

.gr-callout-info {
  background: var(--gr-info-bg);
  border-color: var(--gr-info);
}

/* Tables */
.gr-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

table.gr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.gr-table th,
table.gr-table td {
  border: 1px solid var(--gr-border);
  padding: 0.6rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

table.gr-table th {
  background: var(--gr-bg);
  font-weight: 600;
}

table.gr-table tr:nth-child(even) td {
  background: #fafafa;
}

/* Steps */
.gr-steps {
  counter-reset: gr-step;
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}

.gr-steps > li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
  counter-increment: gr-step;
}

.gr-steps > li::before {
  content: counter(gr-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--gr-primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.gr-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gr-border);
  font-size: 0.9rem;
  color: var(--gr-text-muted);
}

/* Badge */
.gr-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.gr-badge-free {
  background: var(--gr-bg-alt);
  color: var(--gr-primary-deep);
}

.gr-badge-pro {
  background: var(--gr-primary);
  color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .gr-menu-toggle {
    display: block;
  }

  .gr-layout {
    flex-direction: column;
  }

  .gr-sidebar {
    display: none;
    position: fixed;
    top: var(--gr-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 320px;
    z-index: 90;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  }

  .gr-sidebar.is-open {
    display: block;
  }

  .gr-main {
    padding: 1.5rem 1.25rem 3rem;
  }

  .gr-header-nav {
    display: none;
  }
}

@media print {
  .gr-header,
  .gr-sidebar,
  .gr-menu-toggle {
    display: none !important;
  }

  .gr-main {
    padding: 0;
  }
}
