/*
Theme Name: Ancalle
Theme URI: https://www.ca-eng.com/
Author: Ancalle Engineers
Description: One-page theme for Ancalle Engineers. Every section's content comes from its WordPress page (Home, About, Casiano Ancalle, Services, Clients, Projects, Contact), shown in that order on the front page; the old page addresses redirect to their sections.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: ancalle
*/

/* Ancalle Engineers — alternative design preview */
:root {
  --ink: #0b1f33;
  --ink-2: #33475b;
  --muted: #62748a;
  --line: #dde5ee;
  --bg: #ffffff;
  --bg-soft: #f3f7fb;
  --brand: #1646d8;       /* refined version of the logo blue */
  --logo-ink: #000000;    /* logo text, as in DetcalPro */
  --brand-dark: #0d2f9e;
  --aqua: #19a7c9;
  --radius: 14px;
  --max: 1180px;
  --font-head: "Geist", system-ui, sans-serif;
  --font-body: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, Menlo, monospace; /* labels and figures */
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); color: var(--ink-2); background: var(--bg); line-height: 1.65; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow { font: 600 .78rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; display: block; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 760px; }
.section { padding: 96px 0; }
.section.soft { background: var(--bg-soft); }
.section.dark { background: var(--ink); color: #c9d6e4; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head p { max-width: 560px; margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: .95rem; background: var(--brand); color: #fff; border: 2px solid var(--brand); transition: .2s; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); text-decoration: none; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.outline { background: transparent; color: var(--brand); }
.btn.outline:hover { background: var(--brand); color: #fff; }
.arrow::after { content: "→"; }

/* Header */
.topbar { background: var(--ink); color: #9fb3c8; font-size: .82rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar a { color: #dfe8f2; }
header.site { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
/* The Ancalle Engineers logo, drawn as DetcalPro's AncalleLogo.razor draws it: the drop, full height, on the left;
   "Ancalle" in bold italic with "ENGINEERS" spaced out below it at the same width. Text takes --logo-ink. */
.logo { display: inline-flex; align-items: center; color: inherit; }
.logo:hover { text-decoration: none; opacity: .8; }
.logo img, .logo svg { display: block; flex: none; }
.logo text { fill: var(--logo-ink); }
nav.main { display: flex; align-items: center; gap: 4px; }
nav.main a { color: var(--ink); font-weight: 500; font-size: .95rem; padding: 8px 14px; border-radius: 8px; }
nav.main a:hover { background: var(--bg-soft); text-decoration: none; }
nav.main a.active { color: var(--brand); }
nav.main a.btn { color: #fff; margin-left: 10px; padding: 10px 20px; }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--ink); cursor: pointer; }

/* Hero */
.hero { position: relative; min-height: 640px; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(8,24,44,.92) 0%, rgba(8,24,44,.7) 45%, rgba(8,24,44,.2) 100%); }
.hero .wrap { position: relative; padding-top: 80px; padding-bottom: 80px; }
.hero h1 { color: #fff; max-width: 780px; }
.hero .eyebrow { color: #7fd3ea; }
.hero p { color: #d5e1ee; font-size: 1.2rem; max-width: 620px; }
.hero .actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

.page-hero { position: relative; color: #fff; padding: 120px 0 72px; overflow: hidden; }
.page-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.page-hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,24,44,.92), rgba(8,24,44,.55)); }
.page-hero .wrap { position: relative; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #d5e1ee; max-width: 720px; font-size: 1.15rem; margin: 0; }
.page-hero .eyebrow { color: #7fd3ea; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(11,31,51,.12); margin-top: -64px; position: relative; z-index: 2; }
.stat { padding: 30px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 600 2.4rem/1 var(--font-mono); letter-spacing: -.03em; color: var(--ink); margin-bottom: 8px; }
.stat span { color: var(--muted); font-size: .92rem; }

/* Grids & cards */
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.split img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

.tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3.2; color: #fff; display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8,24,44,.9) 0%, rgba(8,24,44,.1) 60%); }
.tile .cap { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 1; }
.tile h3 { color: #fff; margin: 0 0 4px; font-size: 1.35rem; }
.tile span { font-size: .92rem; color: #cfdbe8; }
.tile:hover { text-decoration: none; }
.tile:hover img { transform: scale(1.05); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card .body { padding: 24px; }
.card .loc { font-family: var(--font-mono); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--aqua); margin-bottom: 8px; display: block; }
.card p { font-size: .96rem; margin: 0; }

.service { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; padding: 56px 0; border-bottom: 1px solid var(--line); }
.service:last-child { border-bottom: 0; }
.service:nth-child(even) .media { order: 2; }
.service img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.chips li { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .88rem; color: var(--ink); }
.num { font: 600 .9rem var(--font-mono); color: var(--brand); margin-bottom: 10px; display: block; }

.sector { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.sector img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.sector .body { padding: 22px 24px 26px; }
.sector p { font-size: .94rem; margin: 0; }

.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.person .avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: top; margin-bottom: 16px; background: linear-gradient(135deg, var(--brand), var(--aqua)); color: #fff; display: grid; place-items: center; font: 800 1.3rem var(--font-head); }
.person h3 { margin-bottom: 2px; font-size: 1.15rem; }
.person .role { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--brand); display: block; margin-bottom: 12px; }
.person p { font-size: .92rem; margin: 0; }
.person.lead-p { grid-column: span 3; display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; }
.person.lead-p .avatar { width: 220px; height: 260px; border-radius: 12px; margin: 0; }

.list-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.list-cols h4 { font-family: var(--font-mono); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: #7fd3ea; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.15); }
.list-cols ul { list-style: none; padding: 0; margin: 0; }
.list-cols li { padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .93rem; }

.office { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.office h3 { display: flex; align-items: center; gap: 10px; }
.office h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--aqua); }
.office p.area { color: var(--muted); font-size: .94rem; }
.office .lines { font-size: .98rem; color: var(--ink); line-height: 1.8; }

.cta { background: linear-gradient(120deg, var(--brand-dark), var(--brand) 60%, var(--aqua)); color: #fff; border-radius: 22px; padding: 64px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin-bottom: 8px; }
.cta p { color: #dbe6ff; margin: 0; max-width: 560px; }
.cta .btn { background: #fff; color: var(--brand-dark); border-color: #fff; }

.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.figure-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 32px 0; }
.figure-row img { border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; }

/* Footer */
footer.site { background: #07172a; color: #93a7bd; padding: 72px 0 32px; font-size: .92rem; }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.1fr; gap: 40px; margin-bottom: 48px; }
footer.site h4 { color: #fff; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
footer.site a { color: #c9d6e4; }
footer.site ul { list-style: none; padding: 0; margin: 0; line-height: 2; }
footer.site .legal { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; }
footer.site .logo { --logo-ink: #EAF0FF; }


/* Responsive */
@media (max-width: 960px) {
  .g3, .g4, .team, .list-cols { grid-template-columns: repeat(2, 1fr); }
  .split, .service { grid-template-columns: 1fr; gap: 28px; }
  .service:nth-child(even) .media { order: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  footer.site .cols { grid-template-columns: 1fr 1fr; }
  .person.lead-p { grid-column: span 2; }
  nav.main { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 24px 20px; border-bottom: 1px solid var(--line); }
  nav.main.open { display: flex; }
  nav.main a.btn { margin: 8px 0 0; justify-content: center; }
  .menu-toggle { display: block; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .g2, .g3, .g4, .team, .list-cols, .figure-row { grid-template-columns: 1fr; }
  .person.lead-p { grid-column: auto; grid-template-columns: 1fr; }
  .person.lead-p .avatar { width: 100%; height: 280px; }
  .section { padding: 64px 0; }
  .cta { padding: 40px 28px; }
  .hero { min-height: 560px; }
  .topbar .hide-sm { display: none; }
  footer.site .cols { grid-template-columns: 1fr; }
}

/* preview3 (one page): section links land below the sticky header */
html { scroll-padding-top: 90px; }
/* ...and the section heroes land further in, past most of their 120px top padding, so the eyebrow sits near the header */
.page-hero { scroll-margin-top: -110px; }

/* preview3: the menu item for the section in view is bold (and underlined, below) */
nav.main a { transition: color .2s; }
nav.main a.active { font-weight: 700; }

/* preview3: on hover the Contact button darkens like the other buttons ("Our services"), instead of taking the menu's light hover tint */
nav.main a.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

/* preview3: the footer logo isn't a link, so it doesn't react to hover */
span.logo:hover { opacity: 1; }

/* preview3: a line under the menu item for the section in view (as in Autodesk's section tabs) */
nav.main a:not(.btn) { position: relative; }
nav.main a.active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px; background: currentColor; }

/* ---------- WordPress additions ---------- */
/* the sticky header sits below the admin bar when logged in */
.admin-bar header.site { top: 32px; }
html:has(body.admin-bar) { scroll-padding-top: 122px; }
@media (max-width: 782px) { .admin-bar header.site { top: 46px; } html:has(body.admin-bar) { scroll-padding-top: 136px; } }
/* ordinary pages (e.g. Privacy Policy) */
.page-content { padding: 72px 0 96px; }
.page-content .wrap { max-width: 820px; }
.page-content h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 32px; }
.page-content h2 { font-size: 1.5rem; margin-top: 1.6em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
