/*
Theme Name: Terpene News Starter
Theme URI: https://allthingsterpenes.com/
Author: SDR Productions
Author URI: https://allthingsterpenes.com/
Description: Clean, modern editorial theme inspired by the provided Terpene News UI. Includes homepage hero, module grid, newsletter card, and a terpene profile-style single layout. Lightweight and Gutenberg-friendly.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: terpene-news
Tags: blog, news, custom-menu, custom-logo, two-columns, right-sidebar, editor-style
*/

:root {
  --tn-bg: #f7f9f6;
  --tn-surface: #ffffff;
  --tn-ink: #0b0f0c;
  --tn-muted: #4b5a50;
  --tn-border: rgba(10, 18, 12, 0.10);
  --tn-accent: #19e319; /* bright terpene green */
  --tn-accent-2: #0d3b1f; /* deep green */
  --tn-accent-warm: #d07700; /* methodology orange */
  --tn-radius-lg: 20px;
  --tn-radius-md: 14px;
  --tn-shadow: 0 12px 40px rgba(10, 18, 12, 0.10);
  --tn-max: 1160px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--tn-ink);
  background: var(--tn-bg);
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

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

.tn-container {
  max-width: var(--tn-max);
  margin: 0 auto;
  padding: 0 20px;
}

.tn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--tn-accent);
  color: #001300;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform .06s ease, filter .12s ease;
}
.tn-btn:hover { filter: brightness(0.95); text-decoration: none; }
.tn-btn:active { transform: translateY(1px); }

.tn-btn--ghost {
  background: transparent;
  border-color: var(--tn-border);
  color: var(--tn-ink);
}
.tn-btn--dark {
  background: var(--tn-accent-2);
  color: #f3fff7;
}
.tn-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(25, 227, 25, 0.15);
  border: 1px solid rgba(25, 227, 25, 0.35);
  color: #0b3a15;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tn-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 246, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--tn-border);
}
.tn-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 74px;
}
.tn-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.tn-brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--tn-accent);
  display: grid;
  place-items: center;
  color: #001300;
  font-weight: 900;
}
.tn-nav {
  justify-self: center;
}
.tn-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  padding: 0;
  margin: 0;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  color: rgba(11, 15, 12, 0.75);
}
.tn-nav a:hover { text-decoration: none; color: var(--tn-ink); }
.tn-actions {
  justify-self: end;
  display: flex;
  gap: 10px;
  align-items: center;
}
.tn-search {
  position: relative;
}
.tn-search input[type="search"] {
  width: min(340px, 42vw);
  padding: 11px 14px 11px 38px;
  border-radius: 12px;
  border: 1px solid var(--tn-border);
  background: rgba(255,255,255,0.7);
  outline: none;
}
.tn-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
}

@media (max-width: 820px) {
  .tn-header__inner { grid-template-columns: 1fr auto; grid-template-areas: "brand actions" "nav nav"; height: auto; padding: 10px 0 14px; }
  .tn-brand { grid-area: brand; }
  .tn-actions { grid-area: actions; }
  .tn-nav { grid-area: nav; justify-self: start; }
  .tn-nav ul { gap: 14px; flex-wrap: wrap; }
  .tn-search input[type="search"] { width: 56vw; }
}

.tn-hero {
  /* Match mockup: full-width hero band (no "card" border) */
  margin-top: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  padding: 14px 0 0;
  background:
    radial-gradient(980px 560px at 78% 38%, rgba(25, 227, 25, 0.20), transparent 56%),
    radial-gradient(880px 620px at 100% 90%, rgba(208, 119, 0, 0.12), transparent 58%),
    linear-gradient(135deg, rgba(245, 248, 245, 0.96), rgba(230, 238, 231, 0.88));
}
.tn-hero__inner {
  max-width: var(--tn-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 34px;
  padding: 74px 20px 58px;
  min-height: 520px;
  align-items: center;
}
.tn-hero h1 {
  font-size: clamp(42px, 5.2vw, 78px);
  line-height: 0.95;
  margin: 12px 0 16px;
  letter-spacing: -0.03em;
}
.tn-hero h1 em {
  font-style: normal;
  color: var(--tn-accent);
}
.tn-hero p {
  color: var(--tn-muted);
  font-size: 16px;
  max-width: 52ch;
}
.tn-card {
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--tn-border);
  border-radius: var(--tn-radius-lg);
  box-shadow: var(--tn-shadow);
}
.tn-card__pad { padding: 22px; }
.tn-form label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(11,15,12,0.55);
  margin-bottom: 8px;
}
.tn-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--tn-border);
  background: rgba(255,255,255,0.88);
  outline: none;
}
.tn-form .tn-btn {
  width: 100%;
  margin-top: 12px;
  border-radius: 14px;
  padding: 14px 18px;
}

.tn-hero__aside {
  display: grid;
  gap: 14px;
  align-content: start;
}
.tn-quote {
  padding: 18px 18px 18px 18px;
  border-radius: var(--tn-radius-md);
  background: rgba(255,255,255,0.40);
  border: 1px solid rgba(255,255,255,0.35);
}
.tn-quote small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(11,15,12,0.55);
}
.tn-quote p {
  margin: 10px 0 0;
  color: rgba(11,15,12,0.7);
  font-style: italic;
}

@media (max-width: 980px) {
  .tn-hero__inner { grid-template-columns: 1fr; min-height: auto; padding: 44px 20px; }
}

.tn-section {
  padding: 34px 0 10px;
}
.tn-section h2 {
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  font-size: 26px;
}
.tn-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.tn-module {
  /* 3 modules (9 cols) + sidebar (3 cols) => one-row layout on desktop */
  grid-column: span 3;
  overflow: hidden;
  border-radius: var(--tn-radius-lg);
  border: 1px solid var(--tn-border);
  background: var(--tn-surface);
}
.tn-module__media {
  height: 170px;
  background:
    radial-gradient(360px 180px at 50% 30%, rgba(25, 227, 25, 0.20), transparent 60%),
    linear-gradient(135deg, rgba(10,18,12,0.85), rgba(10,18,12,0.10));
}
.tn-module__body { padding: 18px 18px 20px; }
.tn-kicker {
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(11,15,12,0.55);
}
.tn-module h3 {
  margin: 10px 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.tn-module p { margin: 0; color: var(--tn-muted); font-size: 14px; }

.tn-sidebar {
  grid-column: span 3;
}

@media (max-width: 980px) {
  .tn-module { grid-column: span 12; }
  .tn-sidebar { grid-column: span 12; }
}

.tn-postlist {
  display: grid;
  gap: 14px;
}
.tn-post {
  background: var(--tn-surface);
  border: 1px solid var(--tn-border);
  border-radius: 18px;
  overflow: hidden;
}
.tn-post__pad { padding: 18px; }
.tn-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(11,15,12,0.6);
  font-size: 12px;
}
.tn-meta a { color: inherit; }
.tn-post h2, .tn-post h1 {
  margin: 8px 0 0;
  letter-spacing: -0.02em;
}
.tn-post h2 { font-size: 24px; }
.tn-post p {
  margin: 10px 0 0;
  color: var(--tn-muted);
}

.tn-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
  padding: 26px 0 44px;
}
@media (max-width: 980px) {
  .tn-layout { grid-template-columns: 1fr; }
}

.tn-aside {
  display: grid;
  gap: 14px;
  align-content: start;
}
.tn-aside .tn-card { box-shadow: none; }
.tn-aside h3 {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(11,15,12,0.6);
}

.tn-footer {
  border-top: 1px solid var(--tn-border);
  padding: 26px 0 40px;
  color: rgba(11,15,12,0.6);
}
.tn-footer__grid {
  display: grid;
  gap: 12px;
}
.tn-footer small { color: rgba(11,15,12,0.55); }

.tn-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tn-tag {
  border: 1px solid rgba(25, 227, 25, 0.35);
  background: rgba(25, 227, 25, 0.10);
  color: #0b3a15;
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 800;
  font-size: 12px;
}
.tn-tag:hover { text-decoration: none; filter: brightness(0.98); }

.tn-profile-hero {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--tn-border);
  background:
    radial-gradient(900px 520px at 30% 20%, rgba(25, 227, 25, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(10,18,12,0.80), rgba(10,18,12,0.05));
  height: 320px;
  position: relative;
}
.tn-profile-hero__img {
  position: absolute;
  inset: 0;
  opacity: 0.85;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}
.tn-profile-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,18,12,0.10), rgba(10,18,12,0.60));
}
.tn-profile-title {
  margin-top: -120px;
  position: relative;
}
.tn-profile-title h1 {
  font-size: clamp(38px, 4.4vw, 62px);
  line-height: 1.0;
  margin: 10px 0 10px;
}
.tn-profile-title p {
  color: rgba(11,15,12,0.65);
  margin: 0;
  max-width: 70ch;
}
.tn-divider {
  height: 1px;
  background: var(--tn-border);
  margin: 20px 0;
}
