/*
Theme Name: Escala Digital
Theme URI: https://escaladigital.com
Author: Escala Digital
Description: Custom theme for Escala Digital — managed IT and digital services. Dark, type-led design.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: escala-digital
*/

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

/* ---------- Variables ---------- */
:root {
  --bg: #f4f5f1;
  --bg-alt: #e9ebe3;
  --panel: #ffffff;
  --border: #dcdfd3;
  --border-soft: #e6e8de;
  --accent: #baff29;
  --accent-ink: #1b2124;
  --ink: #1b2124;
  --muted: #55606a;
  --muted-2: #78826f;
  --copy: #3c443d;
  --radius: 8px;
  --radius-sm: 4px;
  --container: 1120px;
  --font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Dark navy bands: header, alt sections, marquee, footer ---------- */
.site-header,
.section--alt,
.marquee-section,
.site-footer {
  --bg: #131b26;
  --bg-alt: #131b26;
  --panel: #212b3a;
  --border: #2e3a4c;
  --border-soft: #263040;
  --ink: #ededed;
  --muted: #9aa3a8;
  --muted-2: #6f787d;
  --copy: #ccc;
}

/* No lime text on the light body — only inside the dark bands above */
.section-heading--accent,
.accordion-head h2,
.price-card h3 {
  color: var(--ink);
}
.section--alt .section-heading--accent,
.marquee-section .section-heading--accent,
.site-footer .section-heading--accent {
  color: var(--accent);
}

/* ---------- Base ---------- */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

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

h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; }

.section { padding: 64px 0; border-bottom: 1px solid var(--border-soft); }
.section:last-of-type { border-bottom: none; }
.section--alt { background: var(--bg-alt); }
.section--tint { background: #fff3ea0d; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

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

.btn-outline {
  border-color: #555;
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-outline-accent {
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 8px 18px;
  font-size: 13px;
}
.btn-outline-accent:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}
.site-logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
}
.site-logo a { color: var(--ink); }

.primary-nav ul {
  display: flex;
  gap: 28px;
  align-items: center;
}
.primary-nav a {
  font-size: 14px;
  color: #cfd4d6;
  transition: color .15s ease;
}
.primary-nav a:hover, .primary-nav a.is-active { color: var(--accent); }

.header-cta { display: flex; align-items: center; gap: 16px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  padding: 6px;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero (Home) ---------- */
.hero {
  padding: 64px 0 48px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: center;
}

/* ---------- Text + image split (AI, Who we work with) ---------- */
.split {
  display: flex;
  align-items: center;
  gap: 48px;
}
.split > div:first-child { flex: 1 1 380px; }
.split--reverse { flex-direction: row-reverse; }
.image-placeholder {
  flex: 1 1 320px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: repeating-linear-gradient(135deg, var(--panel) 0 2px, var(--bg-alt) 2px 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.6;
  padding: 20px;
  overflow: hidden;
}
.image-placeholder:has(img) {
  padding: 0;
  background: none;
}
.image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- AI tool tiles ---------- */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #131b26;
  color: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pill-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.tool-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 32px;
}
.tool-tile {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.tool-tile--dashed {
  border-style: dashed;
  color: var(--muted);
  font-weight: 500;
}
.tool-tile--stack {
  background: #131b26;
  border-color: transparent;
  flex-direction: column;
  gap: 6px;
}
.tool-tile--stack strong { color: var(--accent); font-size: 13px; }
.tool-tile--stack span { color: #9aa3a8; font-size: 10px; letter-spacing: .03em; }
.hero__headline {
  font-size: 44px;
  line-height: 1.1;
}
.hero__headline .letter-spin {
  display: inline-block;
  backface-visibility: hidden;
  animation: escala-letter-spin 1.3s cubic-bezier(.22,.85,.3,1) both;
}
@keyframes escala-letter-spin {
  from { transform: perspective(400px) rotateX(-720deg); opacity: 0; }
  55%  { opacity: 1; }
  to   { transform: perspective(400px) rotateX(0deg); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__headline .letter-spin { animation: none; }
}
.accent { color: var(--accent); }
.section-heading--accent { color: var(--accent); }
.hero__sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 460px;
  margin-top: 18px;
}
.hero__actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero__visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Two-pillar / promise block ---------- */
.pillars {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.pillar { background: var(--bg); padding: 28px; }
.pillar h3 { font-size: 17px; margin-bottom: 8px; }
.pillar p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pillar-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  padding: 0 18px;
}

/* ---------- Services marquee ---------- */
.marquee-section {
  padding: 20px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: 14px;
  animation: marquee-scroll 32s linear infinite;
}
.marquee__item {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: .02em;
}
.marquee__dot {
  color: var(--accent);
  font-size: 13px;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- Our work ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.work-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  transition: border-color .15s ease, transform .15s ease;
}
.work-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.work-card__bar {
  display: flex;
  gap: 5px;
  padding: 8px 10px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-soft);
}
.work-card__bar span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.work-card__shot {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
}
.work-card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.work-card__name {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.work-card__name span:last-child { color: var(--accent); }

/* ---------- Generic page hero ---------- */
.page-hero {
  padding: 56px 0 40px;
  text-align: center;
}
.page-hero h1 { font-size: 32px; }
.page-hero p { font-size: 14px; color: var(--muted); margin-top: 10px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Services accordion ---------- */
.accordion-item {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0;
}
.accordion-item:last-child { padding-bottom: 8px; }
.accordion-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  color: inherit;
}
.accordion-head h2 { font-size: 20px; color: var(--accent); }
.accordion-state { font-size: 11px; color: var(--muted-2); }
.accordion-desc { font-size: 13px; color: var(--muted); margin-top: 10px; max-width: 620px; line-height: 1.6; }

.accordion-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.accordion-body[hidden] { display: none; }

.service-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 12px;
  color: var(--copy);
  background: var(--panel);
}

.accordion-note { font-size: 12px; color: var(--muted-2); margin-top: 14px; }

/* ---------- About / pull quote ---------- */
.pullquote {
  padding: 56px 0 36px;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}
.pullquote blockquote {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.35;
  max-width: 680px;
  margin: 14px auto 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border-soft);
}
.about-portrait {
  border-right: 1px solid var(--border-soft);
  min-height: 220px;
  background: repeating-linear-gradient(135deg, #262d31 0 2px, #232a2e 2px 26px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  font-size: 11px;
}
.about-bio { padding: 32px; font-size: 14px; line-height: 1.75; color: var(--copy); }

.mission { padding: 40px 0; }
.mission p { font-size: 15px; color: var(--copy); line-height: 1.7; max-width: 680px; }

/* ---------- CTA band ---------- */
.cta-band {
  padding: 44px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-band h3 { font-size: 18px; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  background: var(--panel);
}
.price-card h3 { font-size: 18px; color: var(--accent); }
.price-card .price-tag { font-size: 12px; color: var(--muted-2); margin: 10px 0 18px; letter-spacing: .04em; }
.price-card ul { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.price-card li { font-size: 13px; color: var(--copy); padding-left: 18px; position: relative; }
.price-card li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.contact-info { font-size: 14px; color: var(--muted); line-height: 1.9; }
.contact-info strong { color: var(--ink); display: block; margin-bottom: 4px; }
.contact-info .info-block { margin-bottom: 22px; }

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .03em;
}
.form-field input,
.form-field textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field textarea { min-height: 140px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-notice {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  margin-bottom: 20px;
}
.form-notice--success { background: rgba(186,255,41,.1); border: 1px solid var(--accent); color: var(--accent); }
.form-notice--error { background: rgba(255,90,31,.1); border: 1px solid #ff5a1f; color: #ff8a5f; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-alt);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
.footer-brand p { font-size: 13px; color: var(--muted); margin-top: 10px; max-width: 320px; line-height: 1.6; }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13px; color: #cfd4d6; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 20px;
  font-size: 12px;
  color: var(--muted-2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero { grid-template-columns: 1fr; }
  .split, .split--reverse { flex-direction: column; }
  .pillars { grid-template-columns: 1fr; }
  .pillar-plus { padding: 10px 0; }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { border-right: none; border-bottom: 1px solid var(--border-soft); min-height: 160px; }
  .accordion-body { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero__headline { font-size: 32px; }
}

@media (max-width: 860px) {
  .site-header--open .primary-nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
    padding: 8px 24px 20px;
  }
  .site-header--open .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 16px; }
}
