/*
Theme Name: Fellnase Modern
Theme URI: https://fellnase.eu/
Author: Fellnase
Description: Schlankes, responsives WordPress-Theme für fellnase.eu. Entwickelt für Gutenberg, ohne externe Schrift- oder Tracking-Dienste.
Version: 0.1.9
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: fellnase-modern
*/

:root {
  --fn-cream: #f6f1e7;
  --fn-paper: #fffdf9;
  --fn-forest: #294638;
  --fn-forest-dark: #1d3329;
  --fn-moss: #6d806c;
  --fn-sand: #d8c5aa;
  --fn-caramel: #9a6846;
  --fn-ink: #20251f;
  --fn-muted: #657067;
  --fn-line: rgba(41, 70, 56, .15);
  --fn-shadow: 0 20px 60px rgba(31, 48, 39, .10);
  --fn-radius: 28px;
  --fn-content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fn-ink);
  background: var(--fn-cream);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--fn-forest); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--fn-caramel); }
button, input, textarea, select { font: inherit; }

.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;
}
.screen-reader-text:focus {
  width: auto; height: auto; clip: auto; margin: 0; padding: 12px 16px;
  left: 12px; top: 12px; z-index: 10000; background: #fff;
}

.site-shell { width: min(calc(100% - 40px), var(--fn-content)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--fn-cream);
  border-bottom: 1px solid var(--fn-line);
  box-shadow: 0 6px 20px rgba(31,48,39,.045);
}
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--fn-ink); }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 29px; letter-spacing: -.02em; }
.brand-tagline { color: var(--fn-muted); font-size: 14px; }
.primary-nav ul { display: flex; gap: 24px; align-items: center; margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: var(--fn-ink); text-decoration: none; font-size: 16px; font-weight: 600; }
.primary-nav .current-menu-item > a, .primary-nav a:hover { color: var(--fn-caramel); }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--fn-line); border-radius: 999px; padding: 10px 14px; color: var(--fn-ink); }

.hero { padding: 52px 0 70px; }
.hero-grid { display: grid; grid-template-columns: .94fr 1.06fr; align-items: center; gap: 64px; }
.eyebrow { margin: 0 0 14px; color: var(--fn-caramel); font-size: 14px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hero h1, .page-hero h1, .section-title, .post-card h2, .entry-title {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
}
.hero h1 { margin: 0; font-size: clamp(48px, 7vw, 88px); line-height: .98; color: var(--fn-forest-dark); }
.hero-lead { max-width: 650px; margin: 28px 0 0; font-size: clamp(20px, 2.2vw, 26px); color: #4f5b52; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 20px; border-radius: 999px; text-decoration: none; font-weight: 750; border: 1px solid transparent; }
.btn-primary { background: var(--fn-forest); color: #fff; }
.btn-primary:hover { background: var(--fn-forest-dark); color: #fff; }
.btn-secondary { border-color: var(--fn-line); color: var(--fn-forest); background: rgba(255,255,255,.58); }
.hero-photo { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: 52% 40%; border-radius: 42px 42px 160px 42px; box-shadow: var(--fn-shadow); }
.hero-badge { position: absolute; left: -22px; bottom: 38px; background: var(--fn-paper); padding: 16px 20px; border-radius: 20px; box-shadow: var(--fn-shadow); font-weight: 800; color: var(--fn-forest); }

.section { padding: 74px 0; }
.section-soft { background: #ece4d7; }
.section-title { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; margin: 0 0 16px; color: var(--fn-forest-dark); }
.section-intro { max-width: 720px; margin: 0 0 34px; color: var(--fn-muted); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--fn-paper); border: 1px solid var(--fn-line); border-radius: var(--fn-radius); padding: 30px; box-shadow: 0 12px 32px rgba(31,48,39,.05); }
.card-kicker { color: var(--fn-caramel); font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.card h3 { margin: 8px 0 12px; font: 700 30px/1.15 Georgia, "Times New Roman", serif; color: var(--fn-forest-dark); }
.card p { margin: 0 0 20px; color: var(--fn-muted); }
.card a { font-weight: 750; }

.story-grid { display: grid; grid-template-columns: 1.04fr .96fr; gap: 56px; align-items: center; }
.story-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 34px; box-shadow: var(--fn-shadow); }
.story-copy p { font-size: 20px; color: #4d584f; }
.quote { border-left: 4px solid var(--fn-caramel); padding-left: 22px; font-family: Georgia, "Times New Roman", serif; font-size: 27px; line-height: 1.45; color: var(--fn-forest-dark); }

.gallery-strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 12px; }
.gallery-strip img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.gallery-strip img:first-child { grid-row: 1 / 3; }
.gallery-strip img:nth-child(4) { grid-column: 2 / 4; }

.page-hero { padding: 72px 0 36px; }
.page-hero h1 { margin: 0; max-width: 900px; font-size: clamp(44px, 7vw, 78px); line-height: 1; color: var(--fn-forest-dark); hyphens: none; -webkit-hyphens: none; overflow-wrap: normal; word-break: normal; text-wrap: balance; }
.page-content { width: min(calc(100% - 40px), 860px); margin: 0 auto; padding: 16px 0 88px; }
.page-content > * { max-width: 100%; }
.page-content h2, .page-content h3 { font-family: Georgia, "Times New Roman", serif; color: var(--fn-forest-dark); line-height: 1.2; }
.page-content h2 { margin-top: 48px; font-size: 38px; }
.page-content h3 { margin-top: 34px; font-size: 29px; }
.page-content p, .page-content li { color: #445047; }
.page-content .wp-block-image img, .page-content .wp-block-gallery img { border-radius: 18px; }
.page-content blockquote { margin: 36px 0; border-left: 4px solid var(--fn-caramel); padding: 8px 0 8px 24px; color: var(--fn-forest-dark); font-family: Georgia, "Times New Roman", serif; font-size: 24px; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { background: var(--fn-paper); border-radius: 24px; overflow: hidden; border: 1px solid var(--fn-line); }
.post-card-image img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.post-card-body { padding: 24px; }
.post-card h2 { margin: 6px 0 12px; font-size: 30px; line-height: 1.14; }
.post-card h2 a { color: var(--fn-forest-dark); text-decoration: none; }
.post-meta { color: var(--fn-muted); font-size: 14px; }
.post-card p { color: var(--fn-muted); }

.entry-header { margin-bottom: 32px; }
.entry-title { font-size: clamp(44px, 7vw, 74px); line-height: 1.03; margin: 0 0 12px; color: var(--fn-forest-dark); hyphens: none; -webkit-hyphens: none; overflow-wrap: normal; word-break: normal; text-wrap: balance; }
.entry-featured { margin: 0 auto 42px; width: min(calc(100% - 40px), 860px); }
.entry-featured img { width: 100%; height: auto; max-height: none; object-fit: contain; border-radius: 32px; }

.comments-area { margin-top: 56px; padding-top: 30px; border-top: 1px solid var(--fn-line); }
.comment-list { padding-left: 20px; }
.comment-list li { margin-bottom: 24px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form textarea {
  width: 100%; border: 1px solid var(--fn-line); background: #fff; border-radius: 14px; padding: 12px 14px;
}
.comment-form input[type="submit"] { border: 0; border-radius: 999px; padding: 12px 20px; background: var(--fn-forest); color: #fff; font-weight: 700; }

.site-footer { padding: 54px 0; background: var(--fn-forest-dark); color: rgba(255,255,255,.78); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: end; }
.footer-brand { font: 700 36px/1 Georgia, "Times New Roman", serif; color: #fff; }
.footer-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footer-nav a { color: rgba(255,255,255,.86); text-decoration: none; }
.footer-meta { margin-top: 16px; font-size: 14px; color: rgba(255,255,255,.58); }
.footer-nav a:focus-visible, .primary-nav a:focus-visible, .brand:focus-visible, .nav-toggle:focus-visible { outline: 3px solid var(--fn-sand); outline-offset: 4px; }
.page-content h2, .page-content h3 { scroll-margin-top: 112px; }
.page-content > h2:first-of-type { margin-top: 36px; }

.alignwide { width: min(1100px, 100%); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }

@media (max-width: 900px) {
  body { font-size: 17px; }
  .brand-tagline { display: none; }
  .nav-toggle { display: inline-flex; }
  .primary-nav { display: none; position: absolute; left: 20px; right: 20px; top: 76px; background: var(--fn-paper); padding: 20px; border-radius: 22px; box-shadow: var(--fn-shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 8px; }
  .primary-nav a { display: block; padding: 8px 4px; }
  .hero-grid, .story-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero { padding-top: 34px; }
  .hero-photo { order: -1; }
  .hero-photo img { aspect-ratio: 4/4.5; border-radius: 28px 28px 90px 28px; }
  .hero-badge { left: 16px; bottom: 18px; }
  .cards, .blog-grid { grid-template-columns: 1fr; }
  .gallery-strip { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 160px 160px; }
  .gallery-strip img:first-child { grid-column: 1 / 3; grid-row: auto; }
  .gallery-strip img:nth-child(4) { grid-column: 1 / 3; }
  .footer-grid { grid-template-columns: 1fr; align-items: start; }
  .footer-nav ul { justify-content: flex-start; gap: 12px 18px; }
  .site-footer { padding: 42px 0; }
}

@media (max-width: 560px) {
  .site-shell, .page-content { width: min(calc(100% - 28px), var(--fn-content)); }
  .header-inner { min-height: 70px; }
  .brand-name { font-size: 25px; }
  .hero { padding-bottom: 48px; }
  .hero h1 { font-size: 44px; line-height: 1.02; }
  .page-hero h1 { font-size: clamp(34px, 10.5vw, 42px); line-height: 1.08; letter-spacing: -.026em; hyphens: none; -webkit-hyphens: none; overflow-wrap: normal; word-break: normal; }
  .hero-lead { font-size: 19px; }
  .entry-featured { width: min(calc(100% - 28px), 860px); margin-bottom: 34px; }
  .entry-featured img { border-radius: 24px; }
  .section { padding: 54px 0; }
  .card { padding: 24px; }
  .gallery-strip { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 180px 150px 150px; }
}


/* 0.1.6: logged-in WordPress toolbar and legal-page polish */
body.admin-bar .site-header { top: 32px; }
body.legal-page .page-hero { padding-top: 58px; }
body.legal-page .page-content { padding-top: 4px; }
body.legal-page .page-content .has-large-font-size {
  font-size: clamp(20px, 2.6vw, 24px) !important;
  line-height: 1.65;
  color: #445047;
}
body.legal-page .page-content h2 {
  font-size: clamp(32px, 5vw, 42px);
  line-height: 1.12;
}
body.legal-page .page-content p,
body.legal-page .page-content li { max-width: 72ch; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
@media (max-width: 560px) {
  body.legal-page .page-hero { padding-top: 42px; padding-bottom: 24px; }
  body.legal-page .page-content h2 { margin-top: 38px; }
}

/* 0.1.7: mobile navigation and footer polish */
@media (max-width: 560px) {
  /* On phones the header scrolls with the page so photographs are never split by it. */
  .site-header,
  body.admin-bar .site-header {
    position: relative;
    top: auto;
    box-shadow: none;
  }

  /* Keep the opened mobile menu anchored to the header even though it is no longer sticky. */
  .site-header { z-index: 100; }
  .primary-nav { top: 70px; }

  /* Deliberate 2 x 2 legal/footer navigation instead of an accidental line wrap. */
  .footer-nav { width: 100%; }
  .footer-nav ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
    justify-content: stretch;
  }
  .footer-nav li { min-width: 0; }
  .footer-nav a {
    display: block;
    padding: 4px 0;
    line-height: 1.35;
  }
}
