/* -----------------------------------------------------
   TeeMail Site Styles — Clean + Professional
----------------------------------------------------- */

:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --bg: #ffffff;
  --panel: #f8fafc;
  --line: #e2e8f0;
  --brand: #059669;
  --brand-2: #10b981;
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ---------- Layout Utilities ---------- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 48px 0;
  }
}

.h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
}

.h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
}

.p {
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  border: 0;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s ease;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.btn-ghost {
  background: #fff;
  border: 2px solid #a7f3d0;
  color: var(--brand);
}

.btn-ghost:hover {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

#brand {
  height: 90px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.brand:hover #brand {
  opacity: 0.85;
}

/* ---------- Floating Page Nav ---------- */
.page-nav {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid #d1fae5;
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
  transition: all 0.3s ease;
}

.page-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.page-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.page-nav a:hover {
  background: #f0fdf4;
  color: #065f46;
}

.page-nav a.active {
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
}

.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: none;
}

.page-nav.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

@media (max-width: 768px) {
  .page-nav {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #fff, #ecfdf5);
  position: relative;
  overflow: hidden;
}

.hero .ring {
  position: absolute;
  right: -150px;
  top: -150px;
  width: 420px;
  height: 420px;
  background: rgba(16, 185, 129, 0.12);
  filter: blur(60px);
  border-radius: 50%;
  pointer-events: none;
}

/* ---------- Grid + Cards ---------- */
.grid {
  display: grid;
  gap: 20px;
}

.cols-3 {
  grid-template-columns: repeat(1, 1fr);
}

.cols-4 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
  .cols-3,
  .cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  transition: 0.2s box-shadow, 0.2s transform;
}

.card:hover {
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.1);
  transform: translateY(-4px);
}

/* ---------- Misc Elements ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  font-weight: 800;
  font-size: 24px;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

@media (max-width: 768px) {
  .panel {
    padding: 20px;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: #0b1220;
  color: #cbd5e1;
}

.footer a {
  color: #a7f3d0;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #6ee7b7;
}

.footer .grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

@media (min-width: 768px) {
  .footer .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer .h3 {
  margin-bottom: 16px;
}

.footer > div > div {
  margin-bottom: 8px;
}

/* ---------- Modals ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  z-index: 60;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(680px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal h4 {
  margin: 20px 0 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.modal ul {
  margin: 8px 0;
  padding-left: 24px;
}

.modal li {
  margin: 4px 0;
}

/* ---------- Form Elements ---------- */
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.small {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  transition: all 0.2s ease;
}

input:focus,
select:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 6px;
}

/* ---------- Responsive Utilities ---------- */
@media (max-width: 640px) {
  .h1 {
    font-size: 32px;
  }
  
  .h2 {
    font-size: 28px;
  }
  
  .btn {
    width: 100%;
  }
  
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }
}
