/*
Theme Name: Lorentz Rectilinear
Theme URI: https://example.com/lorentz-rectilinear
Author: Codex
Author URI: https://example.com
Description: A rectilinear editorial WordPress theme inspired by a painterly presentation system: teal patina fields, antique gold panels, burgundy theatre accents, and layered rectangular frames.
Version: 1.0.7
Requires at least: 6.2
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: lorentz-rectilinear
Tags: blog, portfolio, one-column, two-columns, custom-background, custom-logo, custom-menu, featured-images, block-styles, wide-blocks, editor-style
*/

:root {
  --lr-ink: #21110a;
  --lr-ink-soft: #3b281b;
  --lr-cream: #ece7c4;
  --lr-paper: #f7f0d8;
  --lr-gold: #bfa97b;
  --lr-gold-deep: #ad8a52;
  --lr-bronze: #6f4e2d;
  --lr-burgundy: #6f1012;
  --lr-burgundy-bright: #9c1f24;
  --lr-teal: #315f5b;
  --lr-teal-dark: #173b3d;
  --lr-green: #88bd3c;
  --lr-orange: #c05e35;
  --lr-muted: #8b7c61;
  --lr-shadow: rgba(33, 17, 10, .28);
  --lr-radius: 6px;
  --lr-frame: 1px solid rgba(191, 169, 123, .62);
  --lr-max: 1180px;
  --lr-font-head: "Noto Serif SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
  --lr-font-body: var(--lr-font-head);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--lr-ink);
  background:
    linear-gradient(90deg, rgba(33, 17, 10, .34), transparent 18%, transparent 82%, rgba(33, 17, 10, .34)),
    #17100d url("assets/images/teal-texture-soft.png") center top / cover fixed;
  font-family: var(--lr-font-body);
  font-size: 17px;
  line-height: 1.72;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(33, 17, 10, .7), rgba(33, 17, 10, .18) 34%, rgba(33, 17, 10, .62)),
    radial-gradient(circle at 50% 0, rgba(236, 231, 196, .13), transparent 36%);
  z-index: -1;
}

a {
  color: var(--lr-burgundy);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}

a:hover,
a:focus {
  color: var(--lr-orange);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

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

.site {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: var(--lr-frame);
  background: rgba(33, 17, 10, .88);
  backdrop-filter: blur(14px);
}

.site-header__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  max-width: var(--lr-max);
  margin: 0 auto;
  padding: 14px 22px;
}

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

.custom-logo-link {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid rgba(191, 169, 123, .58);
  background: rgba(236, 231, 196, .08);
}

.custom-logo {
  display: block;
  width: auto;
  max-height: 42px;
}

.site-title {
  margin: 0;
  font-family: var(--lr-font-head);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.05;
}

.site-title a {
  color: var(--lr-cream);
  text-decoration: none;
}

.site-description {
  margin: 4px 0 0;
  color: rgba(236, 231, 196, .68);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid rgba(191, 169, 123, .72);
  border-radius: var(--lr-radius);
  color: var(--lr-cream);
  background: rgba(111, 16, 18, .72);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.primary-menu,
.primary-menu ul {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid transparent;
  color: var(--lr-cream);
  font-size: .86rem;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a {
  border-color: rgba(191, 169, 123, .64);
  background: rgba(236, 231, 196, .08);
}

.primary-menu li {
  position: relative;
}

.primary-menu ul {
  position: absolute;
  top: 100%;
  right: 0;
  display: none;
  min-width: 220px;
  padding: 8px;
  border: var(--lr-frame);
  background: rgba(33, 17, 10, .96);
}

.primary-menu li:hover > ul,
.primary-menu li:focus-within > ul {
  display: block;
}

.primary-menu ul a {
  width: 100%;
}

.site-main {
  max-width: var(--lr-max);
  margin: 0 auto;
  padding: 0 22px 56px;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 34%);
  gap: 28px;
  align-items: stretch;
  min-height: min(76vh, 760px);
  margin: 26px 0 34px;
  overflow: hidden;
  border: 1px solid rgba(191, 169, 123, .82);
  border-radius: var(--lr-radius);
  color: var(--lr-cream);
  background:
    linear-gradient(90deg, rgba(33, 17, 10, .84), rgba(33, 17, 10, .52) 48%, rgba(111, 16, 18, .38)),
    url("assets/images/teal-texture.png") center / cover;
  box-shadow: 0 28px 64px rgba(0, 0, 0, .26);
}

.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-panel::before {
  inset: 18px;
  border: 1px solid rgba(236, 231, 196, .26);
}

.hero-panel__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 7vw, 84px);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--lr-gold);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 36px;
  height: 1px;
  background: currentColor;
}

.hero-panel h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--lr-font-head);
  font-size: clamp(2.6rem, 7vw, 6.8rem);
  font-weight: 700;
  line-height: .94;
  letter-spacing: 0;
}

.hero-panel__text {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(236, 231, 196, .84);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
}

.hero-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--lr-gold-deep);
  border-radius: var(--lr-radius);
  color: var(--lr-cream);
  background: var(--lr-burgundy);
  box-shadow: inset 0 0 0 1px rgba(236, 231, 196, .16);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
button[type="submit"]:hover,
input[type="submit"]:hover {
  color: var(--lr-cream);
  background: var(--lr-orange);
}

.button--ghost {
  background: rgba(236, 231, 196, .08);
}

.hero-panel__ornament {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  min-height: 360px;
  padding: 30px;
}

.stacked-frames {
  position: relative;
  width: min(100%, 350px);
  min-height: 440px;
  justify-self: end;
}

.stacked-frames span {
  position: absolute;
  display: block;
  border: 1px solid rgba(191, 169, 123, .72);
  background:
    linear-gradient(135deg, rgba(236, 231, 196, .16), rgba(111, 16, 18, .18)),
    url("assets/images/gold-paper.png") center / cover;
  box-shadow: 0 22px 46px rgba(0, 0, 0, .2);
}

.stacked-frames span:nth-child(1) {
  inset: 0 24px 52px 44px;
}

.stacked-frames span:nth-child(2) {
  inset: 56px 0 0 86px;
  background:
    linear-gradient(135deg, rgba(33, 17, 10, .18), rgba(49, 95, 91, .5)),
    url("assets/images/paper-texture.jpg") center / cover;
}

.stacked-frames span:nth-child(3) {
  inset: 140px 72px 94px 0;
  background: rgba(111, 16, 18, .82);
}

.section-band {
  margin: 34px 0;
  padding: clamp(24px, 4vw, 42px);
  border: var(--lr-frame);
  border-radius: var(--lr-radius);
  background:
    linear-gradient(90deg, rgba(247, 240, 216, .95), rgba(236, 231, 196, .94)),
    url("assets/images/paper-texture.jpg") center / cover;
  box-shadow: 0 20px 50px rgba(33, 17, 10, .18);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(173, 138, 82, .42);
}

.section-header h2,
.page-title,
.entry-title {
  margin: 0;
  color: var(--lr-ink);
  font-family: var(--lr-font-head);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-kicker {
  color: var(--lr-burgundy);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

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

.entry-card {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(173, 138, 82, .58);
  border-radius: var(--lr-radius);
  background: rgba(255, 252, 236, .74);
}

.entry-card::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(90deg, var(--lr-burgundy), var(--lr-gold), var(--lr-teal));
}

.entry-card__image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(49, 95, 91, .88), rgba(111, 16, 18, .65)),
    url("assets/images/gold-paper.png") center / cover;
}

.entry-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.entry-meta,
.entry-footer,
.comment-metadata,
.site-footer {
  color: var(--lr-muted);
  font-size: .84rem;
}

.entry-card .entry-title {
  margin-top: 8px;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.entry-card .entry-title a {
  color: var(--lr-ink);
  text-decoration: none;
}

.entry-card .entry-summary {
  margin-top: 12px;
}

.entry-card .read-more {
  margin-top: auto;
  padding-top: 16px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
}

.content-layout--wide {
  grid-template-columns: 1fr;
}

.content-layout--wide .content-area {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.content-area,
.sidebar-panel,
.comments-area,
.post-navigation,
.posts-navigation,
.pagination {
  border: var(--lr-frame);
  border-radius: var(--lr-radius);
  background:
    linear-gradient(180deg, rgba(247, 240, 216, .97), rgba(236, 231, 196, .95)),
    url("assets/images/paper-texture.jpg") center / cover;
  box-shadow: 0 18px 42px rgba(33, 17, 10, .16);
}

.content-area {
  padding: clamp(24px, 4vw, 50px);
}

.sidebar-panel {
  padding: 22px;
}

.widget {
  margin-bottom: 28px;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(173, 138, 82, .42);
  color: var(--lr-burgundy);
  font-family: var(--lr-font-head);
  font-size: 1.35rem;
}

.entry-header {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(173, 138, 82, .38);
}

.entry-content > * {
  max-width: 760px;
}

.entry-content > .alignwide {
  max-width: 980px;
}

.entry-content > .alignfull {
  max-width: none;
  margin-right: calc(clamp(24px, 4vw, 50px) * -1);
  margin-left: calc(clamp(24px, 4vw, 50px) * -1);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--lr-ink);
  font-family: var(--lr-font-head);
  line-height: 1.08;
}

.entry-content blockquote,
.wp-block-quote {
  margin: 28px 0;
  padding: 22px;
  border-left: 8px solid var(--lr-burgundy);
  background: rgba(191, 169, 123, .18);
}

.entry-content table,
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td,
.wp-block-table th,
.wp-block-table td {
  padding: 12px;
  border: 1px solid rgba(173, 138, 82, .46);
}

.entry-content th {
  background: rgba(111, 16, 18, .1);
}

.wp-caption,
.wp-block-image figcaption {
  color: var(--lr-muted);
  font-size: .86rem;
}

.post-thumbnail {
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid rgba(173, 138, 82, .58);
  border-radius: var(--lr-radius);
}

.post-thumbnail img {
  display: block;
  width: 100%;
}

.page-links {
  margin-top: 24px;
}

.tags-links,
.cat-links,
.comments-link,
.edit-link {
  display: inline-block;
  margin-right: 12px;
}

.post-navigation,
.posts-navigation,
.pagination {
  margin: 26px 0;
  padding: 18px 22px;
}

.nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.nav-next {
  text-align: right;
}

.comments-area {
  margin-top: 26px;
  padding: clamp(22px, 4vw, 36px);
}

.comment-list {
  padding-left: 0;
  list-style: none;
}

.comment-body {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(173, 138, 82, .42);
  background: rgba(255, 252, 236, .52);
}

.comment-form input:not([type="submit"]),
.comment-form textarea,
.search-form input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(173, 138, 82, .72);
  border-radius: var(--lr-radius);
  color: var(--lr-ink);
  background: rgba(255, 252, 236, .8);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.site-footer {
  position: relative;
  margin-top: 34px;
  border-top: var(--lr-frame);
  color: rgba(236, 231, 196, .76);
  background:
    linear-gradient(180deg, rgba(33, 17, 10, .82), rgba(33, 17, 10, .96)),
    url("assets/images/balustrade.png") right bottom / auto 160px no-repeat;
}

.site-footer::before {
  content: "";
  display: block;
  height: 8px;
  background: url("assets/images/gold-trim.png") center / auto 100% repeat-x;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  max-width: var(--lr-max);
  margin: 0 auto;
  padding: 34px 22px;
}

.site-footer a {
  color: var(--lr-cream);
}

.accent-strip {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  height: 10px;
  margin: 20px 0;
  border: 1px solid rgba(173, 138, 82, .64);
}

.accent-strip span:nth-child(1) { background: var(--lr-burgundy); }
.accent-strip span:nth-child(2) { background: var(--lr-gold); }
.accent-strip span:nth-child(3) { background: var(--lr-teal); }

.not-found-search {
  margin-top: 22px;
}

@media (max-width: 920px) {
  .site-header__bar,
  .content-layout,
  .hero-panel,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: inline-block;
    justify-self: end;
  }

  .main-navigation {
    display: none;
  }

  .main-navigation.is-open {
    display: block;
  }

  .primary-menu,
  .primary-menu ul {
    display: block;
  }

  .primary-menu ul {
    position: static;
    border: 0;
    background: transparent;
  }

  .primary-menu a {
    width: 100%;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel__ornament {
    min-height: 250px;
    padding-top: 0;
  }

  .stacked-frames {
    min-height: 260px;
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .site-main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .site-header__bar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero-panel__content {
    padding: 34px 24px;
  }

  .hero-panel::before {
    inset: 10px;
  }

  .post-grid,
  .section-header,
  .nav-links,
  .search-form {
    grid-template-columns: 1fr;
  }

  .nav-next {
    text-align: left;
  }

  .hero-panel h1 {
    font-size: clamp(2.35rem, 18vw, 4.2rem);
  }
}
