/*
Theme Name: Frahmotto Bento
Theme URI: https://frahmotto.dk
Author: Frahm Ottosen
Description: Mørkt bento-tema til frahmotto.dk. Forside med app-felter, guides, DIY, opslag og kontakt.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
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: frahmotto-bento
*/

:root {
  --fo-bg: #0D0E12;
  --fo-tile: #16181F;
  --fo-line: rgba(255, 255, 255, .08);
  --fo-text: #F2F3F6;
  --fo-soft: #9096A3;
  --fo-lime: #C6F14A;
  --fo-violet: #9B87F5;
  --fo-sky: #5CC8FF;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--fo-lime); outline-offset: 3px; }

/* ---------- Bento-gitter ---------- */
.bento-wrap { padding: 20px; }
.bento {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  grid-template-areas:
    "hero hero k   k"
    "hero hero e   e"
    "g    d    o   kt"
    "log  log  log log";
}
.bento > .hero { grid-area: hero; }
.bento > .app-k { grid-area: k; --c: var(--fo-violet); }
.bento > .app-e { grid-area: e; --c: var(--fo-sky); }
.bento > .guides { grid-area: g; }
.bento > .diy { grid-area: d; }
.bento > .opslag { grid-area: o; }
.bento > .log { grid-area: log; }
.bento > .kontakt { grid-area: kt; }

.tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 22px;
  background: var(--fo-tile);
  border: 1px solid var(--fo-line);
  border-radius: 26px;
  transition: transform .2s ease, border-color .2s ease;
}
.tile > * { position: relative; z-index: 1; margin: 0; }
.tile:has(h2 a):hover,
.tile:has(h2 a:focus-visible) {
  transform: translateY(-4px);
  border-color: var(--c, rgba(255, 255, 255, .5));
}

/* Hele feltet er klikbart via overskriftens link */
.tile h2 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }

/* Farveglød bag app-felter */
.app::before {
  content: "";
  position: absolute;
  right: -50px; top: -50px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: var(--c);
  opacity: .22;
  filter: blur(36px);
  transition: opacity .25s ease;
  z-index: 0;
}
.app:hover::before,
.app:has(h2 a:focus-visible)::before { opacity: .5; }

/* Typografi i felterne */
.tile .tag {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c, var(--fo-soft));
}
.tile h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.tile p { margin: 0; }
.tile .desc { margin-top: 6px; font-size: 13.5px; color: var(--fo-soft); max-width: 44ch; }
.tile .url { margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--c); }
.tile .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.tile .chips li {
  margin: 0; padding: 4px 10px;
  font-size: 11.5px; font-weight: 600;
  border-radius: 99px; border: 1px solid var(--fo-line); color: var(--fo-soft);
}

/* Hero */
.hero {
  padding: 34px;
  background: linear-gradient(160deg, #1B1E27, #12141A);
}
.hero::after {
  content: "";
  position: absolute; left: -60px; bottom: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: var(--fo-lime); opacity: .13; filter: blur(60px);
}
.hero .nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; font-weight: 600; color: var(--fo-soft); }
.hero .nav a:hover { color: var(--fo-lime); }
.hero .desc { margin: 0; max-width: 30ch; font-size: clamp(18px, 2.2vw, 24px); line-height: 1.35; color: var(--fo-text); }

/* Logo og menu øverst i hero-feltet */
.hero .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 24px; flex-wrap: wrap; }
.hero .hero-logo { margin: 0; }
.hero .hero-logo img { display: block; height: 84px; width: auto; }
.hero .top .nav { padding-top: 6px; }

/* Nyeste indlæg i log-feltet */
.log .wp-block-latest-posts { list-style: none; margin: 8px 0 0; padding: 0; }
.log .wp-block-latest-posts li { padding: 9px 0; border-top: 1px solid var(--fo-line); font-size: 13.5px; }
.log .wp-block-latest-posts a { font-weight: 600; color: var(--fo-text); }
.log .wp-block-latest-posts a:hover { color: var(--fo-lime); }
.log .wp-block-latest-posts__post-date { display: block; font-size: 12px; color: var(--fo-soft); }

/* ---------- Almindelige sider og indlæg ---------- */
.site-header-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  max-width: 1120px; margin: 0 auto; padding: 22px 20px;
}
.site-header-bar img { display: block; height: 46px; width: auto; }
.site-header-bar .wp-block-navigation { font-size: 14px; font-weight: 600; }
.page-body { max-width: 760px; margin: 0 auto; padding: 4vh 20px 10vh; line-height: 1.7; }
.page-body h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.page-body a { color: var(--fo-lime); text-decoration: underline; text-underline-offset: 3px; }
.page-body img { max-width: 100%; height: auto; border-radius: 16px; }
.page-body .wp-block-post-date { color: var(--fo-soft); font-size: 13px; }
.site-footer-bar { max-width: 1120px; margin: 0 auto; padding: 30px 20px 50px; font-size: 13px; color: var(--fo-soft); border-top: 1px solid var(--fo-line); }

/* ---------- Mobil ---------- */
@media (max-width: 820px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "hero hero"
      "k    k"
      "e    e"
      "g    d"
      "o    kt"
      "log  log";
  }
  .hero { padding: 26px; }
  .hero .hero-logo img { height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
