/*
Theme Name: Floris Media
Theme URI: https://florismedia.com/
Author: Floris Media Group OÜ
Author URI: https://florismedia.com/
Description: A quiet, high-contrast one-page theme for Floris Media — a portfolio of quiz brands, an about statement, a news feed and a contact block. Portfolio items are a custom post type; "Latest" uses standard posts.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 6.7
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: floris-media
Tags: one-column, custom-menu, custom-logo, editor-style, featured-images, translation-ready, block-styles, wide-blocks
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */

:root {
  --ink: #1b1a17;
  --paper: #fbfaf8;

  --ink-70: rgba(27, 26, 23, 0.7);
  --ink-62: rgba(27, 26, 23, 0.62);
  --ink-58: rgba(27, 26, 23, 0.58);
  --ink-50: rgba(27, 26, 23, 0.5);
  --ink-42: rgba(27, 26, 23, 0.42);
  --ink-25: rgba(27, 26, 23, 0.25);
  --ink-12: rgba(27, 26, 23, 0.12);
  --ink-05: rgba(27, 26, 23, 0.05);

  --paper-70: rgba(251, 250, 248, 0.7);
  --paper-65: rgba(251, 250, 248, 0.65);
  --paper-60: rgba(251, 250, 248, 0.6);
  --paper-45: rgba(251, 250, 248, 0.45);
  --paper-28: rgba(251, 250, 248, 0.28);
  --paper-25: rgba(251, 250, 248, 0.25);
  --paper-08: rgba(251, 250, 248, 0.08);

  --measure: 1120px;
  --gutter: 40px;
  --header-h: 66px;
  --radius: 10px;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, Helvetica, Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
iframe,
video { max-width: 100%; }

img { height: auto; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover { color: var(--ink-50); }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ==========================================================================
   WordPress core requirements
   ========================================================================== */

.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.screen-reader-text:focus {
  clip-path: none;
  z-index: 100000;
  top: 8px;
  left: 8px;
  height: auto;
  width: auto;
  padding: 12px 20px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  text-decoration: underline;
}

.alignleft { float: left; margin: 0.4em 1.6em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.6em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { max-width: min(1120px, calc(100vw - (var(--gutter) * 2))); margin-left: 50%; transform: translateX(-50%); }
.alignfull { max-width: 100vw; margin-left: 50%; transform: translateX(-50%); }

.wp-caption { margin-bottom: 1.5em; max-width: 100%; }
.wp-caption-text,
.wp-element-caption,
figcaption {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-50);
}

.sticky { display: block; }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.inner {
  max-width: var(--measure);
  margin: 0 auto;
}

.section {
  padding: 88px var(--gutter) 96px;
  scroll-margin-top: var(--header-h);
}

.section--dark {
  background: var(--ink);
  color: var(--paper);
}

.section--dark a:hover { color: inherit; }

.section-title {
  margin: 0;
  font-size: clamp(38px, 6vw, 82px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.prose {
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.65;
  text-wrap: pretty;
}

.prose > * { margin: 0 0 20px; }
.prose > *:last-child { margin-bottom: 0; }

.prose a { text-decoration: underline; text-underline-offset: 3px; }

.prose h2,
.prose h3 {
  margin-top: 40px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.prose h2 { font-size: 26px; }
.prose h3 { font-size: 21px; }

.prose ul,
.prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }

.prose blockquote {
  margin-left: 0;
  padding-left: 22px;
  border-left: 2px solid var(--ink-25);
  color: var(--ink-62);
}

.prose img,
.prose figure img { border-radius: var(--radius); }

.underlined { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 20px var(--gutter);
  background: var(--ink);
  color: var(--paper);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}

.site-header .wordmark { flex: none; }
.site-header .site-nav { flex: none; }

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  font-size: 21px;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  line-height: 1;
  color: var(--paper);
  white-space: nowrap;
}

.wordmark:hover { color: var(--paper-60); }

/* Descending weight per word: FLORIS heaviest, then MEDIA, then GROUP. */
.wordmark__w1 { font-weight: 700; }
.wordmark__w2 { font-weight: 500; }
.wordmark__w3 { font-weight: 400; }

.custom-logo-link { display: block; }
.custom-logo { max-height: 44px; width: auto; display: block; }

/* wp_nav_menu() can wrap its list in a container div depending on settings and
   plugins, and block/global styles like to add list padding — so reset hard and
   match the list wherever it lands. */
.site-nav,
.site-nav div,
.site-nav ul,
.site-nav li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  line-height: 1;
  color: var(--paper-60);
}

.site-nav li {
  display: block;
  flex: none;
}

.site-nav li::marker,
.site-nav li::before { content: none; }

.site-nav a {
  display: block;
  color: inherit;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { color: var(--paper); }

/* Only top-level items are rendered (depth 1), but hide any nested list a
   plugin injects rather than letting it stack into the bar. */
.site-nav .sub-menu { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 140px var(--gutter) 120px;
  scroll-margin-top: var(--header-h);
}

/* The hero outranks every section heading — it is the first thing read. */
.hero h1 {
  margin: 0;
  font-size: clamp(44px, 7.4vw, 104px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.035em;
  max-width: 17ch;
  text-wrap: balance;
}

.hero p {
  margin: 40px 0 0;
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.55;
  color: var(--ink-58);
  max-width: 44ch;
  text-wrap: pretty;
}

/* ==========================================================================
   Portfolio
   ========================================================================== */

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
}

@media (max-width: 1080px) {
  .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.work-card:hover { opacity: 0.7; }

.work-card img,
.work-card__art {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* Hit Stop!'s button alternates between its HIT and STOP faces, the way the
   logo does on hitstop.app. Driven from here rather than from inside the SVG:
   an <img>-referenced SVG does not reliably run its own animations. */
.hitstop-face {
  animation: hitstop-flip 2.6s linear infinite;
}

.hitstop-face--stop {
  animation-delay: -1.3s;
}

@keyframes hitstop-flip {
  0%   { opacity: 1; }
  46%  { opacity: 1; }
  50%  { opacity: 0; }
  96%  { opacity: 0; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hitstop-face { animation: none; }
  .hitstop-face--stop { opacity: 0; }
}

.work-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.work-card__kind {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--paper-70);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.work-card__kind svg { flex: none; }

.work-card__name { font-size: 18px; }

.work-card__desc {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--paper-60);
}

/* ==========================================================================
   Latest / news
   ========================================================================== */

.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 420px));
  gap: 32px;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--paper-25);
  color: var(--paper);
}

.news-card:hover { opacity: 0.65; }

.news-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.news-card__title {
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.015em;
  max-width: 34ch;
  text-wrap: pretty;
}

.news-card__meta {
  font-size: 14px;
  color: var(--paper-60);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--paper);
  scroll-margin-top: var(--header-h);
}

.site-footer__body {
  padding: 88px var(--gutter);
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 56ch;
}

.contact-block p {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  text-wrap: pretty;
}

.contact-block address {
  font-style: normal;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-62);
}

/* Contact details and the portfolio list sit side by side, stacking early
   enough that neither column gets squeezed. */
.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 56ch) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.footer-portfolio__title {
  margin: 0 0 22px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.footer-brands {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-brand__name {
  display: block;
  font-size: 17px;
  line-height: 1.4;
}

.footer-brand__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-50);
}

.footer-brand__links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-brand__links a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .footer-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
}

.colophon {
  padding: 20px var(--gutter);
  background: var(--ink);
  color: var(--paper-65);
  font-size: 13px;
}

.colophon a:hover { color: var(--paper); }

/* Slim footer used on single posts, archives and 404. */
.site-footer--slim {
  margin-top: 72px;
  padding: 56px var(--gutter) 44px;
  border-top: 1px solid var(--ink-12);
}

.site-footer--slim .inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
  color: var(--ink-50);
}

/* ==========================================================================
   Single post / page
   ========================================================================== */

.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 88px var(--gutter) 48px;
}

.article__back {
  font-size: 14px;
  color: var(--ink-50);
}

.article__title {
  margin: 32px 0 0;
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.article__date {
  margin-top: 22px;
  font-size: 14px;
  color: var(--ink-50);
}

.article__figure {
  margin: 36px 0 0;
}

.article__figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

.article__body {
  margin-top: 40px;
  max-width: none;
  line-height: 1.7;
}

.article__body > * { margin-bottom: 22px; }

.post-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--ink-12);
  font-size: 14px;
  color: var(--ink-50);
}

/* ==========================================================================
   Archive / index
   ========================================================================== */

.archive-head {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 88px var(--gutter) 0;
}

.pagination {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
  font-size: 14px;
}

.pagination .page-numbers {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
}

.pagination .current {
  background: var(--paper);
  color: var(--ink);
}

/* ==========================================================================
   Narrow screens
   ========================================================================== */

@media (max-width: 700px) {
  :root { --gutter: 24px; }

  .section { padding: 64px var(--gutter) 72px; }
  .hero { padding: 96px var(--gutter) 80px; }
  .site-footer__body { padding: 64px var(--gutter); }
  .article,
  .archive-head { padding: 56px var(--gutter) 40px; }
  .stack { gap: 32px; }
  .work-grid { margin-top: 36px; }
  .news-list { grid-template-columns: minmax(0, 420px); }
}

@media (max-width: 700px) {
  .wordmark { font-size: 18px; }
}

@media (max-width: 680px) {
  :root { --header-h: 56px; }

  /* No navigation on small screens. The front page is a single scroll, and a
     hamburger is more machinery than four anchors justify. */
  .site-nav { display: none; }

  .site-header { padding: 16px var(--gutter); }
  .site-header .inner { justify-content: flex-start; }
}
