/*
Theme Name: Portobello Press
Theme URI: https://portobellorpress.com
Author: Portobello Press
Description: Custom theme for Portobello Press, an independent publishing house in Rathgar, Dublin, dedicated to the works of historian Nellie Ó Cléirigh.
Version: 1.0.0
License: All rights reserved
Text Domain: portobello-press
*/

:root {
  --background: #ffffff;
  --surface: #ffffff;
  --foreground: #0d0d0d;
  --muted: #555550;
  --accent: #2a4a2c;
  --border: rgba(13, 13, 13, 0.1);
  --shadow-book: 6px 10px 40px rgba(0, 0, 0, 0.14), 1px 2px 6px rgba(0, 0, 0, 0.06);

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Lora", "Book Antiqua", Georgia, serif;
  --font-ui: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: #ffffff;
  color: var(--foreground);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  font-feature-settings: "liga" 1, "kern" 1;
}

a {
  color: inherit;
  text-decoration: none;
}

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

p {
  margin: 0;
}

/* Enable OpenType features on all display elements */
.site-brand__name,
.hero__title,
.page-intro__title,
.section-heading__title,
.book-entry__title,
.bio-aside__name,
.press-panel__title,
.contact-card__title,
.event-detail-card__header-title,
.pull-quote__text {
  font-feature-settings: "liga" 1, "dlig" 1, "onum" 1, "kern" 1;
}

/* ─── Layout ─────────────────────────────────────────────── */

.site-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-shell {
  flex: 1;
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0 0 6rem;
}

/* ─── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
  text-decoration: none;
}

.site-brand__mark {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  overflow: hidden;
}

.site-brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-brand__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--foreground);
}

/* ─── Navigation ─────────────────────────────────────────── */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  list-style: none;
}

.site-nav__link,
.site-nav a {
  position: relative;
  font-family: var(--font-ui);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.7rem 0.4rem;
  transition: color 180ms ease;
  text-decoration: none;
  display: inline-block;
}

.site-nav__link::after,
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0.1rem;
  left: 0.7rem;
  right: 0.7rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms cubic-bezier(0.25, 0, 0, 1);
}

.site-nav__link:hover,
.site-nav a:hover {
  color: var(--foreground);
}

.site-nav__link:hover::after,
.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav a.current-menu-item,
.site-nav__link[aria-current="page"] {
  color: var(--foreground);
}

.site-nav a.current-menu-item::after,
.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  opacity: 0.5;
}

/* ─── Footer ─────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem 0;
}

.site-footer__col {
  display: grid;
  gap: 0.4rem;
}

.site-footer__label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.site-footer__text {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.site-footer__link {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 150ms ease;
  text-decoration: none;
}

.site-footer__link:hover {
  color: var(--foreground);
}

.site-footer__copy {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  opacity: 0.6;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ─── Type utilities ─────────────────────────────────────── */

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--foreground);
}

/* ─── Divider ────────────────────────────────────────────── */

.ruled {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ─── Pull quote ─────────────────────────────────────────── */

.pull-quote {
  padding: 4rem 0;
  max-width: 44rem;
}

.pull-quote__text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  color: var(--foreground);
  margin: 0 0 1.25rem;
}

.pull-quote__attribution {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Page intro ─────────────────────────────────────────── */

.page-intro {
  display: grid;
  gap: 1rem;
  padding: 4rem 0 3rem;
  max-width: 52rem;
}

.page-intro__title {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(3rem, 6.5vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.page-intro__copy {
  font-size: 1.05rem;
  line-height: 1.82;
  color: var(--muted);
  max-width: 44rem;
}

/* ─── Section ────────────────────────────────────────────── */

.section {
  padding: 4rem 0;
}

.section-heading {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.section-heading__title {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

.section-heading__copy {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 38rem;
}

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 5rem 0 4rem;
  display: grid;
  gap: 1.5rem;
  max-width: 52rem;
}

.hero__title {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(3.6rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.025em;
}

.hero__title em {
  font-style: italic;
}

.hero__copy {
  font-size: 1.05rem;
  line-height: 1.82;
  color: var(--muted);
  max-width: 42rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

/* ─── Home books grid ────────────────────────────────────── */

.home-books {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5rem;
  align-items: start;
}

.home-book {
  display: grid;
  gap: 2rem;
  align-content: start;
}

.home-books-section {
  padding: 5rem 0;
}

.home-book__cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #ffffff;
  border: 1px solid rgba(13, 13, 13, 0.07);
  padding: 1.25rem 1.25rem 1.75rem;
  box-shadow: var(--shadow-book);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-book__cover--skeleton {
  flex-direction: column;
  gap: 0.75rem;
}

.home-book__cover-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.4;
}

.home-book__cover-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  color: var(--foreground);
  opacity: 0.25;
  line-height: 1.2;
  text-align: center;
}

.home-book__text {
  display: grid;
  gap: 0.75rem;
}

.home-book__title {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

.home-book__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}

.home-book__copy {
  font-size: 0.95rem;
  line-height: 1.78;
  color: var(--muted);
  margin-top: 0.25rem;
}

.home-book__meta {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* ─── Buttons ────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  min-height: 2.75rem;
  padding: 0.65rem 1.6rem;
  border-radius: 0;
  border: 1px solid transparent;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: var(--foreground);
  color: #ffffff;
  border-color: var(--foreground);
}

.button--primary:hover {
  background: #000000;
  border-color: #000000;
}

.button--secondary {
  background: transparent;
  border-color: rgba(13, 13, 13, 0.25);
  color: var(--foreground);
}

.button--secondary:hover {
  background: rgba(13, 13, 13, 0.04);
  border-color: rgba(13, 13, 13, 0.4);
}

/* ─── Books page ─────────────────────────────────────────── */

.books-list {
  display: grid;
  gap: 4rem;
}

.book-entry {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 3.5rem;
  align-items: start;
}

.book-entry--reverse {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.book-entry--reverse .book-entry__cover {
  order: 2;
}

.book-entry--reverse .book-entry__body {
  order: 1;
}
/* 
.book-entry__cover {
  position: relative;
}

.book-cover-mat {
  background: #ffffff;
  border: 1px solid rgba(13, 13, 13, 0.07);
  padding: 1.5rem 1.5rem 2rem;
  box-shadow: var(--shadow-book);
  display: flex;
  align-items: center;
  justify-content: center;
}
 */
.book-entry__cover {
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-mat {
  width: 100%;
  max-width: 320px; /* controls book size */
  aspect-ratio: 3 / 4; /* book-like shape */
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-mat img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* keeps full cover visible */
  display: block;
}

.book-cover-skeleton {
  background: #ffffff;
  border: 1px solid rgba(13, 13, 13, 0.07);
  padding: 1.5rem 1.5rem 2rem;
  box-shadow: var(--shadow-book);
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-skeleton__inner {
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(13, 13, 13, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
}

.book-cover-skeleton__label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.5;
}

.book-cover-skeleton__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  color: var(--foreground);
  opacity: 0.25;
  line-height: 1.2;
  text-align: center;
}

.book-entry__body {
  display: grid;
  gap: 1.25rem;
  padding-top: 0.5rem;
}

.book-entry__title {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 400;
  line-height: 0.97;
  letter-spacing: -0.015em;
}

.book-entry__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
  margin: -0.5rem 0 0;
}

.book-entry__description {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--muted);
}

.book-entry__description + .book-entry__description {
  margin-top: -0.5rem;
}

.book-entry__meta {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 0.4rem 3rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.book-entry__meta-item {
  display: grid;
  gap: 0.1rem;
}

.book-entry__meta-item strong {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--foreground);
}

.book-entry__highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.book-entry__highlights li {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  padding-left: 1.25rem;
  position: relative;
}

.book-entry__highlights li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* ─── About page ─────────────────────────────────────────── */

.bio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 3rem;
  align-items: start;
}

.bio-aside {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 5rem;
}

.bio-aside__name {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
}

.bio-aside__dates {
  font-family: var(--font-ui);
  font-size: 0.83rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.bio-aside__fields {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.bio-aside__field-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--foreground);
  margin-bottom: 0.1rem;
}

.bio-aside__field-value {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.bio-body {
  display: grid;
  gap: 1.25rem;
}

.bio-body p {
  font-size: 1.05rem;
  line-height: 1.88;
  color: var(--muted);
}

.bio-body p:first-child {
  color: var(--foreground);
  font-size: 1.1rem;
}

/* ─── Press panel ────────────────────────────────────────── */

.press-panel {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}

.press-panel__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin: 0 0 0.75rem;
}

.press-panel__copy {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--muted);
  max-width: 52rem;
}

.press-panel__copy + .press-panel__copy {
  margin-top: 1.25rem;
}

/* ─── Contact page ───────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.contact-card {
  display: grid;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.contact-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0;
}

.contact-card__body {
  font-size: 0.95rem;
  line-height: 1.78;
  color: var(--muted);
}

.contact-card__body a {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(13, 13, 13, 0.3);
  transition: text-decoration-color 150ms ease;
}

.contact-card__body a:hover {
  text-decoration-color: var(--foreground);
}

.contact-card__body p + p {
  margin-top: 1rem;
}

/* ─── Event page ─────────────────────────────────────────── */

.event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}

.event-detail-card {
  border: 1px solid var(--border);
  position: sticky;
  top: 5rem;
}

.event-detail-card__header {
  background: var(--foreground);
  padding: 1.5rem 1.75rem;
}

.event-detail-card__header-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.event-detail-card__header-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  color: #ffffff;
  margin: 0.3rem 0 0;
  line-height: 1.15;
}

.event-detail-card__body {
  display: grid;
}

.event-detail-row {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.85rem;
  align-items: baseline;
  padding: 1rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.event-detail-row:last-child {
  border-bottom: none;
}

.event-detail-row__icon {
  font-size: 0.8rem;
}

.event-detail-row__content {
  display: grid;
  gap: 0.15rem;
}

.event-detail-row__label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.event-detail-row__value {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--foreground);
  line-height: 1.55;
}

.event-detail-row__value--placeholder {
  color: var(--muted);
  font-style: italic;
}

.event-body {
  display: grid;
  gap: 1.4rem;
}

.event-body p {
  font-size: 1.05rem;
  line-height: 1.88;
  color: var(--muted);
}

.event-body p:first-child {
  color: var(--foreground);
}

/* ─── Text link ──────────────────────────────────────────── */

.text-link {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(13, 13, 13, 0.3);
  transition: text-decoration-color 150ms ease;
}

.text-link:hover {
  text-decoration-color: var(--foreground);
}

/* ─── Section action ─────────────────────────────────────── */

.section-action {
  margin-top: 2.5rem;
}

/* ─── Event CTA (home page) ─────────────────────────────── */

.event-cta {
  display: grid;
  gap: 1.25rem;
  max-width: 44rem;
}

.event-cta__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
}

.event-cta__title em {
  font-style: italic;
}

.event-cta__copy {
  font-size: 1rem;
  line-height: 1.82;
  color: var(--muted);
}

/* ─── Author strip (home page) ───────────────────────────── */

.author-strip {
  display: flex;
  flex-direction: column;
  min-width: 100%;
  gap: 0.75rem;
  max-width: 38rem;
}

.author-strip__copy {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ─── Stack utility ──────────────────────────────────────── */

.stack {
  display: grid;
  gap: 0;
}

/* ─── Responsive ─────────────────────────────────────────── */

@media (max-width: 900px) {

  .book-entry,
  .book-entry--reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .book-entry--reverse .book-entry__cover,
  .book-entry--reverse .book-entry__body {
    order: unset;
  }

  .book-cover-mat,
  .book-cover-skeleton {
    max-width: 16rem;
    margin: 0 auto;
  }

  .home-books {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .bio-grid {
    grid-template-columns: 1fr;
  }

  .bio-aside {
    position: static;
  }

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

  .event-detail-card {
    position: static;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .site-footer__inner {
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem 0;
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero__title {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .page-intro__title {
    font-size: clamp(2.4rem, 12vw, 3.5rem);
  }
}
