/*
Theme Name: CREATE FabLab
Theme URI: https://facilities.create.aau.dk/
Author: CREATE FabLab / AAU
Author URI: https://www.aau.dk/
Description: Lys editorial design til CREATE FabLab, Aalborg Universitet. Zonefarver, live status-board, responsivt layout i AAU's designsprog (Barlow, navy #211A52).
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.0
Tested up to: 6.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: create-fablab
Tags: one-column, custom-menu, featured-images, translation-ready, blog
*/

/* ============================================================
   Forslag C "Lys Editorial" – designsystem
   ============================================================ */

:root {
  --navy: #211a52;
  --navy-deep: #16113a;
  --ink: #1c1c28;
  --soft: #62627a;
  --mist: #f5f5f9;
  --line: #e3e3ee;
  --open: #2fb875;
  --busy: #e8a33d;
  --down: #d65a5a;
  --c-print: #594fbf;
  --c-laser: #e8743d;
  --c-cnc: #2f9e8f;
  --c-scan: #c44f86;
  --c-plot: #d9a225;
  --c-wood: #7a6248;
  --font: "Barlow", -apple-system, "Segoe UI", sans-serif;
  --font-cond: "Barlow Semi Condensed", var(--font);
  --maxw: 1200px;
  --g: clamp(20px, 4vw, 48px);
  --r: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  font-family: var(--font);
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--g); }
:focus-visible { outline: 3px solid var(--c-print); outline-offset: 2px; }
.skip-link {
  position: absolute; left: -9999px; background: var(--navy); color: #fff;
  padding: 0.7rem 1.2rem; border-radius: 0 0 12px 0; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 0; top: 0; }

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(8px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 1.1rem; padding-bottom: 1.1rem; gap: 1.5rem;
}
.brand { font-weight: 900; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--navy); }
.brand em { font-style: normal; color: var(--c-print); }
.brand small {
  display: block; font-weight: 500; font-size: 0.68rem; font-family: var(--font-cond);
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--soft);
}
/* Navigation styles → css/nav.css */

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1rem; padding: 0.9rem 1.8rem;
  border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-line { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-line:hover { background: var(--navy); color: #fff; }

/* ---- Hero (front page) ---- */
.hero { padding: clamp(3.5rem, 8vw, 7rem) 0 0; }
.hero .meta {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  font-family: var(--font-cond); font-size: 0.82rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); margin-bottom: 1.6rem;
}
.hero .meta .live { color: var(--open); font-weight: 600; }
.hero .meta .live::before { content: "●"; margin-right: 0.45rem; }
.hero .meta .live.closed { color: var(--down); }
.hero h1 {
  font-size: clamp(3rem, 8.5vw, 7rem); font-weight: 900; line-height: 0.95;
  letter-spacing: -0.035em; color: var(--navy); max-width: 15ch; text-wrap: balance;
}
.hero h1 .u {
  text-decoration: underline; text-decoration-thickness: 0.06em;
  text-underline-offset: 0.09em; text-decoration-color: var(--c-laser);
}
.hero .lede { margin-top: 2rem; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--soft); max-width: 40rem; }
.hero .actions { margin-top: 2.4rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---- Facility index ---- */
.findex { border-top: 3px solid var(--navy); margin-top: clamp(3rem, 6vw, 5rem); }
.frow {
  display: grid; grid-template-columns: 90px 1.1fr 1.3fr auto;
  gap: 1.5rem; align-items: center; padding: 1.7rem 0;
  border-bottom: 1px solid var(--line); transition: background 0.18s ease;
}
.frow:hover { background: var(--mist); box-shadow: calc(var(--g) * -1) 0 0 var(--mist), var(--g) 0 0 var(--mist); }
.frow .no { font-family: var(--font-cond); font-weight: 600; color: var(--soft); font-size: 0.9rem; letter-spacing: 0.08em; }
.frow h3 {
  font-size: clamp(1.35rem, 2.8vw, 1.9rem); font-weight: 800;
  letter-spacing: -0.02em; color: var(--navy); display: flex; align-items: center; gap: 0.8rem;
}
.dotc { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.frow p { color: var(--soft); font-size: 0.96rem; }
.frow p small { display: block; font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; margin-top: 0.25rem; opacity: 0.85; }
.frow .go { font-weight: 800; font-size: 1.4rem; color: var(--navy); transition: transform 0.15s ease; }
.frow:hover .go { transform: translateX(5px); }
@media (max-width: 860px) {
  .frow { grid-template-columns: 48px 1fr auto; }
  .frow p { display: none; }
}

/* ---- Status strip ---- */
.strip {
  background: var(--navy); color: #fff; margin-top: clamp(3rem, 6vw, 5rem);
  border-radius: var(--r); padding: 2rem 2.4rem;
  display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap;
}
.strip .strip-label b { font-size: 1.3rem; font-weight: 800; display: block; }
.strip .strip-label small { opacity: 0.75; font-size: 0.9rem; }
.strip .chips { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.chip { background: rgba(255,255,255,0.12); border-radius: 999px; padding: 0.45rem 1rem; font-size: 0.85rem; font-family: var(--font-cond); }
.chip i { font-style: normal; color: var(--open); margin-right: 0.4rem; }
.chip.busy i { color: var(--busy); }
.chip.down i { color: var(--down); }

/* ---- Sections ---- */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0 0; }
.kick { font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; color: var(--soft); font-weight: 600; }
.section h2 { font-size: clamp(1.9rem, 4.5vw, 3.1rem); font-weight: 900; letter-spacing: -0.03em; color: var(--navy); margin-top: 0.6rem; line-height: 1.05; }
.section .sub { margin-top: 0.9rem; color: var(--soft); max-width: 42rem; font-size: 1.02rem; }

/* ---- News cards ---- */
.news-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 1.4rem; margin-top: 2.4rem; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.ncard {
  border-radius: var(--r); overflow: hidden; position: relative;
  min-height: 280px; display: flex; align-items: flex-end; color: #fff;
  background: linear-gradient(160deg, var(--navy), var(--navy-deep)); transition: transform 0.2s ease;
}
.ncard:hover { transform: translateY(-4px); }
.ncard.z-print { background: linear-gradient(160deg, var(--c-print), #2d2570); }
.ncard.z-laser { background: linear-gradient(160deg, var(--c-laser), #8a3a1a); }
.ncard.z-cnc   { background: linear-gradient(160deg, var(--c-cnc), #1a4f48); }
.ncard.z-scan  { background: linear-gradient(160deg, var(--c-scan), #6d2a4a); }
.ncard.z-plot  { background: linear-gradient(160deg, var(--c-plot), #7d5c0e); }
.ncard.z-wood  { background: linear-gradient(160deg, var(--c-wood), #3e3020); }
.ncard .ov { padding: 1.5rem; width: 100%; background: linear-gradient(transparent, rgba(0,0,0,0.45)); }
.ncard time { font-family: var(--font-cond); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.85; }
.ncard h3 { font-size: 1.3rem; font-weight: 800; margin-top: 0.25rem; }
.ncard .exc { font-size: 0.9rem; opacity: 0.88; margin-top: 0.3rem; }
.ncard-thumb { position: absolute; inset: 0; object-fit: cover; width: 100%; height: 100%; opacity: 0.3; }

/* ---- Videoguides ---- */
.guides { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; margin-top: 2.4rem; }
@media (max-width: 860px) { .guides { grid-template-columns: 1fr; } }
.video-frame { aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: var(--r); box-shadow: 0 18px 44px rgba(33,26,82,0.16); }
.guide-list { display: grid; gap: 0.6rem; }
.guide-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.3rem;
  font-weight: 600; color: var(--navy); transition: border-color 0.15s ease, transform 0.15s ease;
}
.guide-list a:hover { border-color: var(--navy); transform: translateX(4px); }
.guide-list .arrow { color: var(--c-laser); font-weight: 800; }

/* ---- Info band (hours / contact / team) ---- */
.info-band {
  background: var(--mist); border-radius: var(--r); padding: clamp(2rem, 5vw, 3.2rem);
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: clamp(2rem, 4vw, 3rem); margin-top: 2.4rem;
}
@media (max-width: 900px) { .info-band { grid-template-columns: 1fr; } }
.info-band h3 { font-size: 1.15rem; font-weight: 800; color: var(--navy); letter-spacing: -0.01em; margin-bottom: 1rem; }
.hours-row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.hours-row:last-child { border-bottom: none; }
.hours-row strong { font-weight: 700; color: var(--navy); }
.hours-row small { display: block; color: var(--soft); font-size: 0.82rem; }
.hours-row .time { color: var(--soft); white-space: nowrap; }
.contact-list { display: grid; gap: 0.9rem; font-size: 0.96rem; }
.contact-list .label { font-family: var(--font-cond); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.14em; color: var(--soft); display: block; }
.contact-list a { color: var(--navy); font-weight: 600; }
.contact-list a:hover { color: var(--c-print); }

/* ---- Article / page content (WP the_content) ---- */
.page-article { padding: clamp(3rem, 7vw, 5rem) 0; max-width: 820px; margin: 0 auto; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900; letter-spacing: -0.03em; color: var(--navy); line-height: 1.02; }
.page-updated { margin-top: 0.8rem; color: var(--soft); font-family: var(--font-cond); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; }
.entry-content { margin-top: 2.2rem; font-size: 1.05rem; }
.entry-content h2 { font-size: 1.6rem; font-weight: 800; color: var(--navy); letter-spacing: -0.015em; margin: 2.2rem 0 0.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.entry-content h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.entry-content h3 { font-size: 1.2rem; font-weight: 700; color: var(--navy); margin: 1.6rem 0 0.5rem; }
.entry-content p { margin: 0.8rem 0; }
.entry-content ul, .entry-content ol { margin: 0.8rem 0 0.8rem 1.4rem; }
.entry-content li { margin-bottom: 0.35rem; }
.entry-content a { color: var(--c-print); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--navy); }
.entry-content strong { color: var(--navy); }
.entry-content blockquote {
  border-left: 4px solid var(--c-laser); background: var(--mist);
  border-radius: 0 12px 12px 0; padding: 0.9rem 1.3rem; margin: 1.2rem 0;
}
.entry-content code { background: var(--mist); border-radius: 6px; padding: 0.15rem 0.45rem; font-size: 0.9em; color: var(--navy); }
.entry-content pre { background: var(--navy-deep); color: #fff; border-radius: 14px; padding: 1.2rem 1.4rem; overflow-x: auto; margin: 1.2rem 0; }
.entry-content pre code { background: none; color: inherit; padding: 0; }
.entry-content img { border-radius: 14px; margin: 1.2rem 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.97rem; }
.entry-content th { text-align: left; font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--soft); border-bottom: 2px solid var(--navy); padding: 0.5rem 0.8rem 0.5rem 0; }
.entry-content td { border-bottom: 1px solid var(--line); padding: 0.7rem 0.8rem 0.7rem 0; }
.entry-content .wp-block-image { margin: 1.5rem 0; }
.entry-content .wp-block-image img { border-radius: 14px; }

/* ---- Blog archive ---- */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(33,26,82,0.12); }
.post-card-thumb { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--navy), var(--c-print)); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.4rem 1.5rem; }
.post-card-body time { font-family: var(--font-cond); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--soft); font-weight: 600; }
.post-card-body h2 { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-top: 0.3rem; letter-spacing: -0.01em; line-height: 1.2; }
.post-card-body h2 a:hover { color: var(--c-print); }
.post-card-body p { margin-top: 0.5rem; color: var(--soft); font-size: 0.94rem; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: clamp(3.5rem, 7vw, 5.5rem);
  padding: 2.6rem 0 2.2rem; color: var(--soft); font-size: 0.92rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.site-footer b { color: var(--navy); }
.site-footer a:hover { color: var(--navy); text-decoration: underline; }

/* ---- Pagination ---- */
.pagination { margin-top: 3rem; display: flex; justify-content: center; gap: 0.5rem; }
.pagination a, .pagination span {
  padding: 0.5rem 1rem; border-radius: 999px; font-weight: 600;
  font-size: 0.92rem; border: 2px solid var(--line);
}
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination a:hover { border-color: var(--navy); }

/* ---- WP specifics ---- */
.alignwide { max-width: 100%; }
.alignfull { max-width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--soft); margin-top: 0.5rem; }
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }
