/*
Theme Name: Diavolo
Theme URI: https://example.com/diavolo
Author: Codex
Author URI: https://example.com
Description: Ein duesteres WordPress-Grundgeruest im Diavolo-Stil mit Hoellen-Atmosphaere, Projektbereich "Die Schmiede" und starkem Fokus auf ESP32-Projekte.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: diavolo
Tags: blog, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, dark-style
*/

:root {
  --bg: #080506;
  --bg-deep: #030202;
  --panel: #140b0d;
  --panel-2: #1e1012;
  --text: #f2e5d6;
  --muted: #b8927c;
  --ember: #ff4b1f;
  --ember-2: #d61616;
  --gold: #d99a39;
  --ash: #372426;
  --line: rgba(255, 92, 40, 0.25);
  --shadow: rgba(214, 22, 22, 0.24);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 5%, rgba(214, 22, 22, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(217, 154, 57, 0.12), transparent 28rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 58%, #090203 100%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover,
a:focus {
  color: #ffd187;
}

img {
  height: auto;
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.site-shell::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 34px 34px;
  content: "";
  inset: 0;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 72%);
  pointer-events: none;
  position: fixed;
  z-index: -2;
}

.site-shell::after {
  background:
    linear-gradient(120deg, transparent 0 44%, rgba(255, 72, 24, 0.08) 45%, transparent 48%),
    linear-gradient(60deg, transparent 0 55%, rgba(217, 154, 57, 0.07) 56%, transparent 59%);
  content: "";
  inset: 0;
  opacity: 0.8;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.wrap {
  margin: 0 auto;
  max-width: var(--max);
  padding: 0 24px;
  width: 100%;
}

.site-header {
  background: rgba(8, 5, 6, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 82px;
}

.brand {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  align-items: center;
  background: radial-gradient(circle at 50% 38%, #ff7d30 0%, #cf1717 45%, #260708 76%);
  border: 1px solid rgba(255, 184, 103, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 30px var(--shadow);
  color: #140404;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  line-height: 1;
  width: 48px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.site-title {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.site-description {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.main-navigation ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 12px;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  background: rgba(255, 75, 31, 0.11);
  border-color: var(--line);
  color: #ffd187;
}

.hero {
  min-height: 620px;
  padding: 88px 0 74px;
  position: relative;
}

.hero::after {
  background:
    linear-gradient(180deg, transparent 0%, rgba(8, 5, 6, 0.44) 42%, var(--bg) 100%),
    radial-gradient(ellipse at bottom, rgba(255, 75, 31, 0.2), transparent 45%);
  bottom: 0;
  content: "";
  height: 42%;
  left: 0;
  position: absolute;
  right: 0;
  pointer-events: none;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.74fr);
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero h1,
.page-title,
.entry-title {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 7vw, 6rem);
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}

.hero-lede {
  color: #dfc7b6;
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  margin: 24px 0 34px;
  max-width: 680px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  background: linear-gradient(135deg, var(--ember), var(--ember-2));
  border: 1px solid rgba(255, 188, 101, 0.35);
  border-radius: 6px;
  box-shadow: 0 12px 38px rgba(214, 22, 22, 0.25);
  color: #fff5eb;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-transform: uppercase;
}

.button.secondary {
  background: rgba(20, 11, 13, 0.75);
  border-color: var(--line);
  box-shadow: none;
  color: var(--text);
}

.button:hover,
.wp-block-button__link:hover {
  color: #fff;
  transform: translateY(-1px);
}

.sigil-card {
  background:
    linear-gradient(180deg, rgba(255, 75, 31, 0.13), rgba(20, 11, 13, 0.9)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  min-height: 390px;
  overflow: hidden;
  position: relative;
}

.sigil-card::before {
  border: 2px solid rgba(217, 154, 57, 0.52);
  border-radius: 50%;
  content: "";
  height: 250px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
}

.sigil-card::after {
  background:
    linear-gradient(45deg, transparent 46%, rgba(255, 196, 117, 0.45) 48%, rgba(255, 196, 117, 0.45) 52%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, rgba(255, 196, 117, 0.45) 48%, rgba(255, 196, 117, 0.45) 52%, transparent 54%),
    radial-gradient(circle, rgba(255, 75, 31, 0.4), transparent 55%);
  content: "";
  inset: 55px;
  position: absolute;
}

.sigil-content {
  inset: auto 24px 24px;
  position: absolute;
  z-index: 1;
}

.sigil-content strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.section {
  padding: 70px 0;
}

.section.alt {
  background: rgba(20, 11, 13, 0.55);
  border-bottom: 1px solid rgba(255, 75, 31, 0.12);
  border-top: 1px solid rgba(255, 75, 31, 0.12);
}

.section-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}

.section-heading p {
  color: var(--muted);
  margin: 0;
  max-width: 520px;
}

.feature-grid,
.post-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature,
.post-card,
.entry-content,
.comments-area {
  background: rgba(20, 11, 13, 0.82);
  border: 1px solid rgba(255, 75, 31, 0.18);
  border-radius: 8px;
  padding: 24px;
}

.feature h3,
.post-card h3 {
  font-family: Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.1;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.feature p,
.post-card p,
.entry-meta {
  color: var(--muted);
}

.forge-panel {
  align-items: center;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
}

.forge-visual {
  background:
    radial-gradient(circle at 50% 68%, rgba(255, 75, 31, 0.75), transparent 26%),
    linear-gradient(135deg, #2b1112, #080506);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

.forge-visual::before,
.forge-visual::after {
  background: rgba(255, 195, 105, 0.32);
  content: "";
  height: 2px;
  left: 12%;
  position: absolute;
  right: 12%;
  top: 50%;
  transform: rotate(22deg);
}

.forge-visual::after {
  transform: rotate(-22deg);
}

.forge-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
}

.forge-list li {
  background: rgba(8, 5, 6, 0.54);
  border: 1px solid rgba(255, 75, 31, 0.15);
  border-radius: 6px;
  color: #e8cdbb;
  list-style: none;
  padding: 12px 14px;
}

.content-area {
  padding: 64px 0;
}

.entry-header {
  margin: 0 auto 30px;
  max-width: 860px;
  text-align: center;
}

.entry-content {
  margin: 0 auto;
  max-width: 860px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.post-card {
  display: flex;
  flex-direction: column;
}

.post-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.site-footer {
  background: #050303;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 34px 0;
}

.footer-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

input,
textarea,
select {
  background: #0c0708;
  border: 1px solid var(--ash);
  border-radius: 6px;
  color: var(--text);
  max-width: 100%;
  padding: 11px 12px;
}

@media (max-width: 860px) {
  .header-inner,
  .footer-inner,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-grid,
  .forge-panel,
  .feature-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 58px 0;
  }

  .sigil-card {
    min-height: 300px;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 18px;
  }

  .main-navigation ul {
    justify-content: flex-start;
  }

  .hero h1,
  .page-title,
  .entry-title {
    font-size: 2.55rem;
  }
}
