/*
Theme Name: Jonah
Theme URI: https://jonah.net
Author: Carson Mehl
Description: A minimal splash-page theme for Jonah.net. Pick a background color, upload a logo, and posts appear below the fold in reverse chronological order.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jonah
*/

:root {
  --splash-bg: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: var(--splash-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Splash (above the fold) ---------- */

.splash {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: var(--splash-bg);
}

.splash__logo img,
.splash__logo .custom-logo {
  display: block;
  /* Responsive: scales with the viewport, capped on huge screens */
  width: clamp(240px, 60vw, 720px);
  max-width: 90vw;
  height: auto;
}

/* Fallback when no logo is uploaded: show the site title, large and centered */
.splash__title {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
}

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

/* ---------- Posts (below the fold) ---------- */

.posts {
  max-width: 42rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 6rem;
}

.post-entry {
  margin-bottom: 4rem;
}

.post-entry:last-child {
  margin-bottom: 0;
}

.post-entry__title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.post-entry__title a {
  color: inherit;
  text-decoration: none;
}

.post-entry__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-entry__date {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #757575;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-entry__content {
  font-size: 1.0625rem;
}

.post-entry__content > *:first-child {
  margin-top: 0;
}

.post-entry__content a {
  color: inherit;
}

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

/* Pagination */
.posts-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  font-weight: 600;
}

.posts-nav a {
  color: inherit;
  text-decoration: none;
}

.posts-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Screen-reader helper */
.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}
