/* copemer.com: deep navy, the logo's red as a sparing accent, warm off-white.
   Fraunces for headings, Nunito Sans for text (both served from this site). */
:root {
  --navy-950: #061528;
  --navy-900: #0a1f3c;
  --navy: #0e2c55;
  --navy-600: #24456f;
  --red: #d7343b;
  --red-dark: #b4262d;
  --sand: #f6f3ee;
  --sand-2: #ece6dc;
  --ink: #1b2533;
  --text: #3a4657;
  --muted: #6b7686;
  --line: #e3ddd2;
  --white: #ffffff;
  --max: 1180px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 31, 60, .06), 0 12px 32px -12px rgba(10, 31, 60, .18);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font: 17px/1.7 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy-900); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 12px; z-index: 50; }
.eyebrow { display: inline-block; font: 800 .74rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.lead { font-size: 1.2rem; color: var(--ink); }
.muted { color: var(--muted); }
.center { text-align: center; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.sand { background: var(--sand); }
.section.tight { padding: 56px 0; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--red); color: var(--white); border: 0; border-radius: 999px; padding: 14px 26px; font: 800 .95rem/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer; min-height: 48px; transition: background .2s, transform .2s; }
.btn:hover { background: var(--red-dark); color: var(--white); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); }
.btn.ghost:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn.outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn.outline:hover { background: var(--navy); color: var(--white); }
.link-arrow { font-weight: 800; text-decoration: none; color: var(--navy); }
.link-arrow::after { content: " \2192"; }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #f2a33a; outline-offset: 2px; }

/* Header: transparent over a photo, white once you scroll */
.site-header { position: fixed; inset: 0 0 auto; z-index: 40; background: rgba(255,255,255,.97); box-shadow: 0 1px 0 var(--line); transition: background .25s, box-shadow .25s; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 82px; }
.site-header .logo { display: flex; align-items: center; }
.site-header .logo img { height: 56px; width: auto; }
.logo .on-dark { display: none; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--navy-900); text-decoration: none; font-size: .88rem; font-weight: 700; padding: 6px 0; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--red); transition: right .25s; }
.nav a:hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav a:hover { color: var(--navy-900); }
.nav .btn { padding: 11px 20px; min-height: 42px; font-size: .85rem; color: var(--white); }
.nav .btn::after { display: none; }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--navy-900); }
.menu-toggle svg { width: 26px; height: 26px; }
body.has-hero .site-header:not(.solid) { background: transparent; box-shadow: none; }
body.has-hero .site-header:not(.solid) .nav a:not(.btn) { color: var(--white); }
body.has-hero .site-header:not(.solid) .menu-toggle { color: var(--white); }
body.has-hero .site-header:not(.solid) .logo .on-light { display: none; }
body.has-hero .site-header:not(.solid) .logo .on-dark { display: block; }
body:not(.has-hero) main { padding-top: 82px; }
@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 82px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); padding: 8px 24px 24px; box-shadow: 0 20px 30px -10px rgba(0,0,0,.2); }
  .nav.open { display: flex; }
  .nav a:not(.btn), body.has-hero .site-header:not(.solid) .nav a:not(.btn) { color: var(--navy-900); padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 16px; justify-content: center; }
  body.has-hero .site-header.menu-open { background: var(--white); }
  body.has-hero .site-header.menu-open .logo .on-light { display: block; }
  body.has-hero .site-header.menu-open .logo .on-dark { display: none; }
  body.has-hero .site-header.menu-open .menu-toggle { color: var(--navy-900); }
}

/* Hero */
.hero { position: relative; min-height: min(92vh, 860px); display: flex; align-items: center; color: var(--white); background: var(--navy-950) center/cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(6,21,40,.93) 0%, rgba(6,21,40,.74) 45%, rgba(6,21,40,.28) 100%); }
.hero .wrap { padding-top: 120px; padding-bottom: 96px; width: 100%; }
.hero-inner { max-width: 680px; }
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: #ffd0d2; font-weight: 500; }
.hero p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255,255,255,.88); max-width: 560px; margin-bottom: 34px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .eyebrow, .band .eyebrow { color: #ff9ea2; }
.page-hero { min-height: 400px; }
.page-hero .wrap { padding-top: 140px; padding-bottom: 64px; }
.page-hero p { margin-bottom: 0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: -64px; position: relative; z-index: 2; }
.stat { padding: 30px 24px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { display: block; font: 600 clamp(2.2rem, 4.5vw, 3.2rem)/1 var(--serif); color: var(--navy-900); }
.stat strong span { color: var(--red); }
.stat small { display: block; margin-top: 8px; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; } .stat + .stat { border-left: 0; border-top: 1px solid var(--line); } }

/* Grids, features, panels */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .grid-4 { grid-template-columns: 1fr; } }
.icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--sand); color: var(--red); margin-bottom: 18px; flex: none; }
.icon svg { width: 26px; height: 26px; }
.feature p { color: var(--muted); margin: 0; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.panel h3 { display: flex; align-items: center; gap: 14px; }
.panel h3 .icon { margin: 0; width: 44px; height: 44px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 20px; height: 20px; border-radius: 50%; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center/16px no-repeat; }

/* Tool cards */
.tool { display: flex; flex-direction: column; gap: 8px; padding: 28px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; }
.tool:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; color: inherit; }
.tool .icon { margin-bottom: 8px; }
.tool h3 { margin: 0; font-size: 1.2rem; }
.tool p { margin: 0; color: var(--muted); font-size: .96rem; }
.tool .link-arrow { margin-top: auto; padding-top: 8px; font-size: .9rem; }

/* Split: image + text */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.flip > :first-child { order: 2; }
.split .photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.split .photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.steps li { position: relative; padding-top: 62px; }
.steps li::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 0; left: 0; font: 600 2.6rem/1 var(--serif); color: var(--red); opacity: .35; }
.steps li::after { content: ""; position: absolute; top: 22px; left: 76px; right: 0; height: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.15rem; }
.steps p { color: var(--muted); margin: 0; font-size: .97rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .steps li::after { display: none; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Dark band */
.band { position: relative; color: var(--white); background: var(--navy-950) center/cover no-repeat; isolation: isolate; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(6,21,40,.84); }
.band h2, .band h3 { color: var(--white); }
.band p { color: rgba(255,255,255,.85); }
.band .ticks li::before { background-color: rgba(255,255,255,.18); }

/* Teaser cards */
.teaser { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 380px; padding: 32px; border-radius: var(--radius); overflow: hidden; color: var(--white); text-decoration: none; background: var(--navy-950) center/cover no-repeat; isolation: isolate; box-shadow: var(--shadow); }
.teaser::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,21,40,.05) 15%, rgba(6,21,40,.92) 100%); transition: background .3s; }
.teaser:hover::before { background: linear-gradient(180deg, rgba(6,21,40,.25) 0%, rgba(6,21,40,.96) 100%); }
.teaser h3 { color: var(--white); font-size: 1.6rem; margin-bottom: 8px; }
.teaser p { color: rgba(255,255,255,.86); margin: 0 0 14px; }
.teaser .link-arrow, .teaser:hover { color: var(--white); }

/* People */
.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
@media (max-width: 860px) { .people { grid-template-columns: 1fr; } }
.person { display: grid; grid-template-columns: 170px 1fr; gap: 26px; align-items: start; }
.person img { width: 170px; height: 210px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.person h3 { margin: 0 0 2px; }
.person .role { color: var(--red); font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.person .contact { font-size: .95rem; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
@media (max-width: 520px) { .person { grid-template-columns: 1fr; } }

/* Prose pages */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { margin: 28px 0; border-radius: var(--radius); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.divider { display: flex; align-items: center; gap: 16px; color: var(--red); font: 800 .78rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; margin: 56px 0 20px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 28px; }
.gallery img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin: 0; }
.source { overflow-wrap: anywhere; font-size: .9rem; color: var(--muted); }
.note { background: var(--sand); border-left: 4px solid var(--red); border-radius: 8px; padding: 16px 20px; font-size: .95rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--navy-900); color: var(--white); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
tr.region td { background: var(--sand); font: 600 1rem/1.2 var(--serif); color: var(--navy-900); }
tbody tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: var(--sand); color: var(--navy-900); margin: 0 4px 4px 0; }
.tag.red { background: #fde5e6; color: var(--red-dark); }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.result { background: var(--navy-900); color: var(--white); border-radius: var(--radius); padding: 30px; }
.result h3 { color: var(--white); }
.result dl { display: grid; grid-template-columns: 1fr auto; gap: 12px 20px; margin: 0; }
.result dt { color: rgba(255,255,255,.75); }
.result dd { margin: 0; font: 600 1.5rem/1.1 var(--serif); text-align: right; }
.result .main dd { font-size: 2.2rem; color: #ffd0d2; }

/* Glossary */
.glossary-search { position: sticky; top: 94px; z-index: 5; background: var(--white); padding: 10px 0 18px; }
.glossary dl { margin: 0; }
.glossary .term { padding: 18px 0; border-bottom: 1px solid var(--line); }
.glossary dt { font: 600 1.15rem/1.3 var(--serif); color: var(--navy-900); }
.glossary dt small { font: 700 .82rem/1 var(--sans); color: var(--muted); margin-left: 8px; letter-spacing: .02em; }
.glossary dd { margin: 6px 0 0; }

/* Forms */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 20px; }
.contact-list li { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: center; }
.contact-list .icon { margin: 0; width: 48px; height: 48px; }
.contact-list small { display: block; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.contact-list a { font-weight: 700; text-decoration: none; }
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .88rem; color: var(--ink); }
.form input, .form textarea, .form select { font: inherit; font-size: 1rem; color: var(--ink); background: var(--white); border: 1px solid #cfc8bb; border-radius: 10px; padding: 12px 14px; min-height: 50px; width: 100%; transition: border-color .2s, box-shadow .2s; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--navy-600); box-shadow: 0 0 0 4px rgba(14,44,85,.12); outline: none; }
.form textarea { min-height: 150px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; }
.form .btn { justify-self: start; }
.form-status { font-weight: 700; min-height: 1.5em; margin: 0; }
.form-status.ok { color: #13734b; }
.form-status.err { color: #b42318; }
.fine { font-size: .85rem; color: var(--muted); margin: 0; }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-card .body { padding: 22px 24px 26px; }
.post-card h3 { font-size: 1.2rem; margin: 6px 0 8px; }
.post-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.post-meta { color: var(--muted); font-size: .85rem; font-weight: 700; letter-spacing: .04em; }
.post h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 10px 0 12px; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .95rem; }

/* CTA strip */
.cta { background: var(--navy-900); color: var(--white); border-radius: var(--radius); padding: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta h2 { color: var(--white); margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta p { margin: 0; color: rgba(255,255,255,.8); }

/* Footer */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,.72); padding: 72px 0 28px; font-size: .95rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: #ff9ea2; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font: 800 .75rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--white); margin: 0 0 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer address { font-style: normal; }
.footer-logo { height: 58px; width: auto; margin-bottom: 18px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.socials a:hover { background: var(--red); color: var(--white); }
.socials svg { width: 18px; height: 18px; }
.legal { margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: .85rem; }

/* Reveal on scroll (only when JavaScript runs and motion is welcome) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}
