/* ===========================
   Connect + Trade — styles.css
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Light mode (default) */
  --bg: #F5F3EF;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #EDE9E3;
  --text: #1C1917;
  --text-muted: #6B6560;
  --text-faint: #A8A29E;
  --accent: #0D7C66;
  --accent-hover: #095E4E;
  --accent-light: #E6F5F0;
  --coral: #D4613A;
  --coral-hover: #B84E2D;
  --border: #D6D3CD;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --nav-height: 72px;

  /* Contact section */
  --contact-bg: #0D7C66;
  --contact-text: #FFFFFF;
}

[data-theme="dark"] {
  --bg: #141210;
  --bg-surface: #1C1A17;
  --bg-surface-alt: #252320;
  --text: #E0DDD8;
  --text-muted: #9A9590;
  --text-faint: #5C5852;
  --accent: #3DBEA6;
  --accent-hover: #2FA88F;
  --accent-light: #1A2E28;
  --coral: #E8845E;
  --coral-hover: #D4613A;
  --border: #33302C;
  --shadow: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
  --contact-bg: #0A5E4F;
  --contact-text: #FFFFFF;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.5rem); letter-spacing: -0.01em; }
h4 { font-size: 1.125rem; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* --- Utility --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-header--hidden {
  transform: translateY(-100%);
}

.site-header--scrolled {
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-plus {
  color: var(--accent);
  font-size: 1.35em;
  line-height: 0;
  vertical-align: -0.05em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition);
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: #fff !important;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.theme-toggle:hover { color: var(--text); }
.theme-toggle svg { width: 20px; height: 20px; }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem;
}
.menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 1024px) {
  .menu-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child { border-bottom: none; }

  .nav-links a {
    display: block;
    padding: 0.875rem 0;
    font-size: 1rem;
  }

  .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
    justify-content: center;
  }
}

/* --- Hero --- */
.hero {
  padding: clamp(4rem, 10vw, 8rem) 0;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.hero-content { max-width: 100%; }

.hero-label {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero-text {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-graphic {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  background: none;
}

.hero-graphic img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-visual { display: none; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

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

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-coral {
  background: var(--coral);
  color: #fff;
}
.btn-coral:hover {
  background: var(--coral-hover);
  color: #fff;
}

/* --- Sections --- */
.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-alt {
  background: var(--bg-surface);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-label {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.65;
  margin-top: 0.75rem;
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: inherit;
}

.service-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  flex: 1;
}

.service-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.service-card .card-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.service-card:hover .card-link svg {
  transform: translateX(3px);
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* --- About / Story --- */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.story-content h2 {
  margin-bottom: 1.25rem;
}

.story-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.story-content p:last-of-type {
  margin-bottom: 0;
}

.story-visual {
  background: var(--bg-surface-alt);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.story-stat {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

.stat-icon svg { width: 20px; height: 20px; }

.stat-text strong {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.stat-text span {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .story-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Founder --- */
.founder-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.founder-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.founder-info h3 {
  margin-bottom: 0.5rem;
}

.founder-title {
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.founder-info p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.founder-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.founder-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}

.founder-links a svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 640px) {
  .founder-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .founder-photo { margin: 0 auto; }
  .founder-links { justify-content: center; }
}

/* --- Contact --- */
.contact-section {
  background: var(--contact-bg);
  color: var(--contact-text);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.contact-info h2 {
  color: var(--contact-text);
  margin-bottom: 1rem;
}

.contact-info p {
  opacity: 0.85;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  opacity: 0.85;
  font-size: 0.9375rem;
}

.contact-detail svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.7;
}

.contact-form {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(8px);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  opacity: 0.9;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.9375rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  color: #fff;
  transition: border-color var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
}

.form-group 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 d='M3 5l3 3 3-3' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.form-group select option {
  background: var(--bg);
  color: var(--text);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-submit {
  width: 100%;
  padding: 0.875rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  background: #fff;
  color: var(--contact-bg);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity var(--transition);
}

.form-submit:hover { opacity: 0.9; }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.form-feedback.error {
  display: block;
  background: rgba(255,80,80,0.15);
  color: #ffc0c0;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* --- Footer --- */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* --- Service Page Layout --- */
.page-hero {
  padding: clamp(3rem, 6vw, 5rem) 0;
  text-align: center;
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.page-content {
  padding: 0 0 clamp(3.5rem, 8vw, 6rem);
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.content-main h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.content-main h2:first-child {
  margin-top: 0;
}

.content-main p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.content-main ul {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.content-main li {
  margin-bottom: 0.5rem;
}

.content-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
}

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.sidebar-card h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.sidebar-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.sidebar-card .btn {
  width: 100%;
  justify-content: center;
}

.sidebar-features {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.sidebar-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-features li:last-child { border-bottom: none; }

.sidebar-features svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .content-sidebar {
    position: static;
  }
}

/* --- Approach / How We Work --- */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: approach;
}

.approach-step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  counter-increment: approach;
  position: relative;
}

.approach-step::before {
  content: counter(approach, decimal-leading-zero);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
  display: block;
  margin-bottom: 1rem;
}

.approach-step h3 {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.approach-step p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .approach-grid {
    grid-template-columns: 1fr;
  }
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  margin-top: 3rem;
}

.cta-banner h3 {
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Back Link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.back-link:hover { color: var(--accent); }
.back-link svg { width: 16px; height: 16px; }

/* --- Animations --- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; }
}
