/*
Theme Name: Digital Joint
Theme URI: https://digitaljoint.ca
Author: Digital Joint
Description: Custom theme for Digital Joint — packaging production. Navy + registration orange, condensed display type. Includes Case Studies, Giving Back partners, Insights (blog) and Customizer settings for links, hero video and imagery.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: digitaljoint
*/

:root {
  --navy: #0B1D33;
  --navy-2: #11294A;
  --navy-3: #1A3560;
  --line-d: #2A4468;
  --line-d2: #1F3A5F;
  --muted-d: #A9B6C8;
  --soft-d: #C9D3E0;
  --paper: #F3F4F1;
  --white: #FFFFFF;
  --line-l: #C5CCD5;
  --ink-2: #33404F;
  --muted-l: #4A5566;
  --ph-l: #DDE2E8;
  --accent: #FF6A2B;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1296px;
  --sans: 'Archivo', 'Helvetica Neue', Helvetica, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--sans); color: var(--navy); background: var(--paper); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 12px 16px; background: var(--accent); color: var(--navy); font-weight: 700; }

.wrap { max-width: var(--max); margin: 0 auto; }
.section { padding: clamp(80px, 9vw, 120px) var(--pad); }
.section--dark { background: var(--navy); color: var(--white); }
.section--navy2 { background: var(--navy-2); color: var(--white); }
.section--accent { background: var(--accent); color: var(--navy); }
.section--flush-top { padding-top: 0; }

/* Type */
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-l); margin: 0; }
.section--dark .eyebrow, .section--navy2 .eyebrow { color: var(--muted-d); }
.eyebrow--accent { color: var(--accent) !important; }
.display, .h2, .h3, .h4 { font-family: var(--sans); font-weight: 800; text-transform: uppercase; margin: 0; text-wrap: balance; }
.display { font-size: clamp(56px, 9.5vw, 148px); font-stretch: 66%; line-height: 0.88; }
.display--page { font-size: clamp(56px, 8vw, 120px); }
.h2 { font-size: clamp(42px, 5.5vw, 76px); font-stretch: 66%; line-height: 0.92; }
.h3 { font-size: clamp(30px, 3vw, 40px); font-stretch: 68%; line-height: 0.95; }
.h4 { font-size: 28px; font-stretch: 70%; line-height: 1; }
.accent { color: var(--accent); }
.lede { font-size: 18px; line-height: 1.55; color: var(--muted-l); margin: 0; max-width: 420px; }
.section--dark .lede, .section--navy2 .lede { color: var(--soft-d); }
.meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-l); }
.section--dark .meta, .section--navy2 .meta { color: var(--muted-d); }
.link-strong { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: inherit; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--lg { min-height: 54px; padding: 0 30px; font-size: 14px; }
.btn--accent { background: var(--accent); color: var(--navy); }
.btn--accent:hover { background: var(--white); color: var(--navy); }
.btn--ghost { border-color: #3A557A; color: var(--white); background: transparent; }
.btn--ghost:hover { border-color: var(--white); }
.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-2); }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover, .btn--outline.is-active { background: var(--navy); color: var(--white); }
.btn svg { width: 16px; height: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); color: var(--white); border-bottom: 1px solid var(--line-d2); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; padding: 18px var(--pad); }
.brand { display: inline-flex; flex-direction: column; text-decoration: none; color: var(--white); font-weight: 800; font-stretch: 70%; font-size: 26px; line-height: 0.9; text-transform: uppercase; }
.brand span + span { letter-spacing: 0.36em; }
.brand img { display: block; height: 46px; width: auto; max-width: none; }
.brand--footer img { height: 40px; }
@media (max-width: 600px) { .brand img { height: 38px; } }
.nav-panel { display: flex; align-items: center; gap: 20px 36px; flex: 1; justify-content: flex-end; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.main-nav a { color: var(--white); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav .current-menu-parent > a { color: var(--accent); }
.header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.nav-toggle { display: none; background: none; border: 1px solid #3A557A; color: var(--white); min-width: 44px; min-height: 44px; cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header__inner { flex-wrap: wrap; }
  .nav-panel { display: none; flex-basis: 100%; flex-direction: column; align-items: flex-start; padding: 12px 0 8px; }
  .nav-panel.is-open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { display: block; padding: 10px 0; font-size: 15px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; min-height: 680px; display: flex; flex-direction: column; justify-content: flex-end; padding: 140px var(--pad) 96px; background-color: var(--navy); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 16px); color: var(--white); }
.hero--short { min-height: 0; padding-top: 96px; padding-bottom: 64px; }
.hero__media { position: absolute; inset: 0; }
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { content: ''; position: absolute; inset: 0; background: rgba(11,29,51,0.62); }
.hero__note { position: absolute; top: 48px; right: var(--pad); max-width: 300px; text-align: right; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--muted-d); }
.hero__content { position: relative; width: 100%; max-width: var(--max); margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.hero__text { margin: 0; max-width: 540px; font-size: 20px; line-height: 1.5; color: var(--soft-d); }
.crop { position: absolute; width: 28px; height: 28px; border: 0 solid var(--accent); z-index: 1; }
.crop--tl { top: 28px; left: 28px; border-top-width: 1px; border-left-width: 1px; }
.crop--tr { top: 28px; right: 28px; border-top-width: 1px; border-right-width: 1px; }
.crop--bl { bottom: 28px; left: 28px; border-bottom-width: 1px; border-left-width: 1px; }
.crop--br { bottom: 28px; right: 28px; border-bottom-width: 1px; border-right-width: 1px; }
.page-hero__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 64px; }

/* Credentials */
.creds { background: var(--accent); color: var(--navy); padding: 32px var(--pad); }
.creds__grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px 40px; }
.cred { display: flex; align-items: center; gap: 16px; }
.cred svg { flex-shrink: 0; width: 40px; height: 40px; }
.cred__title { font-size: 24px; font-weight: 800; font-stretch: 70%; line-height: 1; text-transform: uppercase; }
.cred__sub { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; margin-top: 4px; }

/* Section heads & grids */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 64px; margin-bottom: 56px; }
.section-head__title { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 340px), 100%), 1fr)); }
.grid--2 { --min: 480px; gap: 48px 64px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* Placeholder + media */
.ph { display: flex; align-items: flex-end; padding: 18px; background-color: var(--ph-l); background-image: repeating-linear-gradient(135deg, rgba(11,29,51,0.07) 0 1px, transparent 1px 14px); font-family: var(--mono); font-size: 12px; color: var(--muted-l); }
.ph--dark { background-color: var(--navy-3); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 14px); color: var(--muted-d); }
.media { position: relative; overflow: hidden; background: var(--ph-l); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-16-10 { aspect-ratio: 16 / 10; }

/* Tiles */
.tile { display: flex; flex-direction: column; background: var(--white); text-decoration: none; color: var(--navy); }
.tile__body { display: flex; flex-direction: column; gap: 14px; padding: 28px 28px 32px; flex: 1; }
.tile__body p { margin: 0; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { padding: 6px 10px; border: 1px solid var(--line-l); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 40px 32px; }
.step { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; border-top: 1px solid var(--line-d); }
.step__num { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.step p { margin: 0; color: var(--muted-d); font-size: 16px; }

/* Tools */
.tool { display: flex; gap: 20px; padding-top: 24px; border-top: 1px solid var(--line-l); }
.tool svg { flex-shrink: 0; width: 32px; height: 32px; }
.tool p { margin: 0; color: var(--ink-2); font-size: 16px; }
.portal { background: var(--navy); color: var(--white); padding: 28px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 30px 60px -30px rgba(11,29,51,0.55); }
.portal__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line-d); font-weight: 800; font-stretch: 72%; text-transform: uppercase; font-size: 18px; }
.portal__job { display: flex; flex-direction: column; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line-d2); }
.portal__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.portal__name { font-weight: 600; }
.portal__status { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.bars, .bar-labels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.bars span { height: 6px; background: var(--line-d); }
.bars span.on { background: var(--accent); }
.bar-labels { padding-top: 14px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-d); }
.caption { font-family: var(--mono); font-size: 12px; color: var(--muted-l); margin-top: 12px; }

/* Lists of posts */
.list-link { display: flex; flex-direction: column; gap: 8px; padding: 24px 0; border-top: 1px solid var(--line-l); text-decoration: none; color: var(--navy); }
.list-link:last-child { border-bottom: 1px solid var(--line-l); }
.list-link__title { font-size: 22px; font-weight: 700; line-height: 1.25; }
.list-link:hover .list-link__title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.card { display: flex; flex-direction: column; gap: 16px; padding: 32px; min-height: 260px; background: var(--white); text-decoration: none; color: var(--navy); border-top: 4px solid var(--navy); }
.card--post { border-top-color: var(--accent); }
.card__top { display: flex; justify-content: space-between; gap: 12px; }
.card__title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; }
.card__more { margin-top: auto; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.card:hover .card__title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

/* Feature */
.feature { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); background: var(--white); text-decoration: none; color: var(--navy); }
.feature--dark { background: var(--navy-2); color: var(--white); }
.feature__media { min-height: 380px; }
.feature__body { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: clamp(28px, 4vw, 56px); }
.feature__body p { margin: 0; }
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 20px; padding-top: 20px; border-top: 1px solid var(--line-d); }
.trio__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.trio__text { font-size: 15px; line-height: 1.5; color: var(--soft-d); }
.metrics { display: flex; flex-wrap: wrap; gap: 40px; }
.metric__value { font-size: 56px; font-weight: 800; font-stretch: 64%; line-height: 1; color: var(--accent); }
.metric__label { font-family: var(--mono); font-size: 12px; color: var(--muted-d); }

/* Filters */
.filters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin: 48px 0 40px; }
.filters__group { display: flex; flex-wrap: wrap; gap: 8px; }
.filters .btn { font-family: var(--mono); font-weight: 500; letter-spacing: 0.1em; }

/* Partners */
.logo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.logo-cell { min-height: 96px; display: flex; align-items: center; justify-content: center; padding: 16px; border: 1px solid var(--line-d); font-family: var(--mono); font-size: 12px; color: var(--muted-d); text-decoration: none; }
.logo-cell img { max-height: 64px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.partner { display: flex; flex-direction: column; gap: 20px; padding: 32px; background: var(--white); border-top: 4px solid var(--accent); }
.partner__logo { height: 96px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line-l); font-family: var(--mono); font-size: 12px; color: var(--muted-l); padding: 12px; }
.partner__logo img { max-height: 72px; width: auto; }
.partner p { margin: 0; color: var(--ink-2); }
.partner__help { display: flex; flex-direction: column; gap: 6px; padding-top: 16px; border-top: 1px solid #D3D8DE; font-weight: 600; }

/* CTA */
.cta { display: flex; flex-direction: column; gap: 36px; }
.cta__title { font-size: clamp(52px, 8vw, 120px); font-stretch: 64%; line-height: 0.88; }
.cta__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.cta__email { font-size: 20px; font-weight: 600; color: var(--navy); }

/* Footer */
.site-footer { padding: 48px var(--pad); background: var(--navy); color: var(--muted-d); border-top: 1px solid var(--line-d2); }
.site-footer__inner { max-width: var(--max); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 32px; }
.site-footer address { font-style: normal; font-family: var(--mono); font-size: 13px; line-height: 1.7; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.site-footer a { color: var(--white); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.site-footer a:hover { color: var(--accent); }
.site-footer__legal { max-width: var(--max); margin: 32px auto 0; padding-top: 24px; border-top: 1px solid var(--line-d2); font-family: var(--mono); font-size: 12px; }

/* Entry content (posts, pages, case studies) */
.entry { max-width: 720px; margin: 0 auto; font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.entry h2, .entry h3 { color: var(--navy); font-weight: 800; font-stretch: 70%; text-transform: uppercase; line-height: 1; margin: 1.6em 0 .5em; }
.entry h2 { font-size: 40px; } .entry h3 { font-size: 30px; }
.entry a { color: var(--navy); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.entry img { margin: 1.5em 0; }
.entry blockquote { margin: 1.5em 0; padding-left: 24px; border-left: 3px solid var(--accent); font-size: 22px; color: var(--navy); }
.entry .alignwide { max-width: 1100px; margin-left: 50%; transform: translateX(-50%); width: 90vw; }

/* Pagination */
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--navy); text-decoration: none; font-family: var(--mono); font-size: 13px; }
.pagination .page-numbers.current { background: var(--navy); color: var(--white); }

.feed-embed { margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line-l); }
.empty { padding: 48px; background: var(--white); text-align: center; color: var(--muted-l); }
.feature__media > * { height: 100%; min-height: 380px; }
.feature__media .media img { height: 100%; }
.link-strong { display: inline-flex; align-items: center; gap: 8px; }
.link-strong svg { width: 16px; height: 16px; flex-shrink: 0; }
.portal .meta { color: var(--muted-d); }
