/* ============================================
   Ripple Labs — Global Styles
   Matched to: Sierra.ai aesthetic
   - gtAmerica → Inter (closest free match)
   - font-weight 400 headings (thin & elegant)
   - Green #006838 (Sierra exact)
   - Transparent nav over hero
   - Massive whitespace, clean centered typography
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --black: #222222;
  --dark: #302e2d;
  --body: #302e2d;
  --muted: #6b7280;
  --light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --bg-light: #f8f8f7;
  --bg-white: #ffffff;

  --green: #006838;
  --green-dark: #005a30;
  --green-light: #d1fae5;
  --green-bg: #ecfdf5;

  --teal: #0f766e;
  --blue: #2563eb;
  --coral: #c2410c;
  --red: #ef4444;
  --orange: #f59e0b;

  --card-green: linear-gradient(145deg, #065f46, #059669);
  --card-teal: linear-gradient(145deg, #0f766e, #14b8a6);
  --card-coral: linear-gradient(145deg, #9a3412, #dc6843);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);

  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-white);
  color: var(--body);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* --- Typography (Sierra-matched: weight 400, tight tracking) --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--black);
  line-height: 1.15;
}

h1 {
  font-size: 4rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h2 {
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

h3 {
  font-size: 1.5rem;
  font-weight: 400;
}

h4 {
  font-size: 1.05rem;
  font-weight: 500;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 720px;
}

.section {
  padding: 120px 0;
}

/* --- Navbar (Sierra-style: transparent → white on scroll) --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

/* For pages that don't have a hero image — start white */
.navbar--solid {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar__logo {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

/* When navbar is over hero image, make links white */
.navbar--hero .navbar__logo { color: #fff; }
.navbar--hero .navbar__links a { color: rgba(255,255,255,0.7); }
.navbar--hero .navbar__links a:hover,
.navbar--hero .navbar__links a.active { color: #fff; }
.navbar--hero .navbar__mobile-toggle span { background: #fff; }

/* When scrolled, revert to dark */
.navbar--hero.scrolled .navbar__logo { color: var(--black); }
.navbar--hero.scrolled .navbar__links a { color: var(--muted); }
.navbar--hero.scrolled .navbar__links a:hover,
.navbar--hero.scrolled .navbar__links a.active { color: var(--black); }
.navbar--hero.scrolled .navbar__mobile-toggle span { background: var(--black); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.navbar__links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
  transition: color 0.2s ease;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--black);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.navbar__mobile-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--black);
  transition: var(--transition);
}

.navbar__mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
}

.navbar__mobile-menu.open { display: block; }

.navbar__mobile-menu a {
  display: block;
  padding: 12px 0;
  color: var(--body);
  font-size: 1rem;
  font-weight: 400;
}

/* --- Buttons (Sierra-matched: pill, dark green, weight 400) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 400;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
}

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

.btn--primary:hover {
  background: var(--green-dark);
}

.btn--dark {
  background: var(--black);
  color: #fff;
}

.btn--dark:hover {
  background: #333;
}

.btn--secondary {
  background: transparent;
  color: var(--body);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  border-color: var(--black);
  color: var(--black);
}

.btn--outline {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  background: var(--bg-light);
}

.btn--white {
  background: #fff;
  color: var(--black);
}

.btn--white:hover {
  background: #f5f5f5;
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  padding: 8px 0;
  font-weight: 400;
}

.btn--ghost:hover { color: var(--black); }

.btn--lg {
  padding: 14px 32px;
  font-size: 0.92rem;
}

.btn--sm {
  padding: 8px 18px;
  font-size: 0.82rem;
}

.btn--full { width: 100%; }

/* --- Cards --- */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

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

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--body);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background: var(--bg-white);
  color: var(--black);
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.1);
}

.form-input::placeholder { color: var(--light); }

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* --- Grid --- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Badges (Sierra-style: pill, small, outlined or filled) --- */
.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--body);
  background: var(--bg-white);
}

.badge--green {
  background: var(--green);
  color: #fff;
  border-color: transparent;
}

.badge--green-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.badge--cold {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: transparent;
}

.badge--warm {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
  border-color: transparent;
}

.badge--hot {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: transparent;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: var(--black);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast--success { border-left: 3px solid var(--green); }
.toast--error { border-left: 3px solid var(--red); }

/* --- Loader --- */
.loader {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.7s ease infinite;
}

.loader--dark {
  border-color: rgba(0,0,0,0.1);
  border-top-color: var(--black);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- Footer (Sierra-style: white bg, clean links) --- */
.footer {
  background: var(--bg-white);
  color: var(--muted);
  padding: 80px 0 32px;
  border-top: 1px solid var(--border);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__brand { max-width: 280px; }

.footer__brand p {
  font-size: 0.88rem;
  margin-top: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.footer__heading {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 20px;
}

.footer__link {
  display: block;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--muted);
  transition: var(--transition);
}

.footer__link:hover { color: var(--black); }

.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--light);
}

.footer__legal a {
  color: var(--muted);
  margin-left: 20px;
}

.footer__legal a:hover { color: var(--black); }

/* --- Table --- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table { width: 100%; border-collapse: collapse; }

th, td {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.88rem;
}

th {
  background: var(--bg-light);
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td { border-top: 1px solid var(--border); }
tr:hover td { background: rgba(0, 104, 56, 0.02); }

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
  align-items: center;
  justify-content: center;
}

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

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: 40px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  .section { padding: 80px 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .navbar__links { display: none; }
  .navbar__actions .btn--secondary { display: none; }
  .navbar__mobile-toggle { display: flex; }
  .footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
  .container { padding: 0 20px; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.5rem; }
  .card { padding: 24px; }
}
