/* CalmCore Brand Styles - Chrome Extension Landing Page */

:root {
  --fg: #111827;
  --muted: #6b7280;
  --bg: #f7fafc;
  --brand: #0ea5a4;
  --brand-hover: #0d9488;
  --accent: #f0fdfa;
  --border: #e5e7eb;
  --shadow: rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--brand);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px;
}

/* Header */
header {
  background: var(--brand);
  color: #fff;
  padding: 28px 0;
  margin-bottom: 18px;
}

header .wrap {
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 700;
}

.subtitle {
  margin: 0;
  opacity: 0.9;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

/* Navigation */
.nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.nav a {
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav a:focus {
  background-color: rgba(255, 255, 255, 0.2);
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Main Content */
main {
  margin-bottom: 40px;
}

section {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 6px 24px var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border);
}

h2 {
  font-size: 20px;
  margin: 0 0 16px;
  color: var(--fg);
  font-weight: 600;
}

h3 {
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--fg);
  font-weight: 600;
}

p {
  margin: 0 0 16px;
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
  line-height: 1.6;
}

li:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

/* Links */
a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

/* Address element styling */
address {
  font-style: normal;
  margin: 16px 0;
}

address p {
  margin-bottom: 8px;
}

/* Details element styling */
details {
  margin: 20px 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border);
}

summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 12px;
}

summary:hover {
  color: var(--brand-hover);
}

details[open] summary {
  margin-bottom: 16px;
}

/* Footer */
footer {
  text-align: center;
  color: var(--muted);
  padding: 20px 0 32px;
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}


/* Responsive Design */
@media (max-width: 768px) {
  .wrap {
    padding: 20px;
  }
  
  header .wrap {
    padding: 0 20px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  section {
    padding: 20px;
    margin-bottom: 16px;
  }
  
  h2 {
    font-size: 18px;
  }
  
  .nav {
    gap: 10px;
  }
  
  .nav a {
    padding: 6px 12px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 16px;
  }
  
  header .wrap {
    padding: 0 16px;
  }
  
  h1 {
    font-size: 22px;
  }
  
  section {
    padding: 16px;
  }
}

/* Interactive Elements */
button {
  background: var(--brand);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Form Elements */
input, textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--muted);
}

.mb-0 {
  margin-bottom: 0;
}

.mt-2 {
  margin-top: 16px;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--brand);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.message {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}

.message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Chrome Extension Specific Styles */
.extension-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--brand);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}

.feature-list {
  list-style: none;
  padding-left: 0;
}

.feature-list li {
  padding-left: 24px;
  position: relative;
  margin-bottom: 12px;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Contact Form Container */
.contact-form-container {
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px var(--shadow);
}

.contact-form-container iframe {
  border: none;
  border-radius: 12px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --fg: #000000;
    --muted: #333333;
    --bg: #ffffff;
    --brand: #0066cc;
    --border: #000000;
  }
}