/*
Theme Name: Cyanway
Description: Corporate theme for Cyanway — Commodity Trading Intelligence Platform.
Author: Cyanway Team
Version: 1.1
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.0
*/

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

:root {
  --primary-navy: #0a1f3d;
  --primary-cyan: #0fb7d4;
  --accent-cyan: #2dc8e0;
  --accent-navy: #1a3d6e;
  --dark-navy: #061429;
  --light-gray: #f6f9fc;
  --medium-gray: #5a6b85;
  --dark-gray: #1f2d44;
  --line-gray: #e3e9f2;
  --white: #ffffff;
  --header-height: 72px;
}

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

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
  font-weight: 400;
  padding-top: var(--header-height); /* compensates fixed header — no gap, no white bar */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--dark-navy) 0%, var(--primary-navy) 100%);
  color: var(--white);
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
}

/* WordPress admin bar compatibility — when logged in, WP injects a 32px bar
   AND applies html { margin-top: 32px !important }. The html margin already
   shifts our body down — we only need to push the FIXED header below the bar
   (position:fixed elements don't follow html's margin). Do NOT add body padding
   here or the gap will compound. */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 3rem;
}

/* Logo composition: icon image + HTML-styled text. Cores controladas via CSS,
   nunca destruídas por filters. */
.site-logo a {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1;
  text-decoration: none;
}

.site-logo .logo-icon {
  height: 38px;
  width: auto;
  display: block;
}

.site-logo .logo-text {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.site-logo .logo-text-cyan {
  color: var(--white);
}

.site-logo .logo-text-way {
  color: var(--primary-cyan);
}

.main-navigation ul {
  display: flex;
  gap: 0.4rem;
  list-style: none;
}

.main-navigation a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  transition: all 0.25s ease;
  display: inline-block;
}

.main-navigation a:hover {
  background-color: rgba(255,255,255,0.08);
  color: var(--primary-cyan);
}

.main-navigation a.current {
  background-color: rgba(15, 183, 212, 0.15);
  color: var(--accent-cyan);
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
}

/* ===== HERO ===== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--accent-navy) 60%, var(--primary-cyan) 100%);
  color: var(--white);
  padding: 100px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 183, 212, 0.25), transparent 60%);
  pointer-events: none;
  filter: blur(40px);
}

.hero-section .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
  padding: 0.4rem 1rem;
  background: rgba(15, 183, 212, 0.12);
  border: 1px solid rgba(15, 183, 212, 0.3);
  border-radius: 100px;
}

.hero-section h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.hero-section h1 .accent { color: var(--accent-cyan); }

.hero-section p.hero-lead {
  font-size: 1.2rem;
  margin: 0 auto 1.25rem;
  max-width: 820px;
  opacity: 0.95;
  font-weight: 400;
  line-height: 1.55;
}

.hero-section p.hero-description {
  font-size: 1rem;
  margin: 0 auto 2.5rem;
  max-width: 720px;
  opacity: 0.82;
  font-weight: 400;
}

.btn-primary {
  background: var(--primary-cyan);
  color: var(--primary-navy);
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(15, 183, 212, 0.3);
}

.btn-primary:hover {
  background: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 183, 212, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  padding: 0.9rem 2rem;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.25s ease;
  margin-left: 0.6rem;
}

.btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
}

/* ===== PAGE HEADER (inner pages) ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--accent-navy) 100%);
  color: var(--white);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.page-header .container { position: relative; }

.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 720px;
  margin: 0 auto;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
  padding: 72px 0;
}

.content-section.alt-bg {
  background-color: var(--light-gray);
}

.content-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  color: var(--primary-navy);
  margin-bottom: 1rem;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.content-section .section-intro {
  text-align: center;
  font-size: 1.1rem;
  color: var(--medium-gray);
  max-width: 740px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.content-section h3 {
  font-size: 1.4rem;
  color: var(--primary-navy);
  margin-bottom: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.content-section h4 {
  font-size: 1.1rem;
  color: var(--primary-navy);
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.content-section p { margin-bottom: 1rem; }

/* ===== GRIDS ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

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

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

/* ===== CARDS ===== */
.card {
  background: var(--white);
  padding: 1.75rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(10, 31, 61, 0.06);
  border-left: 4px solid var(--primary-cyan);
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(10, 31, 61, 0.1);
}

.card.card-accent { border-left-color: var(--accent-navy); }

.card p {
  color: var(--medium-gray);
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.7;
}

.card-numbered {
  position: relative;
  padding-top: 2.2rem;
}

.card-numbered::before {
  content: attr(data-num);
  position: absolute;
  left: 1.75rem;
  top: 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-cyan);
  letter-spacing: 0.12em;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat-card {
  text-align: center;
  padding: 1.75rem 1.25rem;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(10, 31, 61, 0.06);
  border-top: 3px solid var(--primary-cyan);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary-navy);
  display: block;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--medium-gray);
  margin-top: 0.5rem;
  font-weight: 500;
  line-height: 1.4;
}

/* ===== STAGE LIST (trading lifecycle) ===== */
.stage-list {
  margin-top: 2rem;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(10, 31, 61, 0.06);
  overflow: hidden;
}

.stage-list-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1.25rem;
  padding: 1.15rem 1.75rem;
  border-bottom: 1px solid var(--line-gray);
  align-items: center;
  transition: background 0.2s;
}

.stage-list-item:last-child { border-bottom: 0; }
.stage-list-item:hover { background: var(--light-gray); }

.stage-code {
  font-weight: 800;
  color: var(--primary-cyan);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
}

.stage-content h4 { margin-bottom: 0.2rem; font-size: 1rem; }
.stage-content p { margin: 0; font-size: 0.9rem; color: var(--medium-gray); }

/* ===== INCOTERM TAGS ===== */
.incoterm-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.25rem 0;
}

.incoterm-tag {
  padding: 0.45rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--line-gray);
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-navy);
}

.incoterm-tag.tag-fob { border-color: var(--accent-navy); color: var(--accent-navy); }
.incoterm-tag.tag-cif { border-color: var(--primary-cyan); color: var(--primary-cyan); }

/* ===== TECH STACK PILLS ===== */
.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.25rem;
  justify-content: center;
}

.tech-pill {
  padding: 0.45rem 1rem;
  background: rgba(15, 183, 212, 0.08);
  border: 1px solid rgba(15, 183, 212, 0.2);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary-navy);
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--accent-navy) 100%);
  color: var(--white);
  text-align: center;
  padding: 70px 0;
}

.cta-section h2 { color: var(--white); margin-bottom: 1rem; }

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.92;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-primary { background: var(--white); color: var(--primary-navy); }
.cta-section .btn-primary:hover { background: var(--primary-cyan); color: var(--white); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark-navy);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand .footer-logo {
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1;
}

.footer-brand .footer-logo .logo-icon {
  height: 28px;
}

.footer-brand .footer-logo .logo-text {
  font-size: 1.35rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--primary-cyan);
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.55rem; }

.site-footer a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}

.site-footer a:hover { color: var(--primary-cyan); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.82rem;
}

/* ===== CONTACT FORM ===== */
.contact-form {
  background: var(--white);
  padding: 2.25rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(10, 31, 61, 0.08);
}

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

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

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--primary-navy);
  font-size: 0.9rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line-gray);
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  font-family: inherit;
  background: var(--white);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px rgba(15, 183, 212, 0.15);
}

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

.form-feedback {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  min-height: 20px;
}

.form-feedback.success { color: #1b8755; }
.form-feedback.error { color: #c0392b; }

/* ===== INFO TABLE ===== */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(10, 31, 61, 0.06);
}

.info-table th {
  background: var(--primary-navy);
  color: var(--white);
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.92rem;
}

.info-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line-gray);
  font-size: 0.95rem;
}

.info-table tr:last-child td { border-bottom: 0; }

/* ===== TWO-COLUMN TEXT ===== */
.text-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.text-cols p {
  color: var(--dark-gray);
  line-height: 1.75;
  font-size: 0.98rem;
}

/* ===== PULL QUOTE ===== */
.pull-quote {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--primary-navy);
  line-height: 1.45;
  padding: 1.5rem 0;
  border-top: 3px solid var(--primary-cyan);
  border-bottom: 1px solid var(--line-gray);
  margin: 2rem auto;
  max-width: 820px;
  text-align: center;
}

.pull-quote-attr {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--medium-gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hero-section h1 { font-size: 2rem; }
  .hero-section p.hero-lead { font-size: 1.05rem; }
  .hero-section p.hero-description { font-size: 0.95rem; }
  .btn-secondary { margin-left: 0; margin-top: 0.6rem; }

  .menu-toggle { display: block; }

  .main-navigation {
    position: fixed;
    top: var(--header-height); left: 0; right: 0;
    background: var(--primary-navy);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }
  .main-navigation.open { display: block; }
  .main-navigation ul { flex-direction: column; gap: 0; padding: 0.75rem 0; }
  .main-navigation li { width: 100%; }
  .main-navigation a { display: block; margin: 0 0.75rem; }

  .content-section { padding: 52px 0; }
  .form-row { grid-template-columns: 1fr; }
  .text-cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-content { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .grid-2 { grid-template-columns: 1fr; }

  .stage-list-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1rem 1.25rem;
  }
}
