/*
Theme Name: Fragmentarium Rahmen
Theme URI: https://fragmentarium.info
Author: Fragmentarium
Author URI: https://fragmentarium.info
Description: Ein bewusst reduziertes Gutenberg-Theme mit festem Fragmentarium-Header und -Footer. Alle Seiten verwenden denselben freien Inhaltsrahmen.
Version: 0.6.0
Requires at least: 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: fragmentarium-frame
Tags: custom-logo, custom-menu, editor-style, wide-blocks, block-styles, accessibility-ready
*/

:root {
  --fg-black: #050607;
  --fg-graphite: #15171a;
  --fg-purple: #5d2387;
  --fg-silver-dark: #8d939a;
  --fg-silver: #c9cdd2;
  --fg-silver-light: #e7e9eb;
  --fg-white: #fbfbfa;
  --fg-muted: #62686f;
  --fg-line: rgba(5, 6, 7, 0.16);
  --fg-radius-sm: 0.55rem;
  --fg-radius-md: 1rem;
  --fg-radius-lg: 1.55rem;
  --fg-shadow: 0 22px 70px rgba(5, 6, 7, 0.12);
  --fg-shadow-dark: 0 28px 90px rgba(0, 0, 0, 0.34);
  --fg-wrap: 1280px;
  --fg-content: 760px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--fg-black);
  background:
    radial-gradient(circle at 84% 4%, rgba(255, 255, 255, 0.9), transparent 25rem),
    linear-gradient(180deg, var(--fg-white) 0%, var(--fg-silver-light) 48%, #f4f5f6 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.68;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(5, 6, 7, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5, 6, 7, 0.04) 1px, transparent 1px);
  background-size: 82px 82px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 74%);
  opacity: 0.42;
}

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

a {
  color: inherit;
}

::selection {
  color: var(--fg-white);
  background: var(--fg-black);
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--fg-black);
  outline-offset: 4px;
}

.fg-wrap {
  width: min(calc(100% - 2.4rem), var(--fg-wrap));
  margin-inline: auto;
}

.fg-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 99999;
  padding: 0.75rem 1rem;
  border-radius: var(--fg-radius-sm);
  color: var(--fg-white);
  background: var(--fg-black);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.fg-skip-link:focus {
  transform: translateY(0);
}

/* Header */
.fg-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--fg-black);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.97) 0%, rgba(231, 233, 235, 0.96) 64%, rgba(201, 205, 210, 0.96) 100%);
  border-bottom: 1px solid var(--fg-line);
  box-shadow: 0 10px 36px rgba(5, 6, 7, 0.07);
  backdrop-filter: blur(18px) saturate(115%);
}

.fg-site-header::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--fg-black) 0%, var(--fg-silver-dark) 45%, #fff 72%, var(--fg-black) 100%);
}

.fg-site-header::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  width: clamp(4.5rem, 11vw, 10rem);
  height: 1rem;
  pointer-events: none;
  content: "";
  background: linear-gradient(135deg, transparent 48%, rgba(5, 6, 7, 0.13) 49% 54%, transparent 55%);
}

.admin-bar .fg-site-header {
  top: 32px;
}

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

.fg-brand-lockup {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  flex-shrink: 0;
  gap: 0.78rem;
  color: var(--fg-black);
  text-decoration: none;
}

.fg-brand-tile {
  position: relative;
  width: 2.85rem;
  height: 2.85rem;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.7rem 0.7rem 0.15rem 0.7rem;
  background: linear-gradient(145deg, #24272b 0%, var(--fg-black) 78%);
  box-shadow: 0 10px 24px rgba(5, 6, 7, 0.22);
}

.fg-brand-tile::before {
  position: absolute;
  inset: 0.38rem;
  content: "";
  background: url("assets/fragmentarium-mark.webp") center / contain no-repeat;
}

.fg-brand-title {
  color: var(--fg-black);
  font-size: clamp(1.2rem, 1.05rem + 0.55vw, 1.62rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1;
}

.fg-header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 1.4rem;
}

.fg-primary-nav ul,
.fg-footer-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fg-primary-nav ul {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1rem, 2.3vw, 2rem);
}

.fg-primary-nav a {
  color: var(--fg-purple);
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.075em;
  text-decoration: none;
}

.fg-primary-nav a:hover,
.fg-primary-nav .current-menu-item > a,
.fg-primary-nav .current_page_item > a {
  color: var(--fg-black);
}

.fg-header-cta {
  display: inline-flex;
  padding: 0.78rem 1.2rem;
  border: 1px solid var(--fg-black);
  border-radius: 999px;
  color: var(--fg-white);
  background: var(--fg-black);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(5, 6, 7, 0.16);
}

.fg-header-cta:hover {
  color: var(--fg-black);
  background: var(--fg-white);
}

.fg-menu-toggle {
  display: none;
  width: 2.85rem;
  height: 2.85rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--fg-black);
  border-radius: 999px;
  color: var(--fg-black);
  background: transparent;
  cursor: pointer;
}

.fg-menu-toggle-lines,
.fg-menu-toggle-lines::before,
.fg-menu-toggle-lines::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.fg-menu-toggle-lines {
  position: relative;
}

.fg-menu-toggle-lines::before,
.fg-menu-toggle-lines::after {
  position: absolute;
  left: 0;
  content: "";
}

.fg-menu-toggle-lines::before { top: -0.36rem; }
.fg-menu-toggle-lines::after { top: 0.36rem; }

.fg-menu-toggle[aria-expanded="true"] .fg-menu-toggle-lines {
  background: transparent;
}

.fg-menu-toggle[aria-expanded="true"] .fg-menu-toggle-lines::before {
  top: 0;
  transform: rotate(45deg);
}

.fg-menu-toggle[aria-expanded="true"] .fg-menu-toggle-lines::after {
  top: 0;
  transform: rotate(-45deg);
}

/* One free Gutenberg canvas */
.fg-main {
  min-height: 52vh;
  background: linear-gradient(180deg, rgba(251, 251, 250, 0.98) 0%, rgba(231, 233, 235, 0.94) 100%);
}

.fg-entry,
.fg-content {
  min-height: inherit;
}

.fg-content {
  padding-block: clamp(2.5rem, 5vw, 5.5rem);
}

.fg-content:empty {
  min-height: 52vh;
}

.fg-content > * {
  width: min(calc(100% - 2.4rem), var(--fg-content));
  margin-right: auto;
  margin-left: auto;
}

.fg-content > .alignwide {
  width: min(calc(100% - 2.4rem), var(--fg-wrap));
  max-width: none;
}

.fg-content > .alignfull {
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

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

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

.fg-system-message {
  padding-block: clamp(5rem, 10vw, 10rem);
}

.fg-system-message h1 {
  max-width: 18ch;
  margin-top: 0;
  font-size: clamp(2.7rem, 1.8rem + 4vw, 6rem);
  letter-spacing: -0.055em;
  line-height: 0.96;
}

/* Gutenberg design system */
.is-style-fragment-silver {
  position: relative;
  border: 1px solid rgba(5, 6, 7, 0.12);
  border-radius: var(--fg-radius-lg);
  background: linear-gradient(135deg, #f9f9f8 0%, #d9dcdf 64%, #b7bcc2 100%);
  box-shadow: var(--fg-shadow);
}

.is-style-fragment-white {
  border: 1px solid rgba(5, 6, 7, 0.1);
  border-radius: var(--fg-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 56px rgba(5, 6, 7, 0.08);
}

.is-style-fragment-dark {
  color: var(--fg-white);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--fg-radius-lg);
  background: linear-gradient(145deg, #24272b 0%, var(--fg-black) 100%);
  box-shadow: var(--fg-shadow-dark);
}

.is-style-fragment-dark :where(h1, h2, h3, h4, h5, h6, p, li) {
  color: inherit;
}

.is-style-fragment-dark a {
  color: var(--fg-white);
}

.is-style-fragment-cut {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(5, 6, 7, 0.12);
  border-radius: var(--fg-radius-lg);
}

.is-style-fragment-cut::after {
  position: absolute;
  right: -1.5rem;
  bottom: -2.1rem;
  width: 8rem;
  height: 6.5rem;
  pointer-events: none;
  content: "";
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(5, 6, 7, 0.24));
  clip-path: polygon(45% 0, 100% 0, 100% 100%, 0 100%);
}

.is-style-fragment-outline .wp-block-button__link {
  color: var(--fg-black);
  border: 1px solid var(--fg-black);
  background: transparent;
}

.is-style-fragment-outline .wp-block-button__link:hover {
  color: var(--fg-white);
  background: var(--fg-black);
}

.is-style-fragment-silver-button .wp-block-button__link {
  color: var(--fg-black);
  border: 1px solid rgba(5, 6, 7, 0.18);
  background: linear-gradient(135deg, #fff, #c7cbd0);
  box-shadow: 0 10px 28px rgba(5, 6, 7, 0.12);
}

.is-style-fragment-silver-button .wp-block-button__link:hover {
  background: #fff;
}

.wp-block-button__link {
  border-radius: 999px;
  font-weight: 800;
}

/* Form basics */
.fluentform .ff-el-form-control {
  min-height: 48px;
  border: 1px solid rgba(5, 6, 7, 0.22);
  border-radius: 0.7rem;
  color: var(--fg-black);
  background: rgba(255, 255, 255, 0.92);
}

.fluentform textarea.ff-el-form-control {
  min-height: 150px;
}

.fluentform .ff-btn-submit {
  border: 1px solid var(--fg-black);
  border-radius: 999px;
  color: var(--fg-white);
  background: var(--fg-black);
  font-weight: 800;
}

/* Footer */
.fg-site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #f3f4f5;
  background:
    radial-gradient(circle at 80% 0%, rgba(156, 163, 170, 0.2), transparent 28rem),
    linear-gradient(145deg, #24272b 0%, var(--fg-black) 56%, #020303 100%);
}

.fg-site-footer::before {
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 5.4rem;
  content: "";
  background: linear-gradient(105deg, #fbfbfa 0%, #d5d9dd 46%, #8e949b 72%, #050607 100%);
  clip-path: polygon(0 0, 100% 0, 100% 28%, 72% 100%, 44% 45%, 20% 92%, 0 42%);
}

.fg-footer-inner {
  padding-top: clamp(8rem, 12vw, 11rem);
  padding-bottom: 2.4rem;
}

.fg-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(10rem, 1fr) minmax(10rem, 1fr);
  gap: clamp(2.5rem, 5vw, 6rem);
}

.fg-footer-brand {
  max-width: 30rem;
}

.fg-footer-mark {
  width: 4.6rem;
  height: 4.25rem;
  margin-bottom: 1rem;
  background: url("assets/fragmentarium-mark.webp") center / contain no-repeat;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.36));
}

.fg-footer-title {
  margin: 0 0 0.5rem;
  color: #f3f4f5;
  font-size: clamp(1.75rem, 1.45rem + 1vw, 2.6rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1;
}

.fg-footer-copy {
  margin: 0;
  color: #aeb4ba;
}

.fg-footer-heading {
  margin: 0 0 1rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.2;
}

.fg-footer-nav ul {
  display: grid;
  gap: 0.75rem;
}

.fg-footer-nav a,
.fg-consent-link {
  color: #d4d7da;
  font: inherit;
  text-decoration: none;
}

.fg-footer-nav a:hover,
.fg-consent-link:hover {
  color: #fff;
  text-decoration: underline;
}

.fg-consent-link,
.fg-site-footer .cmplz-manage-consent {
  display: inline-flex;
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
  color: #d4d7da;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.fg-footer-bottom {
  display: flex;
  margin-top: 3.2rem;
  padding-top: 1.3rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #9fa5ab;
  font-size: 0.78rem;
}

@media (max-width: 960px) {
  .fg-menu-toggle {
    display: inline-flex;
  }

  .fg-header-cta {
    display: none;
  }

  .fg-primary-nav {
    position: fixed;
    inset: 82px 0 auto;
    display: none;
    padding: 1.4rem 1.2rem 1.8rem;
    color: var(--fg-white);
    background: linear-gradient(145deg, rgba(39, 42, 46, 0.99), rgba(5, 6, 7, 0.995));
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
  }

  .admin-bar .fg-primary-nav {
    top: 114px;
  }

  .fg-primary-nav.is-open {
    display: block;
  }

  .fg-primary-nav ul {
    width: min(calc(100% - 2.4rem), var(--fg-wrap));
    margin-inline: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .fg-primary-nav li {
    width: 100%;
  }

  .fg-primary-nav a {
    display: block;
    width: 100%;
    padding: 0.95rem 0;
    color: var(--fg-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 1rem;
  }
}

@media (max-width: 782px) {
  .admin-bar .fg-site-header {
    top: 46px;
  }

  .fg-header-inner {
    min-height: 72px;
  }

  .fg-primary-nav {
    top: 72px;
  }

  .admin-bar .fg-primary-nav {
    top: 118px;
  }

  .fg-brand-tile {
    width: 2.55rem;
    height: 2.55rem;
  }

  .fg-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .fg-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .fg-wrap,
  .fg-content > *,
  .fg-content > .alignwide {
    width: min(calc(100% - 1.5rem), var(--fg-wrap));
  }

  .fg-brand-title {
    font-size: 1.2rem;
  }

  .fg-footer-grid {
    grid-template-columns: 1fr;
  }

  .fg-footer-brand {
    grid-column: auto;
  }

  .fg-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
