/*
Theme Name: Nazca Metals Editable
Theme URI: https://nazcametals.com/
Author: Nazca Metals
Description: Editable WordPress theme for the Nazca Metals Home.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: nazca-metals
*/
/* Layout: dark sunset hero and header, light editorial body with gold/copper accents; serif section heads, letterspaced sans labels. */
:root {
  --ink: #18202e;          /* serif headings */
  --fg: #2b2f36;           /* body text */
  --muted: #5d6470;
  --bg: #fffdf9;
  --bg-alt: #f7f1e6;       /* sand panels */
  --line: #e6dccb;
  --card: #ffffff;
  --gold: #f5b93b;
  --gold-deep: #c8871d;    /* gold text on light */
  --copper: #a0562c;
  --night: #15161a;        /* header, footer */
  --night-2: #1f2126;
  --on-night: #f4efe6;
  --on-night-muted: #b9b1a4;
  --todo-bg: #fff2c4;
  --todo-fg: #6b4a00;
  --f-display: "Barlow", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Merriweather", Georgia, "Times New Roman", serif;
  --f-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3ede2; --fg: #ddd6ca; --muted: #a59d90; --bg: #121316; --bg-alt: #1b1c20;
    --line: #2f3036; --card: #1a1b1f; --gold-deep: #f0b44a; --copper: #d98b5a;
    --todo-bg: #4a3a10; --todo-fg: #ffe39a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f3ede2; --fg: #ddd6ca; --muted: #a59d90; --bg: #121316; --bg-alt: #1b1c20;
  --line: #2f3036; --card: #1a1b1f; --gold-deep: #f0b44a; --copper: #d98b5a;
  --todo-bg: #4a3a10; --todo-fg: #ffe39a; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.7 var(--f-sans); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--gold-deep); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 600px) { .wrap { padding-inline: 18px; } }
.todo { background: var(--todo-bg); color: var(--todo-fg); padding: 0 .3em; border-radius: 3px; font-weight: 600; }

/* Draft bar */
.draftbar { background: #7a2e12; color: #fff3e6; font: 600 12px/1.4 var(--f-sans); letter-spacing: .06em; text-align: center; padding: 8px 16px; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(21,22,26,.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,.06); }
.home .site-header { background: rgba(21,22,26,.72); }
.nav { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-night); flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
.brand .wm { display: grid; line-height: 1; }
.brand .wm b { font: 600 22px/1 var(--f-sans); letter-spacing: .32em; }
.brand .wm span { font: 500 11px/1 var(--f-sans); letter-spacing: .5em; color: var(--on-night-muted); margin-top: 6px; }
.menu { display: flex; gap: 26px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.menu a { color: var(--on-night); text-decoration: none; font: 600 12.5px/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; padding-block: 10px; border-bottom: 2px solid transparent; white-space: nowrap; }
.menu a:hover { color: var(--gold); }
.menu a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
.nav .btn { flex-shrink: 0; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.25); color: var(--on-night); border-radius: 8px; padding: 8px 12px; font: 600 12px/1 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
@media (max-width: 1120px) {
  .nav .btn { display: none; }
}
@media (max-width: 980px) {
  .menu-toggle { display: inline-block; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--night); padding: 8px 18px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .menu.open { display: flex; }
  .menu a { display: block; padding-block: 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
  .menu a[aria-current="page"] { border-bottom-color: rgba(255,255,255,.07); }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; font: 700 13.5px/1 var(--f-sans); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border-radius: 999px; padding: 17px 30px; transition: transform .15s ease, background .15s ease; }
.btn::after { content: ""; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #1d1608; }
.btn-gold:hover { background: #ffc955; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.85); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.btn-sm { padding: 12px 20px; font-size: 12px; }
.link-arrow { font: 600 13px/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fg); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: 6px; display: inline-flex; gap: 10px; align-items: center; }
.link-arrow::after { content: "›"; font-size: 18px; line-height: 0; }

/* Hero */
.hero { position: relative; color: #fff; background: #2a1810; overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media svg, .hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,8,6,.78) 0%, rgba(12,8,6,.45) 45%, rgba(12,8,6,0) 75%); }
.hero-inner { padding-block: clamp(72px, 10vw, 128px) clamp(64px, 8vw, 104px); display: grid; gap: 26px; max-width: 820px; }
.eyebrow-hero { font: 500 clamp(13px, 1.4vw, 17px)/1 var(--f-sans); letter-spacing: .38em; text-transform: uppercase; }
.hero h1 { font: 800 clamp(40px, 6.4vw, 80px)/.98 var(--f-display); text-transform: uppercase; letter-spacing: -.005em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .sub { font: 600 clamp(13px, 1.5vw, 18px)/1.5 var(--f-sans); letter-spacing: .16em; text-transform: uppercase; color: #f5ede2; max-width: 46ch; }
.pillars { display: flex; flex-wrap: wrap; gap: 0; margin-top: 10px; }
.pillar { display: flex; align-items: center; gap: 16px; padding: 4px 30px 4px 0; margin-right: 30px; border-right: 1px solid rgba(255,255,255,.35); font: 500 15.5px/1.45 var(--f-sans); color: #fbf6ee; }
.pillar:last-child { border-right: 0; margin-right: 0; }
.pillar svg { width: 40px; height: 40px; flex-shrink: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
@media (max-width: 760px) {
  .pillar { border-right: 0; margin-right: 0; padding: 6px 0; width: 100%; }
}

/* Page hero (inner pages) */
.page-hero { position: relative; color: #fff; background: #24150e; overflow: hidden; isolation: isolate; }
.page-hero .hero-media { opacity: .95; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12,8,6,.82), rgba(12,8,6,.35)); }
.page-hero .wrap { padding-block: clamp(56px, 8vw, 96px); display: grid; gap: 16px; }
.page-hero h1 { font: 800 clamp(36px, 5.2vw, 64px)/1 var(--f-display); text-transform: uppercase; }
.page-hero p { max-width: 60ch; color: #f1e9dd; font-size: 17px; }
.crumb { font: 500 13px/1 var(--f-sans); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }

/* Sections */
.section { padding-block: clamp(64px, 8vw, 110px); }
.section.alt { background: var(--bg-alt); }
.eyebrow { display: flex; align-items: center; gap: 22px; font: 700 13px/1 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.eyebrow::after { content: ""; flex: 0 1 260px; height: 1px; background: currentColor; opacity: .45; }
.h2 { font: 700 clamp(30px, 4vw, 48px)/1.12 var(--f-serif); color: var(--ink); letter-spacing: -.01em; }
.kicker { font: 500 clamp(14px, 1.5vw, 18px)/1.55 var(--f-sans); letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 18px; line-height: 1.7; max-width: 60ch; }
.h3 { font: 700 22px/1.3 var(--f-serif); color: var(--ink); }
.stack { display: grid; gap: 22px; align-content: start; min-width: 0; }
.stack-sm { display: grid; gap: 12px; align-content: start; min-width: 0; }
.prose { display: grid; gap: 16px; max-width: 68ch; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split.even { grid-template-columns: 1fr 1fr; align-items: start; }
.split.flip { grid-template-columns: 1.15fr 1fr; }
@media (max-width: 900px) { .split, .split.even, .split.flip { grid-template-columns: 1fr; } }

/* Flagship panel with diagonal sand backdrop */
.flagship { position: relative; }
.flagship::before { content: ""; position: absolute; inset: 0 0 0 48%; background: var(--bg-alt); clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); z-index: 0; }
.flagship .wrap { position: relative; z-index: 1; }
@media (max-width: 900px) { .flagship::before { display: none; } }

/* Figures */
.figure { margin: 0; display: grid; gap: 10px; min-width: 0; }
.figure .frame { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.figure .frame.dark { background: #1b1612; border-color: #2c241d; }
.figure figcaption { font-size: 13px; color: var(--muted); line-height: 1.5; }
.figure svg { display: block; width: 100%; height: auto; }
.angled { clip-path: polygon(9% 0, 100% 0, 100% 100%, 0 100%, 0 14%); border-radius: 0 var(--radius) var(--radius) var(--radius); }
@media (max-width: 600px) { .angled { clip-path: none; border-radius: var(--radius); } }

.placeholder { aspect-ratio: 4 / 3; border: 1.5px dashed var(--copper); border-radius: var(--radius); background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(160,86,44,.06) 14px 28px), var(--bg-alt); display: grid; place-content: center; text-align: center; gap: 6px; padding: 20px; color: var(--copper); max-width: 100%; }
.placeholder b { font: 700 12px/1.3 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; }
.placeholder span { font-size: 13px; color: var(--muted); max-width: 34ch; }
.placeholder.wide { aspect-ratio: 16 / 9; }

/* Facts strip */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { padding: 30px 26px; border-left: 1px solid var(--line); display: grid; gap: 6px; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact b { font: 800 clamp(32px, 3.6vw, 46px)/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.fact b small { font-size: .5em; font-weight: 700; color: var(--gold-deep); margin-left: 3px; }
.fact span { font: 600 12px/1.45 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } .fact:nth-child(3) { border-left: 0; padding-left: 0; } .fact { border-top: 1px solid var(--line); } .fact:nth-child(-n+2) { border-top: 0; } }
@media (max-width: 420px) { .fact { padding: 22px 14px; } }

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.card .tag { justify-self: start; font: 700 11px/1 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; padding: 7px 11px; border-radius: 999px; background: rgba(245,185,59,.18); color: var(--gold-deep); }
.card .tag.copper { background: rgba(160,86,44,.14); color: var(--copper); }
.card .tag.grey { background: rgba(93,100,112,.14); color: var(--muted); }
.card .metal { font: 600 12px/1 var(--f-sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.card p { font-size: 15px; }
.card .link-arrow { justify-self: start; margin-top: 6px; }

/* Team */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
@media (max-width: 900px) { .team { grid-template-columns: 1fr; } }
.person { display: grid; gap: 14px; align-content: start; }
.avatar { aspect-ratio: 1; max-width: 100%; border-radius: var(--radius); background: linear-gradient(160deg, #2a2119, #6e3d22 70%, #c08130); display: grid; place-items: center; color: #fbe9c6; font: 700 44px/1 var(--f-serif); position: relative; }
.avatar small { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font: 600 10px/1 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(255,240,215,.75); }
.person h3 { font: 700 21px/1.25 var(--f-serif); color: var(--ink); }
.person .role { font: 600 12px/1 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.person p { font-size: 15px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 13px 16px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font: 700 11.5px/1.3 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg-alt); }
tbody tr:last-child td { border-bottom: 0; }
tr.total td { font-weight: 700; color: var(--ink); background: rgba(245,185,59,.09); }
td .bar { display: inline-block; height: 8px; border-radius: 4px; background: var(--gold); vertical-align: middle; margin-right: 8px; }

/* Callouts */
.note { border-left: 3px solid var(--gold); background: var(--bg-alt); padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; font-size: 14px; line-height: 1.65; display: grid; gap: 10px; }
.note b { color: var(--ink); }
.note.legal { border-left-color: var(--copper); }

/* Timeline (real chronology) */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 8px; }
.timeline li { position: relative; padding: 0 0 26px 30px; display: grid; gap: 4px; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--gold); }
.timeline li.now::before { background: var(--gold); }
.timeline .yr { font: 800 20px/1.2 var(--f-display); color: var(--copper); letter-spacing: .02em; }
.timeline p { font-size: 15px; }

/* Approach list (sustainability) */
.pillars-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
@media (max-width: 800px) { .pillars-grid { grid-template-columns: 1fr; } }

/* News */
.news { display: grid; gap: 0; border-top: 1px solid var(--line); }
.news article { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.news time { font: 700 12px/1.6 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.news h3 { font: 700 19px/1.35 var(--f-serif); color: var(--ink); margin-bottom: 6px; }
@media (max-width: 640px) { .news article { grid-template-columns: 1fr; gap: 6px; } }

/* Contact */
.contact-box { display: grid; gap: 8px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.contact-box .label { font: 700 11.5px/1 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact-box .val { font: 700 20px/1.4 var(--f-serif); color: var(--ink); word-break: break-word; }
.copy { justify-self: start; margin-top: 6px; background: none; border: 1px solid var(--line); color: var(--fg); border-radius: 999px; padding: 8px 16px; font: 600 12px/1 var(--f-sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.copy:hover { border-color: var(--gold); }

/* CTA band */
.band { background: var(--night); color: var(--on-night); }
.band .wrap { padding-block: 64px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 26px; }
.band h2 { font: 700 clamp(24px, 3vw, 34px)/1.2 var(--f-serif); max-width: 26ch; }
.band p { color: var(--on-night-muted); margin-top: 8px; max-width: 52ch; }

/* Footer */
.site-footer { background: var(--night); color: var(--on-night-muted); border-top: 1px solid rgba(255,255,255,.06); font-size: 14px; }
.site-footer .top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-block: 56px 40px; }
@media (max-width: 800px) { .site-footer .top { grid-template-columns: 1fr; } }
.site-footer h4 { font: 700 11.5px/1 var(--f-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--on-night); margin: 0 0 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: var(--on-night-muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.08); padding-block: 26px 36px; font-size: 12.5px; line-height: 1.65; display: grid; gap: 10px; }
.site-footer .legal a { color: var(--gold); }
.foot-brand { display: grid; gap: 16px; justify-items: start; }
.foot-brand img { height: 92px; width: auto; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* Map + figure tokens */
:root { --sea: #dfe9ec; --land: #f1e6d1; --land-line: #c9b591; --map-text: #2b2f36; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sea: #17212a; --land: #2a2620; --land-line: #5a4d3a; --map-text: #e7e0d4; } }
:root[data-theme="dark"] { --sea: #17212a; --land: #2a2620; --land-line: #5a4d3a; --map-text: #e7e0d4; }
.m-sea { fill: var(--sea); }
.m-land { fill: var(--land); stroke: var(--land-line); stroke-width: 1; }
.m-frame { fill: none; stroke: var(--line); }
.m-zoom { fill: none; stroke: var(--copper); stroke-width: 1.5; }
.m-lead { stroke: var(--copper); stroke-width: .8; stroke-dasharray: 3 3; }
.m-city { fill: var(--map-text); }
.m-road { stroke: var(--copper); stroke-width: 2; stroke-dasharray: 5 4; }
.m-t, .m-tb, .m-small, .m-cap, .m-ocean { fill: var(--map-text); font-family: var(--f-sans); }
.m-t { font-size: 13px; }
.m-tb { font-size: 14.5px; font-weight: 700; }
.m-small { font-size: 11.5px; fill: var(--muted); }
.m-cap { font-size: 12px; font-weight: 700; letter-spacing: .3em; }
.m-ocean { font-size: 11px; letter-spacing: .28em; fill: var(--muted); }
.p-ten { fill: var(--land); stroke: var(--copper); stroke-width: 2; }
.p-geo { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 6 5; }
.p-stock { fill: #b9a98d; fill-opacity: .45; stroke: #8f7c5c; stroke-width: 1; }
.p-west { fill: #5aa08f; fill-opacity: .22; stroke: #3e7a6e; stroke-width: 2; stroke-dasharray: 5 4; }
.p-alt { fill: #e0a33a; fill-opacity: .28; stroke: #c8871d; stroke-width: 1.2; }
.p-vein { fill: none; stroke: #c0392b; stroke-width: 2.6; stroke-linecap: round; }
.p-lc { fill: #f5b93b; stroke: #7a3d14; stroke-width: 1.5; }
.p-hole { fill: var(--map-text); fill-opacity: .7; }
.p-sb1 { fill: var(--map-text); } .p-sb2 { fill: var(--land); stroke: var(--map-text); }
.p-north { fill: var(--map-text); }
.p-t, .p-tb, .p-lh, .p-ti { fill: var(--map-text); font-family: var(--f-sans); font-size: 12.5px; }
.p-tb { font-weight: 700; font-size: 13.5px; }
.p-lh { font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.p-ti { font-style: italic; fill: var(--muted); font-size: 12px; }
.s-t text { fill: #fff8ee; font-family: var(--f-sans); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.s-t .s-in { font-size: 14px; letter-spacing: .02em; paint-order: stroke; stroke: rgba(20,14,10,.55); stroke-width: 3px; }
.s-t .s-sm { font-size: 11.5px; font-weight: 500; }
.s-t .s-gold { fill: #ffd27a; }

/* Editable Home image helpers */
.home-img { width:100%; height:100%; object-fit:cover; display:block; }
.figure .image-frame { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; min-height:260px; }
.project-card-media { aspect-ratio:16/9; margin:-30px -30px 4px; overflow:hidden; border-radius:var(--radius) var(--radius) 0 0; background:var(--bg-alt); }
.project-card-media img { width:100%; height:100%; object-fit:cover; display:block; }
