/*
Theme Name: CrestFlow
Theme URI: https://cresttechservices.com
Author: Cresttech Services
Description: WordPress theme rebuilt from the Cresttech Services Lovable project, matches the original dark/teal design system (Outfit + Figtree, oklch color tokens, bordered card grid).
Version: 2.8
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: crestflow
*/

:root {
  --radius: 0.75rem;
  --background: oklch(0.16 0.015 220);
  --foreground: oklch(0.97 0.005 220);
  --surface: oklch(0.21 0.018 220);
  --surface-2: oklch(0.25 0.022 220);
  --brand: oklch(0.78 0.13 186);
  --brand-foreground: oklch(0.17 0.02 210);
  --brand-glow: oklch(0.66 0.13 208);
  --muted-foreground: oklch(0.72 0.02 220);
  --border: oklch(1 0 0 / 12%);
  --input: oklch(1 0 0 / 16%);
  --gradient-brand: linear-gradient(100deg, var(--brand) 0%, var(--brand-glow) 100%);
  --gradient-veil: linear-gradient(to right,
    color-mix(in oklab, var(--background) 92%, transparent) 0%,
    color-mix(in oklab, var(--background) 70%, transparent) 45%,
    color-mix(in oklab, var(--background) 20%, transparent) 100%);
  --shadow-glow: 0 0 0 1px color-mix(in oklab, var(--brand) 35%, transparent),
    0 18px 50px -20px color-mix(in oklab, var(--brand) 45%, transparent);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Figtree", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
button { font-family: inherit; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--brand);
}
.text-gradient-brand {
  background-image: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.surface-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  transition: border-color .32s cubic-bezier(.22,1,.36,1), transform .32s cubic-bezier(.22,1,.36,1);
}
.surface-card:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--brand) 50%, transparent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-weight: 600; font-size: .95rem; cursor: pointer; border: none;
  transition: filter .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn-hero {
  height: 48px; padding: 0 32px;
  background-image: var(--gradient-brand);
  color: var(--brand-foreground);
  box-shadow: var(--shadow-glow);
}
.btn-hero:hover { filter: brightness(1.1); }
.btn-outline {
  height: 48px; padding: 0 32px;
  border: 1px solid color-mix(in oklab, var(--brand) 50%, transparent);
  color: var(--brand); background: transparent;
}
.btn-outline:hover { background: color-mix(in oklab, var(--brand) 10%, transparent); }
.btn-pill { height: 44px; padding: 0 24px; font-size: .875rem; }

/* ---------- Header ---------- */
header.site {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  background: color-mix(in oklab, var(--background) 85%, transparent);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 72px; max-width: 80rem; margin: 0 auto; padding: 0 20px;
}
.logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-mark-img {
  width: 32px; height: 32px; border-radius: 8px; object-fit: cover;
  background: #000; flex-shrink: 0;
}
.logo-text { font-family: "Outfit"; font-weight: 600; font-size: 1rem; letter-spacing: -0.02em; white-space: nowrap; }
.footer-logo-row { display: flex; align-items: center; gap: 12px; }
nav.main { display: none; align-items: center; gap: 2px; flex-wrap: nowrap; list-style: none; margin: 0; padding: 0; }
nav.main li { list-style: none; display: inline-flex; margin: 0; padding: 0; }
nav.main a {
  border-radius: 999px; padding: 6px 10px; font-size: .75rem; font-weight: 600;
  color: #ffffff; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
nav.main a:hover { background: var(--surface-2); color: var(--brand); }
.header-actions { display: none; align-items: center; gap: 10px; }
.menu-toggle {
  display: flex; height: 40px; width: 40px; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--foreground); cursor: pointer;
}
@media (min-width: 1024px) {
  nav.main { display: flex; }
  .header-actions { display: flex; }
  .menu-toggle { display: none; }
}
@media (min-width: 1024px) and (max-width: 1180px) {
  nav.main a { padding: 6px 9px; font-size: .75rem; }
  .header-inner { gap: 10px; }
}
.mobile-nav { display: none; border-top: 1px solid var(--border); background: color-mix(in oklab, var(--background) 95%, transparent); padding: 16px 20px; backdrop-filter: blur(20px); list-style: none; margin: 0; }
.mobile-nav li { list-style: none; margin: 0; padding: 0; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; border-bottom: 1px solid var(--border); padding: 12px 0; font-size: .875rem; color: var(--foreground); }
.mobile-nav .btn { margin-top: 16px; width: 100%; }
@media (min-width: 1024px) { .mobile-nav { display: none !important; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero img.bg { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; }
.hero .veil { position: absolute; inset: 0; background-image: var(--gradient-veil); }
.hero .fade-bottom {
  position: absolute; inset-inline: 0; bottom: 0; height: 160px;
  background: linear-gradient(to top, var(--background), transparent);
}
.hero-inner {
  position: relative; max-width: 80rem; margin: 0 auto; padding: 40px 20px 24px;
  min-height: auto; display: flex; flex-direction: column; justify-content: center;
}
@media (min-width: 1024px) { .hero-inner { padding: 56px 32px 32px; min-height: auto; } }
.hero-inner h1 { margin-top: 8px; max-width: 56rem; font-size: 3rem; font-weight: 700; line-height: 1.05; }
@media (min-width: 640px) { .hero-inner h1 { font-size: 3.75rem; } }
@media (min-width: 1024px) { .hero-inner h1 { font-size: 4.5rem; } }
.hero-inner p.lead {
  margin-top: 12px; max-width: 42rem; font-size: 1.125rem; color: color-mix(in oklab, var(--foreground) 80%, transparent);
}
@media (min-width: 640px) { .hero-inner p.lead { font-size: 1.25rem; } }
.hero-actions { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero-proof { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 32px 32px; }
.hero-proof span { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--muted-foreground); }

/* ---------- Generic section ---------- */
body section { border-top: 1px solid var(--border); padding: 48px 0 !important; margin: 0 !important; width: auto !important; }
@media (min-width: 1024px) { body section { padding: 72px 0 !important; } }
body section .container,
body .page-hero .container {
  max-width: 80rem !important; margin: 0 auto !important; padding: 0 20px !important;
  width: 100% !important; box-sizing: border-box !important;
}
@media (min-width: 1024px) {
  body section .container, body .page-hero .container { padding: 0 32px !important; }
}
section h2 { margin-top: 16px; font-size: 2.25rem; font-weight: 700; }
@media (min-width: 640px) { section h2 { font-size: 3rem; } }

/* ---------- Services ---------- */
.services-head { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .services-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.services-head .lead-p { max-width: 28rem; color: var(--muted-foreground); }
.services-grid {
  margin-top: 32px; display: grid; gap: 1px; overflow: hidden;
  border-radius: 1.5rem; border: 1px solid var(--border); background: var(--border);
}
@media (min-width: 640px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: 1fr 1fr 1fr; } }
.service-card { position: relative; display: block; background: var(--surface); padding: 32px; transition: background .3s ease; }
a.service-card { cursor: pointer; }
.service-card:hover { background: var(--surface-2); }
.service-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.service-card h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.service-card .arrow { color: var(--muted-foreground); flex-shrink: 0; transition: color .2s ease; }
.service-card:hover .arrow { color: var(--brand); }
.service-card p { margin-top: 16px; font-size: .875rem; line-height: 1.6; color: var(--muted-foreground); }
.service-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.service-tags span {
  border-radius: 999px; border: 1px solid var(--border); padding: 4px 12px;
  font-size: .75rem; color: color-mix(in oklab, var(--foreground) 70%, transparent);
}
.service-card .underline {
  position: absolute; left: 32px; right: 32px; bottom: 0; height: 1px;
  background-image: var(--gradient-brand); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.service-card:hover .underline { transform: scaleX(1); }

/* ---------- Industries ---------- */
.industries { position: relative; overflow: hidden; isolation: isolate; }
.industries img.bg { position: absolute; inset: 0; height: 100%; width: 100%; object-fit: cover; opacity: .25; }
.industries .veil { position: absolute; inset: 0; background: color-mix(in oklab, var(--background) 70%, transparent); }
.industries .container { position: relative; }
.industry-list { margin-top: 28px; display: grid; gap: 12px; list-style: none; }
@media (min-width: 640px) { .industry-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .industry-list { grid-template-columns: repeat(4, 1fr); } }
.industry-list li { padding: 24px 20px; font-size: .875rem; font-weight: 500; }
.stats-grid { margin-top: 36px; display: grid; gap: 32px; border-top: 1px solid var(--border); padding-top: 28px; }
@media (min-width: 640px) { .stats-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stats-grid .num { display: block; font-size: 3rem; font-weight: 700; font-family: "Outfit"; }
.stats-grid .label { margin-top: 8px; display: block; font-size: .875rem; color: var(--muted-foreground); }

/* ---------- Process ---------- */
.process-grid { margin-top: 32px; display: grid; gap: 24px; list-style: none; }
@media (min-width: 1024px) { .process-grid { grid-template-columns: repeat(4, 1fr); } }
.process-grid li { padding: 32px; }
.process-grid .step-num { font-size: .8rem; font-weight: 700; letter-spacing: .2em; color: var(--brand); }
.process-grid h3 { margin-top: 20px; font-size: 1.5rem; font-weight: 600; }
.process-grid p { margin-top: 12px; font-size: .875rem; line-height: 1.6; color: var(--muted-foreground); }

/* ---------- Work ---------- */
.work-grid { margin-top: 32px; display: grid; gap: 24px; }
@media (min-width: 1024px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }
.work-grid > article { padding: 32px; }
.work-tag {
  display: inline-block; border-radius: 999px; background: var(--surface-2);
  padding: 4px 12px; font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .14em; color: var(--brand);
}
.work-grid h3 { margin-top: 24px; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.work-metric { margin-top: 24px; font-size: 1.875rem; font-weight: 700; font-family: "Outfit"; }

.about-grid { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--border); display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-grid .img-wrap { overflow: hidden; border-radius: 1.5rem; border: 1px solid var(--border); }
.about-grid p { margin-top: 24px; color: var(--muted-foreground); }
.about-grid p + p { margin-top: 16px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 56px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-grid > div:first-child p { margin-top: 24px; max-width: 32rem; color: var(--muted-foreground); }
.contact-info-list { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; list-style: none; }
.contact-info-list li { display: flex; align-items: center; gap: 16px; padding: 20px; }
.contact-info-list svg { color: var(--brand); flex-shrink: 0; }
.contact-info-list span, .contact-info-list a { font-size: .875rem; }

.contact-form { padding: 32px; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; border-radius: 8px; border: 1px solid var(--input);
  background: var(--surface); padding: 12px 16px; font-size: .875rem;
  color: var(--foreground); font-family: inherit;
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--muted-foreground); }
.contact-form select { margin-top: 16px; color: var(--muted-foreground); }
.contact-form textarea { margin-top: 16px; min-height: 128px; resize: vertical; }
.contact-form .btn-hero { margin-top: 24px; width: 100%; border: none; }
.form-note { margin-top: 12px; text-align: center; font-size: .75rem; color: var(--muted-foreground); }

/* WPForms dark-theme overrides, scoped so they only affect forms
   rendered inside our .contact-form container */
.contact-form .wpforms-container { margin: 0; }
.contact-form .wpforms-field-label,
.contact-form .wpforms-field-label-inline,
.contact-form .wpforms-field-sublabel { color: var(--foreground) !important; }
.contact-form .wpforms-field { padding: 0 0 16px; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form input[type="url"],
.contact-form input[type="number"],
.contact-form textarea,
.contact-form select {
  background: var(--surface) !important;
  border: 1px solid var(--input) !important;
  color: var(--foreground) !important;
  border-radius: 8px !important;
}
.contact-form .wpforms-submit-container { margin-top: 8px; }
.contact-form button[type="submit"].wpforms-submit {
  width: 100%; height: 48px; border-radius: 999px; border: none;
  background-image: var(--gradient-brand) !important;
  color: var(--brand-foreground) !important; font-weight: 600;
}
.contact-form .wpforms-error { color: #f87171 !important; }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid { max-width: 80rem; margin: 0 auto; padding: 64px 20px; display: grid; gap: 48px; }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; padding: 64px 32px; } }
.footer-grid .logo-text { font-size: 1.25rem; }
.footer-grid p { margin-top: 16px; max-width: 24rem; font-size: .875rem; color: var(--muted-foreground); }
.footer-grid h3 { font-family: "Outfit"; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--muted-foreground); }
.footer-grid ul { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; font-size: .875rem; list-style: none; }
.footer-grid a { color: color-mix(in oklab, var(--foreground) 75%, transparent); transition: color .15s ease; }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--border); padding: 24px 20px; text-align: center; font-size: .75rem; color: var(--muted-foreground); }

/* WP core alignment helpers used by index.php fallback */
.wp-content { padding-top: 160px; padding-bottom: 80px; max-width: 48rem; margin: 0 auto; }

/* ---------- Generic inner-page header (Services list, Careers, Blog) ---------- */
body .page-hero { padding: 160px 0 48px !important; border-top: none; width: auto !important; margin: 0 !important; }
.page-hero h1 { margin-top: 12px; font-size: 2.5rem; }
@media (min-width: 640px) { .page-hero h1 { font-size: 3rem; } }
.page-hero p.lead { margin-top: 16px; max-width: 42rem; color: var(--muted-foreground); font-size: 1.05rem; }

/* ---------- Services list page ---------- */
body .service-list-grid {
  display: grid !important; margin-top: 24px; gap: 20px !important; width: 100% !important;
}
@media (min-width: 640px) { body .service-list-grid { grid-template-columns: 1fr 1fr !important; } }
@media (min-width: 1024px) { body .service-list-grid { grid-template-columns: 1fr 1fr 1fr !important; } }
.service-list-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 32px; display: flex; flex-direction: column;
}
.service-list-card h3 { font-size: 1.25rem; }
.service-list-card p { margin-top: 14px; font-size: .875rem; line-height: 1.6; color: var(--muted-foreground); flex-grow: 1; }
.service-list-card .btn { margin-top: 20px; align-self: flex-start; }

/* ---------- Single service page ---------- */
.service-detail-body { max-width: 48rem; margin: 0 auto !important; padding: 0 20px 96px; width: 100% !important; box-sizing: border-box; }
.service-detail-body p { color: var(--muted-foreground); margin-bottom: 1em; line-height: 1.7; }
.service-detail-body h2, .service-detail-body h3, .service-detail-body h4 { margin-top: 1.4em; margin-bottom: .5em; color: var(--foreground); }
.service-detail-body ul, .service-detail-body ol {
  margin: 0 0 1.2em 1.4em; padding: 0;
}
.service-detail-body ul { list-style: disc; }
.service-detail-body ol { list-style: decimal; }
.service-detail-body li { color: var(--muted-foreground); line-height: 1.7; margin-bottom: .5em; }
.service-detail-body strong, .service-detail-body b { color: var(--foreground); }
.service-detail-body a:not(.btn) { color: var(--brand); text-decoration: underline; }
.service-detail-body blockquote { border-left: 3px solid var(--brand); padding-left: 16px; margin: 1.4em 0; color: var(--foreground); font-style: italic; }
.service-detail-body img { border-radius: 1rem; margin: 1.4em 0; }
.service-detail-cta { margin-top: 48px; text-align: center; }

/* ---------- Careers list page ---------- */
body .job-list { display: flex !important; flex-direction: column !important; margin-top: 24px; gap: 16px !important; width: 100% !important; }
.job-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 28px;
}
.job-card h3 { font-size: 1.1rem; }
.job-card p { margin-top: 6px; font-size: .875rem; color: var(--muted-foreground); }
.job-empty { padding: 40px; text-align: center; color: var(--muted-foreground); }

/* ---------- Single job page ---------- */
.job-detail-body { max-width: 48rem; margin: 0 auto !important; padding: 0 20px 96px; width: 100% !important; box-sizing: border-box; }
.job-detail-body p { color: var(--muted-foreground); margin-bottom: 1em; line-height: 1.7; }
.job-detail-body h2, .job-detail-body h3, .job-detail-body h4 { margin-top: 1.4em; margin-bottom: .5em; color: var(--foreground); }
.job-detail-body ul, .job-detail-body ol { margin: 0 0 1.2em 1.4em; padding: 0; }
.job-detail-body ul { list-style: disc; }
.job-detail-body ol { list-style: decimal; }
.job-detail-body li { color: var(--muted-foreground); line-height: 1.7; margin-bottom: .5em; }
.job-detail-body strong, .job-detail-body b { color: var(--foreground); }
.job-detail-body a:not(.btn) { color: var(--brand); text-decoration: underline; }

/* ---------- Blog list (home.php) ---------- */
body .blog-grid { display: grid !important; margin-top: 24px; gap: 24px !important; width: 100% !important; }
@media (min-width: 768px) { body .blog-grid { grid-template-columns: 1fr 1fr !important; } }
@media (min-width: 1024px) { body .blog-grid { grid-template-columns: 1fr 1fr 1fr !important; } }
.blog-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.blog-card img { width: 100%; height: 180px; object-fit: cover; }
.blog-card .blog-card-body { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; }
.blog-card h3 { font-size: 1.1rem; }
.blog-card .blog-date { font-size: .75rem; color: var(--brand); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.blog-card p { margin-top: 12px; font-size: .875rem; color: var(--muted-foreground); flex-grow: 1; }
.blog-card .btn { margin-top: 16px; align-self: flex-start; }
.pagination-row { margin-top: 48px; display: flex; justify-content: center; gap: 12px; }
.pagination-row a, .pagination-row span { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border); font-size: .875rem; }
.pagination-row a:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Single blog post ---------- */
.post-body { max-width: 42rem; margin: 0 auto; padding: 0 20px 96px; }
.post-body .post-meta { color: var(--brand); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-bottom: 12px; }
.post-body img { border-radius: 1rem; margin: 24px 0; }
.post-body p { color: var(--muted-foreground); line-height: 1.75; margin-bottom: 1.2em; }
.post-body h2, .post-body h3, .post-body h4 { color: var(--foreground); margin-top: 1.5em; margin-bottom: .5em; }
.post-body ul, .post-body ol { margin: 0 0 1.2em 1.4em; padding: 0; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { color: var(--muted-foreground); line-height: 1.75; margin-bottom: .5em; }
.post-body strong, .post-body b { color: var(--foreground); }
.post-body a:not(.btn) { color: var(--brand); text-decoration: underline; }
.post-body blockquote { border-left: 3px solid var(--brand); padding-left: 16px; margin: 1.4em 0; color: var(--foreground); font-style: italic; }
