/*
Theme Name: Penman OnePager
Theme URI: https://penmanbooks.com
Author: Penman Books
Author URI: https://penmanbooks.com
Description: Lightweight one-page theme generated from PSD. Includes built-in signup form with email + redirect.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: penman-onepager
*/

/* Base reset & typography */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #111;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: min(1100px, 92%); margin: 0 auto; }
.section { padding: 64px 0; }
.section--light { background: #fff; }
.section--muted { background: #f6f8fb; }

.header {
  position: sticky; top: 0; z-index: 999; background: #ffffffd9; backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.nav__brand { font-weight: 700; font-size: 20px; }
.nav__links a { margin-left: 16px; opacity: .8; }
.nav__links a:hover { opacity: 1; }

.hero {
  padding: 96px 0 64px;
  background: linear-gradient(180deg, #f9fbff 0%, #ffffff 100%);
}
.hero__title { font-size: clamp(28px, 5vw, 48px); line-height: 1.15; margin: 0 0 12px; }
.hero__subtitle { font-size: clamp(16px, 3.2vw, 20px); opacity: .8; margin: 0 0 28px; }
.cta {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px; border-radius: 10px; border: 1px solid #111; background: #111; color: #fff; cursor: pointer;
}
.button--ghost { background: transparent; color: #111; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid #eee; border-radius: 14px; padding: 18px; box-shadow: 0 4px 14px rgba(0,0,0,.04); }
.card h3 { margin: 10px 0 8px; font-size: 18px; }

.form { display: grid; gap: 12px; max-width: 520px; }
.input, .textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #dcdcdc; background: #fff; font-size: 16px;
}
.textarea { min-height: 120px; resize: vertical; }
.notice { font-size: 13px; opacity: .7; }

.footer { padding: 32px 0; border-top: 1px solid #eee; font-size: 14px; opacity: .8; }

/* === PSD-driven hero === */
.hero.hero--psd {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
}
.hero.hero--psd::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #f5f8fc center/cover no-repeat;
  /* Use the largest image by default; smaller images load via media queries below */
  background-image: url('assets/img/landing-1920.jpg');
  z-index: 0;
}
/* Responsive fallbacks for smaller screens */
@media (max-width: 1280px) {
  .hero.hero--psd::before {
    background-image: url('assets/img/landing-1280.jpg');
  }
}
@media (max-width: 820px) {
  .hero.hero--psd::before {
    background-image: url('assets/img/landing-800.jpg');
  }
}
.hero .container { position: relative; z-index: 1; }

/* Optional overlay to ensure text is legible regardless of PSD brightness */
.hero__scrim {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.12) 40%, rgba(0,0,0,0) 100%);
  pointer-events: none;
}

/* Optional custom font hook — drop WOFF2 files in /assets/fonts and rename below */
@font-face {
  font-family: 'PenmanCustom';
  src: url('assets/fonts/custom.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.has-custom-font {
  font-family: 'PenmanCustom', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}
