/* ==========================================================================
   Line-Maria Lång — 2026 design
   ========================================================================== */

:root {
  --font-serif: "Instrument Serif", serif;
  --font-sans: "Inter", sans-serif;

  --bg: oklch(98% 0.006 85);
  --text: oklch(20% 0.012 85);
  --text-soft: oklch(38% 0.012 85);
  --text-muted: oklch(50% 0.01 85);
  --border: oklch(88% 0.006 85);

  --accent: oklch(50% 0.14 320);
  --accent-hover: oklch(38% 0.14 320);
  --accent-tint: oklch(93% 0.025 320);

  --reviews-bg: oklch(24% 0.05 320);
  --reviews-text: oklch(96% 0.01 320);
  --reviews-mark: oklch(75% 0.08 320);

  --footer-bg: oklch(20% 0.012 85);
  --footer-text: oklch(94% 0.006 85);
  --footer-link: oklch(75% 0.1 320);

  --container: 1360px;
  --container-narrow: 1100px;

  /* Fallback only — layout.liquid measures the real sticky header height on
     load/resize and overrides this, since the header's height can shift
     with font loading/breakpoints and a hardcoded number drifts out of sync. */
  --header-height: 90px;
}

html {
  font-size: 110%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
}

/* Clips horizontal sub-pixel overflow (e.g. the hero's decorative offset
   panel) without putting overflow-x on html/body — an ancestor with
   non-visible overflow anywhere above .site-header breaks its
   position: sticky in Chromium/WebKit, even on the x-axis only. Scoped to
   this wrapper (everything except the header) so the sticky header keeps
   the real viewport as its scrolling context. */
.page-overflow-guard {
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* In-page anchors — offset for the sticky header */
#maanegade,
#boeger,
#kontakt {
  scroll-margin-top: var(--header-height);
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(98% 0.006 85 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header-logo {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
}

.site-header-nav {
  display: flex;
  gap: 2.75rem;
}

.site-header-link {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.site-header-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.site-header-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header-toggle.is-open .site-header-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header-toggle.is-open .site-header-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header-toggle.is-open .site-header-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Home — hero ------------------------------------------------------------- */

.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 5.5rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4.5rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6.5vw, 6rem);
  line-height: 0.97;
  margin: 0 0 2rem;
  font-weight: 400;
}

.hero-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.55rem;
  line-height: 1.5;
  color: var(--text-soft);
  max-width: 32rem;
  margin: 0 0 0.75rem;
}

.hero-attribution {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  text-transform: uppercase;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.2rem;
}

.hero-image {
  position: relative;
}

.hero-image-offset {
  position: absolute;
  inset: 1.5rem -1.5rem -1.5rem 1.5rem;
  background: var(--accent-tint);
  z-index: 0;
}

.hero-image img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

/* Home — about ------------------------------------------------------------ */

.about {
  max-width: var(--container);
  margin: 0 auto;
  padding: 4.5rem 2rem 6rem;
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
}

.about-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 400;
  margin: 0 0 1.75rem;
}

.about-image img {
  display: block;
  width: 100%;
  height: auto;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.about-quote {
  margin: 0;
}

.about-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.7;
  margin: 0;
}

.about-quote p + p {
  margin-top: 0.75rem;
}

.about-quote footer {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-bio {
  font-size: 1.08rem;
  line-height: 1.8;
}

.about-bio p {
  margin: 0 0 1.4rem;
}

.about-bio p:last-child {
  margin: 0;
}

/* Home — books ------------------------------------------------------------ */

.books {
  max-width: var(--container);
  margin: 0 auto;
  padding: 4.5rem 2rem 6rem;
  border-top: 1px solid var(--border);
}

.books-title {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 400;
  margin: 0 0 3rem;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 2.75rem;
}

.book-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.book-card-cover {
  overflow: hidden;
  box-shadow: 0 12px 28px -14px oklch(20% 0.01 85 / 0.35);
  margin-bottom: 1rem;
  transition: transform 0.25s;
}

.book-card:hover .book-card-cover {
  transform: translateY(-6px);
}

.book-card-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.book-card-title {
  font-weight: 600;
  font-size: 1.02rem;
}

.book-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.book-card-more {
  font-size: 0.82rem;
  color: var(--accent);
  margin-top: 0.4rem;
  font-weight: 600;
}

/* Home — reviews ---------------------------------------------------------- */

.reviews {
  background: var(--reviews-bg);
  color: var(--reviews-text);
  padding: 5rem 2rem;
}

.reviews-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.review-mark {
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 0.6;
  color: var(--reviews-mark);
  margin-bottom: 0.5rem;
}

.review-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.review-source {
  font-size: 0.85rem;
  opacity: 0.75;
}

.review-video {
  display: flex;
  flex-direction: column;
}

.review-video-el {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  background: oklch(0% 0 0 / 0.4);
  margin: 0 0 1.25rem;
}

/* Book detail ------------------------------------------------------------- */

.book {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 3.5rem 2rem 6rem;
}

.book-back {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.book-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  margin-top: 2.5rem;
  align-items: start;
}

.book-side {
  display: block;
}

.book-cover {
  display: block;
  width: 100%;
  box-shadow: 0 20px 40px -18px oklch(20% 0.01 85 / 0.4);
  transform: rotate(-1deg);
}

.book-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.book-title {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 400;
  margin: 0 0 1.25rem;
}

.book-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
}

.book-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.55;
}

.book-lead p {
  margin: 0 0 0.5rem;
}

.book-lead p:last-child {
  margin-bottom: 1.75rem;
}

.book-body {
  font-size: 1.05rem;
  line-height: 1.8;
}

.book-body p {
  margin: 0 0 1.25rem;
}

.book-quote {
  margin: 1.5rem 0 0;
}

.book-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 0;
}

.book-quote p + p {
  margin-top: 0.9rem;
}

.book-quote footer {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.book-quote .book-speaker {
  font-weight: 900;
  text-decoration: underline;
}

.book-reviews {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 3rem;
}

.book-review {
  margin: 0;
}

.book-review p {
  margin: 0 0 0.6rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.7;
}

.book-review-rating {
  display: block;
  color: var(--accent);
  letter-spacing: 0.2em;
  font-size: 0.95rem;
  margin: 0 0 0.6rem;
}

.book-review cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.book-review cite a {
  color: var(--text-muted);
}

.book-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  list-style-type: "→ ";
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 1.75rem 0;
  background: var(--border);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 3rem 2rem;
}

.site-footer-contact {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* Matches .reviews-grid's gap so this grid's column edges line up with
     the reviews-grid columns above it (both share --container/2rem side
     padding, so equal gaps + equal fr tracks means equal boundaries). */
  gap: 3rem;
}

.site-footer-contact-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.site-footer-contact-heading {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 0.2rem;
}

.site-footer-contact-name {
  font-weight: 600;
}

.site-footer-contact-col address {
  font-style: normal;
}

.site-footer-contact-col a {
  color: var(--footer-link);
  text-decoration: none;
}

.site-footer-contact-col a:hover {
  text-decoration: underline;
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 900px) {
  .hero,
  .about-grid,
  .reviews-grid,
  .book-grid,
  .site-footer-contact {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 3rem;
    padding: 3.5rem 2rem 4rem;
  }

  .about-grid,
  .book-grid {
    gap: 3rem;
  }

  .reviews-grid {
    gap: 2.5rem;
  }
}

@media (max-width: 700px) {
  .site-header-inner {
    position: relative;
  }

  .site-header-toggle {
    display: flex;
  }

  .site-header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .site-header-nav.is-open {
    max-height: 20rem;
  }

  .site-header-link {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 640px) {
  .site-header-inner,
  .hero,
  .about,
  .books,
  .book,
  .reviews,
  .site-footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Match the reduced side padding above — otherwise this decorative
     offset panel pushes past the hero's edge and causes the whole page
     to overflow horizontally on narrow (phone) viewports. */
  .hero-image-offset {
    inset: 1.5rem -1.25rem -1.25rem 1.5rem;
  }
}
