/* Gerbaca — components: hero, thesis slab, catalogue rows, writing, contact. */

/* Section prose defaults (low specificity so components win) ------------- */
.gb-section :where(p) {
  margin: 0 0 1.1em;
  max-width: 70ch;
}

.gb-section :where(p:last-child) {
  margin-bottom: 0;
}

.gb-section .gb-cote {
  margin: 0;
}

.gb-section p.gb-section__intro {
  max-width: 60ch;
  margin: 0 0 1.75rem;
  color: var(--graphite);
}

.gb-section :where(h3) {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.9rem;
}

.gb-section :where(h3:first-of-type) {
  margin-top: 0.25rem;
}

/* Hero ------------------------------------------------------------------- */
.gb-hero {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}

.gb-hero__kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--graphite);
  margin: 0 0 1.75rem;
}

.gb-hero__name {
  font-family: var(--display);
  font-size: clamp(3.4rem, 11.5vw, 10.5rem);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  margin: 0;
}

.gb-dot {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  background: var(--red);
  margin-left: 0.08em;
}

/* The red square is drawn in CSS so it survives edits of the name. */
h1.gb-hero__name::after {
  content: "";
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  background: var(--red);
  margin-left: 0.08em;
}

.gb-hero__lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
  line-height: 1.5;
  max-width: 58ch;
  margin: 2rem 0 0;
}

.gb-hero__meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.8;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--graphite);
  margin: 1.5rem 0 0;
}

/* Thesis slab: the one inverted block ------------------------------------ */
.gb-slab {
  background: var(--ink);
  color: var(--paper);
  border: var(--rule) solid var(--ink);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  margin: 0 0 2rem;
}

.gb-slab .gb-slab__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--red-on-ink);
  margin: 0;
  max-width: none;
}

.gb-slab .gb-slab__title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  line-height: 1.08;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0.9rem 0 1rem;
}

.gb-slab .gb-slab__orig {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: #C9C9C9;
  margin: 0 0 1rem;
  max-width: none;
}

.gb-slab .gb-slab__dir {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.6;
  color: #E8E8E8;
  margin: 0;
  max-width: none;
}

/* Keywords + links -------------------------------------------------------- */
.gb-keys {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 2;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--graphite);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
  margin: 1.75rem 0;
  max-width: none;
}

.gb-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 1.25rem 0 0;
  max-width: none;
}

/* Catalogue rows ---------------------------------------------------------- */
.gb-rows {
  margin: 0.5rem 0 1.5rem;
}

.gb-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.25rem 1rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}

.gb-row:last-child {
  border-bottom: 1px solid var(--line);
}

.gb-row__when {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite);
  padding-top: 0.15em;
}

.gb-row__what {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.5;
}

.gb-row__where {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.72rem;
  line-height: 1.7;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite);
  margin-top: 0.3rem;
}

/* Writing ----------------------------------------------------------------- */
.gb-empty {
  border: var(--rule) solid var(--line);
  padding: clamp(1.75rem, 4vw, 3rem);
}

.gb-empty .gb-empty__title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  line-height: 1.05;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
  max-width: none;
}

.gb-empty .gb-empty__title::before {
  content: "";
  display: inline-block;
  width: 0.18em;
  height: 0.18em;
  background: var(--red);
  margin-right: 0.35em;
}

.gb-empty .gb-empty__note {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.9;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--graphite);
  margin: 0;
  max-width: 62ch;
}

.gb-posts {
  margin: 0;
}

.gb-post {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.25rem 1rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}

.gb-post:last-child {
  border-bottom: 1px solid var(--line);
}

.gb-post .gb-post__date {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.7;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--graphite);
  padding-top: 0.3em;
  margin: 0;
  max-width: none;
}

.gb-post .gb-post__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.gb-post .gb-post__title a {
  text-decoration: none;
}

.gb-post .gb-post__title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.gb-post .gb-post__excerpt {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--graphite);
  margin: 0 0 0.6rem;
  max-width: 65ch;
}

.gb-post .gb-post__more {
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  max-width: none;
}

.gb-allwriting {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 1.5rem 0 0;
}

/* Contact ----------------------------------------------------------------- */
.gb-email {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.3rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  text-transform: uppercase;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
  margin: 0.25rem 0 1.75rem;
}

.gb-contactlinks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin: 0;
  padding: 0;
}

.gb-contactlinks li {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* 404 --------------------------------------------------------------------- */
.gb-404 {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.gb-404__code {
  font-family: var(--display);
  font-size: clamp(5rem, 18vw, 14rem);
  line-height: 0.85;
  color: var(--red);
  margin: 0;
}

.gb-404 h1 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.1;
  text-transform: uppercase;
  margin: 1.5rem 0 1rem;
}

/* Rows collapse on phones -------------------------------------------------- */
@media (max-width: 640px) {
  .gb-row,
  .gb-post {
    grid-template-columns: 1fr;
  }
  .gb-row__when,
  .gb-post .gb-post__date {
    padding-top: 0;
  }
}

/* Elementor integration ---------------------------------------------------- */
/* The home page is edited with Elementor; the design system stays in charge.
   Widgets carry the gb-* classes; Elementor defaults are neutralized here. */

.gb-content .elementor-widget {
  margin-bottom: 0;
}

/* Elementor "boxed" containers default to 1140px; the design shell is 1240px.
   Keep the catalogue aligned with the dynamic Writing/Contact sections. */
.gb-content .elementor-section .elementor-container {
  max-width: none;
}

.gb-content .elementor-widget-text-editor {
  font-family: var(--serif);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
}

.gb-content .elementor-widget-text-editor p {
  margin: 0 0 1.1em;
  max-width: 70ch;
}

.gb-content .elementor-widget-text-editor p:last-child {
  margin-bottom: 1.1em;
}

.gb-content .gb-hero__kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--graphite);
  margin: 0 0 1.75rem;
}

.gb-content .gb-hero__lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.3vw, 1.7rem);
  line-height: 1.5;
  max-width: 58ch;
  margin: 2rem 0 0;
  color: var(--ink);
}

.gb-content .gb-hero__meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.8;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--graphite);
  margin: 1.5rem 0 0;
}

.gb-content .gb-hero__kicker p,
.gb-content .gb-hero__lead p,
.gb-content .gb-hero__meta p {
  margin: 0;
  max-width: none;
}

.gb-content .gb-hero__name .elementor-heading-title {
  font-family: var(--display);
  font-size: clamp(3.4rem, 11.5vw, 10.5rem);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}

.gb-content .gb-hero__name .elementor-heading-title::after {
  content: "";
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  background: var(--red);
  margin-left: 0.08em;
}

.gb-content .gb-subhead .elementor-heading-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.9rem;
  color: var(--ink);
}

.gb-content .gb-subhead--first .elementor-heading-title {
  margin-top: 0.25rem;
}

/* Catalogue rail on Elementor columns: every widget except the section head. */
.gb-section.elementor-column > .elementor-widget-wrap > .elementor-element:not(.gb-head) {
  margin-left: var(--rail);
}

@media (max-width: 900px) {
  .gb-section.elementor-column > .elementor-widget-wrap > .elementor-element:not(.gb-head) {
    margin-left: 0;
  }
}