/*
Theme Name: Rhys J Growth
Theme URI: https://rhysj.com
Author: Rhys J
Author URI: https://rhysj.com
Description: Custom theme for a growth & SEO consultancy targeting SaaS and tech startups. Sharp, data-forward design.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rhysj
*/

:root {
  --paper: #EFEEE9;
  --paper-raised: #F8F7F3;
  --ink: #14161C;
  --ink-soft: #4B4E58;
  --ink-faint: #8A8D95;
  --line: #D6D4CA;
  --cobalt: #2E3EEB;
  --cobalt-deep: #1D28A8;
  --signal: #A6FF3D;
  --radius: 3px;
  font-size: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

/* ---------- NAV ---------- */
header.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(239,238,233,0.92);
  backdrop-filter: blur(6px);
  z-index: 50;
}
nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.logo span { color: var(--cobalt); }
.nav-mobile-hide { display: flex; align-items: center; gap: 32px; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.92rem; color: var(--ink-soft); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--ink); }

/* Dropdown */
.nav-links li { position: relative; }
.nav-links li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 6px;
  margin-bottom: 2px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}
.nav-links .sub-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 210px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}
.nav-links li.menu-item-has-children:hover > .sub-menu,
.nav-links li.menu-item-has-children.open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-links .sub-menu li { width: 100%; }
.nav-links .sub-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.nav-links .sub-menu a:hover { background: var(--paper); color: var(--ink); }
.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-cta:hover { background: var(--cobalt-deep); color: var(--paper); }

.menu-toggle { display: none; }

/* ---------- HERO ---------- */
.hero { padding: 96px 0 88px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; border-top: none; }
.hero h1 { font-size: clamp(2.3rem, 4vw, 3.4rem); max-width: 15ch; }
.hero p.lede { margin-top: 24px; font-size: 1.12rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { margin-top: 36px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

.btn-primary {
  background: var(--cobalt);
  color: #fff;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: var(--cobalt-deep); color: #fff; }
.btn-ghost { font-size: 0.92rem; color: var(--ink-soft); border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

.chart-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 18px; }
.chart-card .chart-label { font-size: 0.82rem; color: var(--ink-faint); display: flex; justify-content: space-between; margin-bottom: 4px; }
.chart-card .chart-value { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 2rem; margin-bottom: 12px; }
.chart-card .chart-value small { font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.95rem; color: var(--cobalt-deep); margin-left: 8px; }
.chart-card svg { display: block; width: 100%; height: auto; }
.chart-foot { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--ink-faint); margin-top: 6px; }

/* ---------- SECTION SHARED ---------- */
section.block { padding: 76px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.section-head p { color: var(--ink-soft); font-size: 1.02rem; max-width: 48ch; align-self: end; }

/* ---------- PROBLEM ---------- */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.problem-item { background: var(--paper); padding: 28px 26px; }
.problem-item h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 10px; }
.problem-item p { font-size: 0.94rem; color: var(--ink-soft); }

/* ---------- SERVICES ---------- */
.offers { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; align-items: stretch; }
.offer { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 30px; display: flex; flex-direction: column; }
.offer-audit { background: var(--paper-raised); }
.offer-retainer { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.offer-kicker { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 10px; }
.offer-retainer .offer-kicker { color: #9EA3B8; }
.offer h3 { font-size: 1.35rem; margin-bottom: 6px; }
.offer-retainer h3 { color: var(--paper); }
.offer .offer-desc { font-size: 0.96rem; color: var(--ink-soft); margin-bottom: 22px; }
.offer-retainer .offer-desc { color: #C4C7D6; }
.offer ul { list-style: none; margin-bottom: 24px; flex: 1; }
.offer li { font-size: 0.92rem; padding: 8px 0; border-top: 1px solid var(--line); }
.offer-retainer li { border-top: 1px solid #2C2F3A; color: #DDDFE9; }
.offer li:first-child { border-top: none; }
.offer-price { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 1.1rem; margin-bottom: 18px; }
.offer-retainer .offer-price { color: var(--signal); }
.offer-cta { align-self: flex-start; font-size: 0.92rem; font-weight: 600; padding: 12px 22px; border-radius: var(--radius); }
.offer-audit .offer-cta { background: var(--ink); color: var(--paper); }
.offer-retainer .offer-cta { background: var(--signal); color: var(--ink); }

/* ---------- PROCESS ---------- */
.process-list { display: flex; flex-direction: column; }
.process-row { display: grid; grid-template-columns: 64px 1fr 2fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); align-items: baseline; }
.process-row:first-child { border-top: none; }
.process-num { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 1.6rem; color: var(--cobalt); }
.process-row h3 { font-size: 1.05rem; }
.process-row p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- RESULTS ---------- */
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.result-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.result-tag { font-size: 0.8rem; color: var(--ink-faint); margin-bottom: 16px; }
.result-metric { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 1.9rem; color: var(--cobalt-deep); margin-bottom: 6px; }
.result-card p.detail { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq-item { border-top: 1px solid var(--line); padding: 22px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { font-weight: 600; font-size: 1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: none; border: none; width: 100%; text-align: left; color: var(--ink); font-family: 'Inter', sans-serif; }
.faq-q .plus { font-family: 'Archivo', sans-serif; font-size: 1.2rem; color: var(--cobalt); transition: transform 0.2s ease; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; font-size: 0.94rem; color: var(--ink-soft); }
.faq-item.open .faq-a { max-height: 260px; margin-top: 12px; }

/* ---------- CTA BAND ---------- */
.cta-band { background: var(--ink); color: var(--paper); padding: 88px 0; border-top: none; }
.cta-band .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; padding-top: 8px; }
.cta-band h2 { color: var(--paper); font-size: clamp(1.8rem, 3vw, 2.4rem); max-width: 16ch; }
.cta-band p { color: #B7BACA; margin-top: 14px; max-width: 42ch; }
.cta-band .btn-primary { background: var(--signal); color: var(--ink); }
.cta-band .btn-primary:hover { background: #8FE02E; color: var(--ink); }
.cta-band-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cta-note { font-size: 0.85rem; color: #8B8FA3; }

/* ---------- CONTACT FORM 7 ---------- */
.contact-form-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--ink);
}
.contact-form-card .wpcf7-form p { margin-bottom: 18px; }
.contact-form-card .wpcf7-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.contact-form-card .wpcf7-form input[type="text"],
.contact-form-card .wpcf7-form input[type="email"],
.contact-form-card .wpcf7-form input[type="tel"],
.contact-form-card .wpcf7-form input[type="url"],
.contact-form-card .wpcf7-form select,
.contact-form-card .wpcf7-form textarea {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 0.96rem;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
}
.contact-form-card .wpcf7-form input:focus,
.contact-form-card .wpcf7-form select:focus,
.contact-form-card .wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--cobalt);
}
.contact-form-card .wpcf7-form textarea { min-height: 110px; resize: vertical; }
.contact-form-card .wpcf7-form input[type="submit"] {
  background: var(--signal);
  color: var(--ink);
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease;
}
.contact-form-card .wpcf7-form input[type="submit"]:hover { background: #8FE02E; }
.contact-form-card .wpcf7-form input[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; }
.contact-form-card .wpcf7-spinner { margin-left: 10px; }
.contact-form-card .wpcf7-not-valid-tip {
  color: #FF6B6B;
  font-size: 0.82rem;
  margin-top: 4px;
}
.contact-form-card .wpcf7-not-valid { border-color: #FF6B6B !important; }
.contact-form-card .wpcf7-response-output {
  border-radius: var(--radius);
  font-size: 0.9rem;
  padding: 12px 14px;
  margin-top: 16px;
  border: 1px solid var(--line);
}
.contact-form-card form.sent .wpcf7-response-output {
  border-color: var(--signal);
  background: rgba(166,255,61,0.15);
}
.contact-form-card form.failed .wpcf7-response-output,
.contact-form-card form.aborted .wpcf7-response-output {
  border-color: #FF6B6B;
  background: rgba(255,107,107,0.1);
}

footer.site-footer { padding: 40px 0; border-top: 1px solid var(--line); }
footer.site-footer .wrap { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--ink-faint); flex-wrap: wrap; gap: 12px; }

/* ---------- BLOG / GENERIC PAGE ---------- */
.page-hero { padding: 72px 0 40px; border-top: none; }
.page-hero h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); max-width: 20ch; }
.entry-content { padding: 0 0 76px; max-width: 72ch; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 20px; color: var(--ink-soft); font-size: 1.02rem; }
.entry-content h2 { margin: 40px 0 16px; font-size: 1.5rem; }
.entry-content h3 { margin: 32px 0 12px; font-size: 1.15rem; }
.entry-content img { border-radius: var(--radius); margin: 24px 0; }
.entry-content a { color: var(--cobalt-deep); border-bottom: 1px solid var(--line); }

.post-list { display: flex; flex-direction: column; }
.post-row { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; padding: 32px 0; border-top: 1px solid var(--line); }
.post-row:first-child { border-top: none; }
.post-row .post-meta { font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 8px; }
.post-row h2 { font-size: 1.3rem; margin-bottom: 10px; }
.post-row h2 a:hover { color: var(--cobalt-deep); }
.post-row p { color: var(--ink-soft); font-size: 0.96rem; }
.post-row .read-more { display: inline-block; margin-top: 12px; font-size: 0.88rem; font-weight: 600; border-bottom: 1px solid var(--line); }

.pagination { display: flex; gap: 16px; padding: 20px 0 76px; border-top: 1px solid var(--line); margin-top: 20px; }
.pagination a, .pagination span { font-size: 0.9rem; color: var(--ink-soft); }
.pagination a:hover { color: var(--cobalt-deep); }

@media (max-width: 860px) {
  .hero, .section-head, .offers, .problem-grid, .results-grid, .cta-band .wrap, .post-row { grid-template-columns: 1fr; }
  .process-row { grid-template-columns: 40px 1fr; }
  .process-row p { grid-column: 1 / -1; }
  .nav-links { display: none; }
}

:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
