/*
Theme Name: Tempo
Theme URI: https://example.com/tempo
Author: Your Name
Author URI: https://example.com
Description: A dense magazine theme for training and nutrition blogs. A social strip and a centred logo sit above a centred navigation bar with an orange active state; below them a four-across full-bleed hero strip, a two-column body of post lists, text-only link lists and grey sidebar panels, reserved banner slots, a full-width feature image, a black Must Read band of wide video cards and a dark footer laid over a photographic backdrop. Pairs Poppins and Roboto, with light and dark modes, self-hosted fonts and one-click demo content made from original artwork.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
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: tempo
Tags: blog, news, magazine, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template
*/

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --text: #121416;
  --text-2: #4a5056;
  --muted: #9aa0a6;
  --line: #e9e9e9;
  --accent: #f0592a;
  --accent-ink: #ffffff;
  --accent-hover: #d2461b;
  --accent-hover-ink: #ffffff;

  --font-display: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w-display: 600;
  --lh-display: 1.26;
  --track-display: -0.01em;

  --radius: 0px;
  --radius-ui: 2px;
  --footer-bg: #16171a;
  --footer-text: #ffffff;
  --footer-muted: #a6abb0;
  --footer-line: rgba(255, 255, 255, .13);
  --overlay: linear-gradient(180deg, rgba(0,0,0,0) 36%, rgba(0,0,0,.78) 100%);

  --wrap: 1140px;
  --gap: 30px;
  --panel: #f2f2f2;
  --band: #0a0a0a;
}

:root[data-theme="dark"] {
  --bg: #0c0d0f;
  --surface: #121416;
  --surface-2: #1b1e21;
  --text: #f1f2f3;
  --text-2: #c2c7cb;
  --muted: #828890;
  --line: #24282c;
  --accent: #ff7247;
  --accent-ink: #1a0d07;
  --accent-hover: #ff9671;
  --accent-hover-ink: #1a0d07;
  --footer-bg: #0a0b0c;
  --footer-text: #ffffff;
  --footer-muted: #a6abb0;
  --panel: #1b1e21;
  --band: #000000;
}

body { font-size: 15px; }
h1, h2, h3, h4,
.card__title, .mini__title, .entry-title, .section-title { font-family: var(--font-display); font-weight: 600; }
.entry-content, .card__excerpt, .page-desc, .author-box__bio { font-family: var(--font-body); }
.meta, .primary-menu a, .mobile-menu a, .btn, .widget-title { font-family: var(--font-ui); }

/* ==================================================================
 * Masthead — social strip, centred logo, centred nav bar
 * ================================================================ */
.tp-socialbar { background: var(--surface); }
.tp-socialbar__row { display: flex; justify-content: flex-end; padding-block: 8px; }
.tp-socialbar__list { display: flex; gap: 1.05rem; margin: 0; padding: 0; list-style: none; }
.tp-socialbar__list a { color: var(--text-2); display: inline-flex; }
.tp-socialbar__list a:hover { color: var(--accent); }
.tp-socialbar__list svg { width: 14px; height: 14px; }

.tp-masthead { background: var(--surface); }
.tp-masthead__row { display: flex; justify-content: center; padding-block: clamp(10px, 2vw, 22px) clamp(14px, 2.4vw, 26px); }
.tp-brand .brand__link { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); }
.tp-brand .brand__name {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 44px);
  text-transform: uppercase; letter-spacing: .03em; color: var(--text); line-height: 1;
}
.tp-masthead .custom-logo { max-height: 86px; width: auto; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 52px; gap: .5rem; }
.site-header__left { grid-column: 1; visibility: hidden; height: 0; overflow: hidden; }
.primary-nav { grid-column: 2; flex: none; min-width: 0; }
.site-header__actions { grid-column: 3; justify-self: end; margin-left: 0; }

.primary-menu { justify-content: center; gap: 0; }
.primary-menu > li > a {
  color: var(--text); font-weight: 600; font-size: 14px; text-transform: uppercase;
  letter-spacing: .03em; padding: .9rem .85rem; border-radius: 0;
}
.primary-menu > li > a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a,
.primary-menu .current-menu-ancestor > a { color: var(--accent); background: transparent; }
.primary-menu .menu-item-has-children > a::after {
  content: ""; display: inline-block; margin-left: .4em; vertical-align: .16em;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0;
}
.primary-menu .sub-menu { background: var(--surface); border-color: var(--line); border-radius: 0; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.primary-menu .sub-menu a { color: var(--text-2); border-radius: 0; text-transform: none; }
.site-header__actions .icon-btn { color: var(--text); border-radius: 0; }
@media (max-width: 980px) { .site-header__inner { grid-template-columns: 1fr auto; } .site-header__left { display: none; } .site-header__actions { grid-column: 2; } }

/* ==================================================================
 * Hero strip — N photos edge to edge, chip over the image, caption under
 * ================================================================ */
.tp-hero {
  display: grid; grid-template-columns: repeat(var(--tp-hero-n, 4), minmax(0, 1fr));
  gap: 0; border-bottom: 1px solid var(--line);
}
.tp-hero__item { position: relative; min-width: 0; display: flex; flex-direction: column; }
.tp-hero__media { display: block; aspect-ratio: 360 / 305; overflow: hidden; background: var(--surface-2); }
.tp-hero__img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.tp-hero__item:hover .tp-hero__img { transform: scale(1.04); }
.tp-hero__ph { display: block; height: 100%; background: linear-gradient(135deg, var(--surface-2), var(--line)); }
.tp-hero__chipwrap { position: relative; z-index: 2; display: flex; justify-content: center; margin-top: -34px; }
.tp-hero__body { padding: 20px clamp(12px, 1.6vw, 22px) clamp(20px, 2.6vw, 30px); text-align: center; }
.tp-hero__title { font-size: clamp(1rem, 1.6vw, 1.3rem); line-height: 1.28; letter-spacing: -.01em; }
.tp-hero__title a:hover { color: var(--accent); }
.tp-hero__body .meta { justify-content: center; margin-top: 14px; font-size: 11px; }
@media (max-width: 1000px) { .tp-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tp-hero { grid-template-columns: 1fr; } .tp-hero__media { aspect-ratio: 16 / 10; } }

/* Chips */
.flag.tp-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--surface); color: var(--text); border-radius: 0;
  font-family: var(--font-ui); font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; padding: .5rem .85rem;
}
.flag.tp-chip:hover { background: var(--accent); color: #fff; }
.flag.tp-chip--video { background: var(--surface); color: var(--text); }
.flag.tp-chip--video svg { width: 11px; height: 11px; color: var(--accent); }

/* ==================================================================
 * Two-column body
 * ================================================================ */
.tp-body { padding-block: clamp(28px, 4vw, 48px); }
.tp-cols { display: grid; gap: clamp(28px, 3.6vw, 46px); align-items: start; }
@media (min-width: 1000px) { .tp-cols { grid-template-columns: minmax(0, 1fr) 300px; } }
.tp-main { display: grid; gap: clamp(26px, 3.4vw, 42px); min-width: 0; }
.tp-side { display: grid; gap: clamp(20px, 2.6vw, 30px); }
@media (min-width: 1000px) { .tp-side { position: sticky; top: var(--sticky-top); } }

/* Lead post: title over the bottom of the image */
.tp-lead { position: relative; }
.tp-lead__media { position: relative; display: block; aspect-ratio: 760 / 430; overflow: hidden; background: var(--surface-2); }
.tp-lead__img { width: 100%; height: 100%; object-fit: cover; }
.tp-lead__ph { position: absolute; inset: 0; background: linear-gradient(135deg, var(--surface-2), var(--line)); }
.tp-lead__shade { position: absolute; inset: 0; background: var(--overlay); }
.tp-lead__body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(16px, 2.4vw, 30px); }
.tp-lead__title { font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.2; color: #fff; }
.tp-lead__title a { color: #fff; }
.tp-lead__title a:hover { color: var(--accent); }
.tp-lead__body .meta { margin-top: 10px; color: rgba(255,255,255,.86); font-size: 11px; }
.tp-lead__body .meta a { color: #fff; font-weight: 600; }
.tp-lead__body .meta__avatar { display: none; }

/* Two-column post lists */
.tp-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 2.8vw, 34px) clamp(22px, 3vw, 40px); }
@media (max-width: 620px) { .tp-list { grid-template-columns: 1fr; } }
.tp-item { min-width: 0; }
.tp-item__cat {
  display: inline-block; font-family: var(--font-ui); font-size: 11px; font-weight: 500;
  color: var(--muted); margin-bottom: 8px;
}
.tp-item__cat:hover { color: var(--accent); text-decoration: none; }
.tp-item__title { font-size: clamp(.98rem, 1.5vw, 1.1rem); line-height: 1.34; letter-spacing: -.005em; }
.tp-item__title a:hover { color: var(--accent); }
.tp-item .meta { margin-top: 10px; font-size: 11px; gap: .3rem .6rem; }
.tp-item .meta__avatar { display: none; }
.tp-item .meta__author a { color: var(--text); font-weight: 600; }
.tp-item .meta__date { color: var(--muted); font-style: italic; font-family: var(--font-body); }
.tp-item .meta > span + span::before { content: "-"; margin-right: .6rem; color: var(--muted); }
.tp-item__excerpt { font-family: var(--font-body); font-size: 13px; line-height: 1.7; color: var(--text-2); margin-top: 12px; }
.tp-list--wide { gap: clamp(28px, 3.4vw, 44px) clamp(22px, 3vw, 40px); }

.tp-more { text-align: center; }
.btn.tp-more__btn {
  background: var(--surface-2); color: var(--text-2); border-radius: 0;
  font-family: var(--font-ui); font-size: 12px; font-weight: 500;
  padding: .7rem 1.6rem; text-transform: none; letter-spacing: 0;
}
.btn.tp-more__btn:hover { background: var(--accent); color: var(--accent-ink); }

/* ==================================================================
 * Reserved banner slots (static placeholders)
 * ================================================================ */
.tp-ad {
  display: flex; align-items: center; justify-content: center; gap: clamp(10px, 1.8vw, 26px);
  flex-wrap: wrap; width: 100%; max-width: var(--tp-ad-w, 728px); min-height: var(--tp-ad-h, 90px);
  margin-inline: auto; padding: 14px 18px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line);
}
.tp-ad__size { font-family: var(--font-ui); font-size: 15px; font-weight: 600; color: var(--muted); }
.tp-ad__note { font-family: var(--font-body); font-size: 14px; color: var(--text-2); max-width: 26ch; }
.tp-ad__btn {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--accent-ink); background: var(--accent); padding: .5rem 1rem;
}
.tp-side .tp-ad { max-width: 300px; min-height: 250px; flex-direction: column; }
.tp-adband { background: var(--surface-2); padding-block: clamp(20px, 2.6vw, 30px); }
.tp-adband .tp-ad { background: var(--surface); }

/* ==================================================================
 * Full-width feature image
 * ================================================================ */
.tp-feature { padding-bottom: clamp(26px, 3.4vw, 40px); }
.tp-feature__media { display: block; aspect-ratio: 1440 / 420; overflow: hidden; background: var(--surface-2); }
.tp-feature__img { width: 100%; height: 100%; object-fit: cover; }
.tp-feature__body { text-align: center; margin-top: -19px; padding-inline: 20px; }
.tp-feature__title {
  margin-top: 20px; font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.2;
  letter-spacing: -.015em; max-width: 24ch; margin-inline: auto;
}
.tp-feature__title a:hover { color: var(--accent); }
.tp-feature__body .meta { justify-content: center; margin-top: 12px; font-size: 11px; }
@media (max-width: 760px) { .tp-feature__media { aspect-ratio: 16 / 9; } }

/* ==================================================================
 * Grey sidebar panels
 * ================================================================ */
.tp-panel { background: var(--panel); padding: clamp(16px, 2vw, 22px); }
.tp-panel__title {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 16px;
}
.tp-panel__list { display: grid; gap: 16px; }
.tp-prow { display: grid; gap: 4px; }
.tp-prow--thumb { grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start; }
.tp-prow__media { display: block; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.tp-prow__img { width: 100%; height: 100%; object-fit: cover; }
.tp-prow__title { font-family: var(--font-display); font-size: 12px; font-weight: 600; line-height: 1.45; }
.tp-prow__title a:hover { color: var(--accent); }
.tp-prow .meta { font-size: 10px; margin-top: 5px; font-family: var(--font-body); font-style: italic; }
.tp-panel + .tp-panel { margin-top: 0; }

.tp-insta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tp-insta__tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.tp-insta__img { width: 100%; height: 100%; object-fit: cover; }
.tp-insta__tile::after { content: ""; position: absolute; inset: 0; background: rgba(240, 89, 42, 0); transition: background .2s; }
.tp-insta__tile:hover::after { background: rgba(240, 89, 42, .28); }

/* ==================================================================
 * Must Read — black label band, three wide cards with video chips
 * ================================================================ */
.tp-must { padding-bottom: clamp(26px, 4vw, 44px); }
.tp-must__band { background: var(--band); padding-block: clamp(12px, 1.6vw, 18px); }
.tp-must__label {
  text-align: center; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1rem, 2vw, 1.4rem); text-transform: uppercase;
  letter-spacing: .22em; color: #fff; margin: 0;
}
.tp-must__row { display: grid; grid-template-columns: repeat(var(--tp-must-n, 3), minmax(0, 1fr)); gap: 0; }
.tp-must__item { position: relative; min-width: 0; }
.tp-must__media { display: block; aspect-ratio: 480 / 300; overflow: hidden; background: var(--surface-2); }
.tp-must__img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.tp-must__item:hover .tp-must__img { transform: scale(1.04); }
.tp-must__chipwrap { display: flex; justify-content: center; margin-top: -32px; position: relative; z-index: 2; }
.tp-must__body { padding: 18px clamp(14px, 2vw, 26px) clamp(18px, 2.4vw, 26px); text-align: center; }
.tp-must__title { font-size: clamp(.98rem, 1.5vw, 1.12rem); line-height: 1.32; }
.tp-must__title a:hover { color: var(--accent); }
.tp-must__body .meta { justify-content: center; margin-top: 12px; font-size: 11px; }
@media (max-width: 900px) { .tp-must__row { grid-template-columns: 1fr; } }

/* ==================================================================
 * Footer — three columns over a photographic backdrop
 * ================================================================ */
.tp-foot {
  position: relative; isolation: isolate; color: var(--footer-text);
  background-color: var(--footer-bg);
  background-image: var(--tp-foot-img, none);
  background-size: cover; background-position: center;
  padding-block: clamp(34px, 4.6vw, 56px) 0;
}
.tp-foot::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10, 11, 12, .74); }
.tp-foot__top {
  display: grid; gap: clamp(24px, 3.4vw, 46px);
  grid-template-columns: 1.2fr .95fr .85fr;
  padding-bottom: clamp(30px, 4vw, 48px);
}
@media (max-width: 900px) { .tp-foot__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tp-foot__top { grid-template-columns: 1fr; } }
.tp-foot__heading {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; color: #fff; margin-bottom: 18px;
}
.tp-foot__list { display: grid; gap: 14px; }
.tp-frow { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; }
.tp-frow__media { display: block; aspect-ratio: 1; overflow: hidden; background: rgba(255,255,255,.08); }
.tp-frow__img { width: 100%; height: 100%; object-fit: cover; }
.tp-frow__title { font-family: var(--font-display); font-size: 12px; font-weight: 600; line-height: 1.45; }
.tp-frow__title a { color: #fff; }
.tp-frow__title a:hover { color: var(--accent); }
.tp-frow .meta, .tp-frow .meta a { color: var(--footer-muted); font-size: 10px; font-family: var(--font-body); font-style: italic; }
.tp-foot__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tp-foot__cats { display: grid; gap: .55rem; list-style: none; margin: 0; padding: 0; }
.tp-foot__cats a { font-family: var(--font-display); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .07em; color: var(--footer-muted); }
.tp-foot__cats a:hover { color: var(--accent); }

.tp-foot__bottom {
  display: grid; gap: clamp(22px, 3vw, 40px);
  grid-template-columns: .9fr 1.5fr .8fr; align-items: start;
  padding-block: clamp(26px, 3.4vw, 40px);
  border-top: 1px solid var(--footer-line);
}
@media (max-width: 900px) { .tp-foot__bottom { grid-template-columns: 1fr; } }
.tp-foot__brand .brand__link,
.tp-foot__brand .brand__name { color: #fff; }
.tp-foot__brand .brand__name { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.tp-foot__text { color: var(--footer-muted); font-family: var(--font-body); font-size: 12px; line-height: 1.8; max-width: 46ch; }
.tp-foot__social { gap: .45rem; }
.tp-foot__social a { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; }
.tp-foot__social a:hover { background: var(--accent); color: #fff; }
.tp-foot__social svg { width: 14px; height: 14px; }

.site-footer { margin-top: 0; padding-block: 0; }
.site-footer__top, .site-footer__widgets { display: none; }
.site-footer__bottom { margin-top: 0; padding-block: 14px; border-top: 1px solid var(--footer-line); justify-content: center; }
.site-footer__copy { font-family: var(--font-body); font-size: 11px; color: var(--footer-muted); }
.site-footer .to-top { display: none; }

/* ==================================================================
 * Shared surfaces: cards, widgets, archives, single
 * ================================================================ */
.card, .mini, .media, .page-numbers, .entry-media__img, .author-box, .flag { border-radius: 0; }
.tp-grid .card__title { font-size: 1.15rem; line-height: 1.3; }
.tp-grid .cat { font-family: var(--font-ui); font-size: 11px; font-weight: 500; color: var(--muted); }
.tp-grid .meta__date { font-style: italic; font-family: var(--font-body); }
.widget { background: var(--panel); padding: clamp(16px, 2vw, 22px); gap: 1rem; }
.widget-title {
  font-family: var(--font-display); font-size: 13px; font-weight: 600;
  border-bottom: 0; padding-bottom: 0; text-transform: none; letter-spacing: 0;
}
.widget--popular .ranked > li::before { color: var(--accent); font-family: var(--font-display); font-size: 1rem; }
.entry-content { font-family: var(--font-body); font-size: 16px; line-height: 1.8; }
.entry-content blockquote { border-left: 3px solid var(--accent); font-style: italic; }
.btn { font-family: var(--font-ui); font-size: 12px; font-weight: 600; }
.page-title, .entry-title { font-family: var(--font-display); letter-spacing: -.015em; }
.signup--sidebar { background: var(--panel); padding: clamp(16px, 2vw, 22px); }
.signup__title { font-family: var(--font-display); font-size: 1.05rem; }
.np-insta { background: var(--surface); border-top: 1px solid var(--line); }
.np-insta__tile, .np-insta__tile .media { border-radius: 0; }

/* ===================================================================
 * Workout card — sets/reps/rest chips over a five-step difficulty meter
 * ================================================================= */
.tp-work {
  margin: 0 0 clamp(18px, 2.6vw, 26px);
  padding: clamp(14px, 2vw, 18px) clamp(15px, 2.2vw, 20px);
  background: var(--panel);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-ui);
}
.tp-work__chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.tp-work__chip {
  display: inline-flex; align-items: baseline; gap: .38rem;
  padding: .3rem .62rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-ui);
}
.tp-work__chipl {
  font-family: var(--font-ui); font-size: 9px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase; color: var(--muted);
}
.tp-work__chipv {
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600;
  color: var(--text); font-variant-numeric: tabular-nums;
}

.tp-work__meter {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .62rem;
  margin-top: .75rem;
}
.tp-work__meterl {
  font-family: var(--font-ui); font-size: 9px; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase; color: var(--muted);
}
.tp-work__bars { display: inline-flex; gap: 3px; }
.tp-work__bar {
  width: 26px; height: 6px; border-radius: 1px;
  background: var(--line);
}
.tp-work__bar.is-on { background: var(--accent); }
.tp-work__metern {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text);
}

/* Feed variant: a touch tighter inside the wide list */
.tp-work--feed { margin: .7rem 0 0; padding: .7rem .85rem; }
.tp-work--feed .tp-work__chipv { font-size: 12.5px; }
.tp-work--feed .tp-work__bar { width: 20px; height: 5px; }

@media (max-width: 420px) {
  .tp-work__bar { width: 17px; }
}
