/*
Theme Name: Tristan Editorial Theme
Theme URI: https://tristangardner.co.uk/
Author: Tristan Gardner
Description: Minimal editorial WordPress theme with separate front page and regular page templates.
Version: 0.0.3
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: tristan-editorial-theme
*/

:root {
  --tg-navy: #0F2747;
  --tg-navy-hover: #17365f;
  --tg-warm-grey: #8A8F98;
  --tg-text: #10233d;
  --tg-text-muted: #66758a;
  --tg-bg: #f7f6f2;
  --tg-surface: #ffffff;
  --tg-surface-alt: #f1f3f5;
  --tg-border: rgba(15, 39, 71, 0.12);
  --tg-shadow: 0 12px 36px rgba(15, 39, 71, 0.06);
  --tg-radius-sm: 12px;
  --tg-radius-md: 20px;
  --tg-radius-pill: 999px;
  --tg-content: 760px;
  --tg-wide: 1120px;
  --tg-space-2: 0.5rem;
  --tg-space-3: 0.75rem;
  --tg-space-4: 1rem;
  --tg-space-5: 1.25rem;
  --tg-space-6: 1.5rem;
  --tg-space-8: 2rem;
  --tg-space-10: 2.5rem;
  --tg-space-12: 3rem;
  --tg-space-16: 4rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--tg-text);
  background: var(--tg-bg);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(247, 246, 242, 0.88);
  border-bottom: 1px solid rgba(15, 39, 71, 0.08);
}
.header-inner,
.site-footer-inner,
.front-page__section,
.page-shell,
.archive-shell,
.not-found-shell {
  width: min(calc(100% - 2rem), var(--tg-wide));
  margin: 0 auto;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.site-branding a {
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--tg-text-muted);
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a:focus { color: var(--tg-text); }

.front-page {
  padding: var(--tg-space-8) 0 var(--tg-space-16);
}
.front-page__hero {
  display: grid;
  gap: var(--tg-space-8);
  align-items: end;
  padding: var(--tg-space-8) 0 var(--tg-space-10);
}
.front-page__eyebrow {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: var(--tg-radius-pill);
  background: rgba(15, 39, 71, 0.06);
  color: var(--tg-navy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.front-page__title {
  margin: 0.8rem 0 1rem;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 12ch;
}
.front-page__lead {
  max-width: 56ch;
  color: var(--tg-text-muted);
  font-size: 1.05rem;
}
.front-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: var(--tg-space-6);
}
.button,
.wp-block-button__link,
input[type="submit"],
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.2rem;
  border-radius: var(--tg-radius-pill);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s ease;
}
.button--primary,
.wp-block-button__link,
input[type="submit"] {
  background: var(--tg-navy);
  color: #fff;
}
.button--primary:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover { background: var(--tg-navy-hover); }
.button--secondary {
  background: transparent;
  color: var(--tg-text);
  border-color: var(--tg-border);
}
.front-page__panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.98));
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius-md);
  padding: var(--tg-space-6);
  box-shadow: var(--tg-shadow);
}
.front-page__panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}
.front-page__panel p {
  margin: 0;
  color: var(--tg-text-muted);
}
.front-page__image {
  margin-top: var(--tg-space-8);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--tg-shadow);
}
.front-page__image img { width: 100%; object-fit: cover; }
.front-page__content {
  padding-top: var(--tg-space-10);
}
.front-page__content-inner,
.page-content {
  width: min(100%, var(--tg-content));
}
.front-page__content .entry-content > *:first-child,
.page-content .entry-content > *:first-child { margin-top: 0; }
.front-page__content .entry-content > *:last-child,
.page-content .entry-content > *:last-child { margin-bottom: 0; }

.page-template-regular .page-shell,
.page-default .page-shell,
.page-shell {
  padding: var(--tg-space-8) 0 var(--tg-space-16);
}
.page-hero {
  width: min(100%, var(--tg-content));
  padding: var(--tg-space-8) 0 var(--tg-space-6);
}
.page-hero__title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.page-hero__excerpt {
  margin: 1rem 0 0;
  color: var(--tg-text-muted);
  max-width: 58ch;
  font-size: 1.05rem;
}
.page-content {
  background: transparent;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.entry-content p,
.entry-content li {
  color: var(--tg-text);
  max-width: 70ch;
}
.entry-content a {
  color: var(--tg-navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}
.entry-content figure,
.entry-content img {
  border-radius: 18px;
}

.site-footer {
  border-top: 1px solid rgba(15, 39, 71, 0.08);
  margin-top: var(--tg-space-12);
}
.site-footer-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--tg-text-muted);
  font-size: 0.95rem;
}
.site-footer p { margin: 0; }

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

@media (min-width: 768px) {
  .front-page__hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  }
}
