/* Dreams on Wheels — site shell */
:root {
  --ink: #1c2a24;
  --muted: #4a5c54;
  --paper: #eef3ef;
  --paper-deep: #dce6df;
  --sky: #3a8fb7;
  --sky-deep: #266f94;
  --leaf: #2f7d4a;
  --line: rgba(28, 42, 36, 0.12);
  --max: 1120px;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(58, 143, 183, 0.18), transparent 55%),
    radial-gradient(ellipse 70% 40% at 100% 0%, rgba(47, 125, 74, 0.12), transparent 50%),
    linear-gradient(180deg, #f4f8f5 0%, var(--paper) 40%, #e8f0ea 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--sky-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 72px;
  height: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-tag {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.45rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.15rem;
  align-items: center;
}

.site-nav > ul > li {
  position: relative;
}

.site-nav a {
  display: block;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav li.is-active > a,
.site-nav a:hover {
  color: var(--sky-deep);
}

.site-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(28, 42, 36, 0.1);
  flex-direction: column;
  padding: 0.4rem 0;
  z-index: 50;
}

.site-nav .has-sub:hover > .sub-menu,
.site-nav .has-sub:focus-within > .sub-menu {
  display: flex;
}

.site-nav .sub-menu a {
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.45rem 1rem;
}

.site-main {
  flex: 1;
  width: 100%;
}

.hero {
  position: relative;
  min-height: min(72vh, 620px);
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(18, 36, 30, 0.15) 0%, rgba(18, 36, 30, 0.72) 100%),
    url("/assets/img/hero.jpg") center / cover no-repeat;
  color: #f7fbf8;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 3rem;
  width: 100%;
  animation: rise 0.9s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 600;
  max-width: 28ch;
  opacity: 0.95;
}

.hero-lead {
  margin: 0 0 1.4rem;
  max-width: 42ch;
  font-size: 1.05rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.2rem;
  background: var(--sky);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: 2px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  background: var(--sky-deep);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.65);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.page-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 0.5rem;
  animation: rise 0.7s ease both;
}

.page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.page-content,
.romlicontainer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.home-content {
  padding-top: 2rem;
}

.page-content h2,
.romlicontainer h2 {
  font-family: var(--font-display);
  margin-top: 2rem;
}

.page-content figure,
.romlicontainer figure {
  margin: 1.5rem 0;
}

.page-content figcaption,
.romlicontainer figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #1c2a24;
  color: #d7e4dc;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  justify-content: space-between;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: #fff;
}

.footer-brand p,
.footer-meta p {
  margin: 0.35rem 0 0;
  color: #a8bdb0;
  font-size: 0.95rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-content: flex-start;
}

.footer-nav a {
  color: #e4efe8;
  text-decoration: none;
  font-weight: 600;
}

.footer-nav a:hover {
  color: #9fd0e8;
}

.footer-meta .romlifooter {
  margin-top: 0.75rem;
}

.footer-meta .romlifooter img {
  max-width: 120px;
}

/* Blog list from r-template_blog.php */
.blog-container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  animation: rise 0.6s ease both;
}

.blog-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.blog-title a {
  color: var(--ink);
  text-decoration: none;
}

.blog-title a:hover {
  color: var(--sky-deep);
}

.blog-preview {
  color: var(--muted);
  margin: 0;
}

.blog-preview p {
  margin: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #f4f8f5;
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav .sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding-left: 0.75rem;
  }

  .site-nav .has-sub.is-active > .sub-menu,
  .site-nav .has-sub:focus-within > .sub-menu,
  .site-nav.is-open .has-sub:hover > .sub-menu {
    display: flex;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .brand img {
    width: 56px;
  }

  .hero {
    min-height: 58vh;
  }
}
