/*
Theme Name: Aqua Forge
Theme URI: https://example.com/aqua-forge
Author: Master Joerg + ChatGPT
Author URI: https://example.com
Description: Cinematic, underwater-blue WordPress theme inspired by the provided "underwater forge" image. Fast, accessible, minimal JS.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: aqua-forge
Tags: custom-background, custom-logo, custom-menu, featured-images, full-width-template, one-column, two-columns, blog
*/

/* Base tokens (image-inspired) */
:root {
  --af-bg: #041b2e;           /* deep pool blue */
  --af-bg-2: #062742;         /* mid blue */
  --af-surface: rgba(255,255,255,.08);
  --af-text: rgba(255,255,255,.92);
  --af-muted: rgba(255,255,255,.72);
  --af-line: rgba(255,255,255,.12);
  --af-accent: #ff6a00;       /* forge ember */
  --af-accent-2: #ffd08a;     /* warm highlight */
  --af-link: #8fd3ff;         /* cold light */
  --af-radius: 18px;
  --af-shadow: 0 18px 50px rgba(0,0,0,.35);
  --af-max: 1120px;
}

/* Sensible defaults */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.6;
  color: var(--af-text);
  background: radial-gradient(1200px 700px at 50% -10%, rgba(143,211,255,.18), transparent 60%),
              radial-gradient(900px 600px at 20% 10%, rgba(255,106,0,.10), transparent 55%),
              linear-gradient(180deg, var(--af-bg-2), var(--af-bg));
  min-height: 100vh;
}

a {
  color: var(--af-link);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover, a:focus {
  text-decoration: underline;
}

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

.af-container {
  width: min(var(--af-max), calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(4,27,46,.86), rgba(4,27,46,.45));
  border-bottom: 1px solid var(--af-line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
  gap: 1rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}

.custom-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}

.site-title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-title a { color: var(--af-text); }

.site-description {
  margin: 0;
  font-size: .86rem;
  color: var(--af-muted);
}

/* Nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.primary-nav a {
  color: var(--af-text);
  padding: .45rem .6rem;
  border-radius: 999px;
}
.primary-nav a:hover, .primary-nav a:focus {
  background: rgba(255,255,255,.06);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--af-line);
  background: rgba(255,255,255,.06);
  color: var(--af-text);
  padding: .45rem .7rem;
  border-radius: 999px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; align-items: center; gap: .5rem; }
  .primary-nav ul { display: none; }
  .primary-nav[aria-expanded="true"] ul {
    display: flex;
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 64px;
    flex-direction: column;
    padding: .75rem;
    border: 1px solid var(--af-line);
    border-radius: var(--af-radius);
    background: rgba(4,27,46,.92);
    box-shadow: var(--af-shadow);
  }
  .primary-nav[aria-expanded="true"] a {
    width: 100%;
    padding: .7rem .8rem;
  }
}

/* Hero */
.af-hero {
  position: relative;
  padding: clamp(2.6rem, 5vw, 4.4rem) 0 1.2rem;
  overflow: hidden;
}
.af-hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/images/hero.jpeg");
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.02);
  opacity: .42;
}
.af-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 500px at 50% 25%, rgba(255,106,0,.18), transparent 55%),
    radial-gradient(900px 700px at 50% 0%, rgba(143,211,255,.25), transparent 60%),
    linear-gradient(180deg, rgba(4,27,46,.55), rgba(4,27,46,.92));
}
.af-hero__content {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.6rem;
  align-items: center;
}
@media (max-width: 980px) {
  .af-hero__content { grid-template-columns: 1fr; }
}
.af-kicker {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--af-line);
  background: rgba(255,255,255,.06);
  color: var(--af-muted);
  font-size: .88rem;
  width: fit-content;
}
.af-title {
  margin: .7rem 0 .6rem;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.af-lead {
  margin: 0 0 1.2rem;
  color: var(--af-muted);
  font-size: 1.05rem;
  max-width: 60ch;
}
.af-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}
.af-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--af-line);
  background: rgba(255,255,255,.08);
  color: var(--af-text);
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}
.af-btn:hover, .af-btn:focus {
  text-decoration: none;
  background: rgba(255,255,255,.11);
}
.af-btn--accent {
  border-color: rgba(255,106,0,.55);
  background: linear-gradient(180deg, rgba(255,106,0,.22), rgba(255,106,0,.10));
}

.af-card {
  border-radius: var(--af-radius);
  border: 1px solid var(--af-line);
  background: rgba(255,255,255,.06);
  box-shadow: var(--af-shadow);
  overflow: hidden;
}
.af-card__inner {
  padding: 1.1rem 1.1rem;
}
.af-card__title {
  margin: 0 0 .35rem;
  font-size: 1.05rem;
}
.af-card__text {
  margin: 0;
  color: var(--af-muted);
  font-size: .95rem;
}

/* Main */
main {
  padding: 1.2rem 0 3.2rem;
}

.af-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.3rem;
  align-items: start;
}
@media (max-width: 980px) {
  .af-grid { grid-template-columns: 1fr; }
}

.content-area .af-card {
  padding: 1.2rem;
}

/* Posts */
.post-card {
  padding: 1.1rem;
  border-radius: var(--af-radius);
  border: 1px solid var(--af-line);
  background: rgba(255,255,255,.05);
}
.post-card + .post-card {
  margin-top: 1rem;
}
.post-card__title {
  margin: 0 0 .25rem;
  font-size: 1.25rem;
}
.post-card__meta {
  font-size: .88rem;
  color: var(--af-muted);
  margin: 0 0 .6rem;
}
.post-card__excerpt {
  margin: 0;
  color: var(--af-muted);
}

/* Single content */
.entry-content {
  color: rgba(255,255,255,.88);
}
.entry-content h2, .entry-content h3, .entry-content h4 {
  line-height: 1.2;
}
.entry-content a {
  text-decoration: underline;
}
.entry-content blockquote {
  margin: 1.2rem 0;
  padding: .9rem 1rem;
  border-left: 3px solid rgba(255,106,0,.55);
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  color: var(--af-muted);
}
.entry-content code {
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.12);
  padding: .12rem .32rem;
  border-radius: 8px;
}
.entry-content pre {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  padding: .9rem 1rem;
  border-radius: 14px;
  overflow-x: auto;
}

/* Sidebar widgets */
.widget {
  padding: 1.1rem;
  border-radius: var(--af-radius);
  border: 1px solid var(--af-line);
  background: rgba(255,255,255,.05);
}
.widget + .widget { margin-top: 1rem; }
.widget-title {
  margin: 0 0 .7rem;
  font-size: 1.05rem;
}
.widget a { color: var(--af-link); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--af-line);
  padding: 1.6rem 0;
  color: var(--af-muted);
  background: rgba(0,0,0,.12);
}
.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}


/* =========================
   Orb / Bubble motif
   ========================= */
:root{
  --af-orb-glow: rgba(143,211,255,.22);
  --af-orb-rim: rgba(255,255,255,.18);
  --af-orb-rim-2: rgba(255,255,255,.10);
  --af-orb-shadow: 0 22px 70px rgba(0,0,0,.45);
}

.af-orb, .af-orb-card{
  position: relative;
  overflow: hidden;
}

/* subtle "glass bubble" highlight in corners */
.af-orb::before, .af-orb-card::before{
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: -260px;
  top: -280px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), rgba(255,255,255,.06) 35%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(143,211,255,.18), transparent 55%);
  filter: blur(.2px);
  pointer-events: none;
  opacity: .85;
}

/* second orb for depth */
.af-orb::after, .af-orb-card::after{
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  left: -210px;
  bottom: -220px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,106,0,.14), transparent 60%),
    radial-gradient(circle at 60% 40%, rgba(143,211,255,.16), transparent 62%);
  pointer-events: none;
  opacity: .75;
}

.af-orb-ring{
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  border: 1px solid var(--af-orb-rim);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
  mask-image: radial-gradient(circle at 30% 30%, black 0 40%, transparent 70%);
  opacity: .9;
}

/* circular icon orb */
.af-orb-icon{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), rgba(255,255,255,.06) 42%, rgba(255,255,255,.03) 65%),
    radial-gradient(circle at 70% 70%, rgba(143,211,255,.18), transparent 55%);
  border: 1px solid var(--af-orb-rim-2);
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}

/* Orb buttons */
.af-btn{
  position: relative;
  overflow: hidden;
}
.af-btn::before{
  content:"";
  position:absolute;
  inset:-1px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  pointer-events:none;
}
.af-btn::after{
  content:"";
  position:absolute;
  width:180px;
  height:180px;
  left:-90px;
  top:-110px;
  border-radius:999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.20), transparent 60%);
  opacity:.85;
  pointer-events:none;
}
.af-btn--accent::after{
  background: radial-gradient(circle at 30% 30%, rgba(255,208,138,.30), transparent 62%);
}

/* Orb cards: strengthen glass look */
.af-card, .widget, .post-card, .content-area .af-card{
  position: relative;
}
.af-card::before, .widget::before, .post-card::before, .content-area .af-card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: inherit;
  pointer-events:none;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  opacity:.9;
}

/* Optional divider orb (used in templates) */
.af-orb-divider{
  display:flex;
  align-items:center;
  gap:.75rem;
  color: var(--af-muted);
  font-size:.92rem;
}
.af-orb-divider::before, .af-orb-divider::after{
  content:"";
  height:1px;
  flex:1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
}
.af-orb-divider span{
  display:inline-flex;
  gap:.5rem;
  align-items:center;
}

/* =========================
   Cookie notice (no tracking)
   ========================= */
.af-cookie{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(4,27,46,.10), rgba(4,27,46,.70));
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--af-line);
}
.af-cookie__inner{
  width: min(var(--af-max), calc(100% - 1rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .95rem 1rem;
  border-radius: calc(var(--af-radius) + 6px);
  border: 1px solid var(--af-line);
  background: rgba(4,27,46,.78);
  box-shadow: var(--af-orb-shadow);
}
.af-cookie__text{
  color: var(--af-muted);
  font-size: .95rem;
  line-height: 1.35;
}
.af-cookie__text strong{
  color: var(--af-text);
}
.af-cookie__btn{
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 720px){
  .af-cookie__inner{
    flex-direction: column;
    align-items: stretch;
  }
  .af-cookie__btn{
    width: 100%;
    justify-content: center;
  }
}

/* Accessibility */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.af-cookie{
  transition: opacity .2s ease, transform .2s ease;
}
.af-cookie--hide{
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
