/*
Theme Name: The Strands Hint
Theme URI: https://thestrandshint.com
Author: The Strands Hint
Description: A distinctive theme for The Strands Hint: daily spoiler-aware hints, an interactive hint card, a blog, and contact and legal pages.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: strandshint
*/

/* ------------------------------------------------------------------
   Design tokens
------------------------------------------------------------------ */
:root {
  --ss-bg: #faf7f0;
  --ss-surface: #ffffff;
  --ss-soft: #f3efe4;
  --ss-ink: #1c2230;
  --ss-text: #3b4352;
  --ss-muted: #6b7280;
  --ss-border: #e7e1d4;
  --ss-primary: #2347d6;
  --ss-primary-dark: #1a36a8;
  --ss-yellow: #f6c945;
  --ss-green: #2f8f5b;
  --ss-radius: 16px;
  --ss-radius-sm: 10px;
  --ss-shadow: 0 1px 0 rgba(28, 34, 48, .04), 0 12px 32px -14px rgba(28, 34, 48, .22);
  --ss-container: 1180px;
  --ss-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ss-serif: "Fraunces", Georgia, "Times New Roman", serif;
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ss-font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ss-text);
  background: var(--ss-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ss-primary); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ss-primary-dark); }
h1, h2, h3, h4 {
  color: var(--ss-ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1, h2 { font-family: var(--ss-serif); letter-spacing: -0.02em; font-variation-settings: "opsz" 72; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--ss-container); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-tight { padding: 40px 0 96px; }
.section-soft { background: var(--ss-soft); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 56px; }
.section-head-left { text-align: left; margin-left: 0; }
.section-head p { color: var(--ss-muted); font-size: 1.08rem; }
.section-more { text-align: center; margin: 40px 0 0; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ss-primary);
  margin-bottom: 14px;
}
.sr-only, .screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
.skip-link:focus { clip: auto; width: auto; height: auto; padding: 8px 12px; background: #fff; z-index: 999; }

/* ------------------------------------------------------------------
   Buttons
------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 12px; font-weight: 600; font-size: .98rem;
  border: 1.5px solid transparent; cursor: pointer; transition: all .2s ease; line-height: 1.2;
  font-family: var(--ss-font);
}
.btn-primary { background: var(--ss-primary); color: #fff; }
.btn-primary:hover { background: var(--ss-primary-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ss-ink); border-color: var(--ss-ink); }
.btn-ghost:hover { background: var(--ss-ink); color: #fff; }
.btn-light { background: var(--ss-yellow); color: var(--ss-ink); }
.btn-light:hover { background: #ffd65c; color: var(--ss-ink); transform: translateY(-1px); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-outline-light:hover { background: #fff; color: var(--ss-ink); }
.btn-sm { padding: 10px 16px; font-size: .9rem; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------
   Header & navigation
------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 247, 240, .92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--ss-border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--ss-ink); font-family: var(--ss-serif); white-space: nowrap; }
.brand:hover { color: var(--ss-ink); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: var(--ss-ink); color: var(--ss-yellow); font-weight: 800; font-family: var(--ss-font);
}
.custom-logo { max-height: 40px; width: auto; }
.primary-nav { margin-left: auto; }
.primary-nav .menu, .primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.primary-nav a { color: var(--ss-text); font-weight: 500; font-size: .95rem; white-space: nowrap; position: relative; }
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--ss-yellow); transform: scaleX(0); transition: transform .2s ease;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--ss-ink); }
.primary-nav a:hover::after, .primary-nav .current-menu-item > a::after { transform: scaleX(1); }
.nav-cta { margin-left: 8px; white-space: nowrap; }
.nav-toggle {
  display: none; background: none; border: 0; width: 44px; height: 44px; padding: 0; cursor: pointer; margin-left: auto;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 22px; height: 2px; background: var(--ss-ink); border-radius: 2px;
  position: relative; margin: 0 auto; transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-open .nav-toggle .bars { background: transparent; }
.nav-open .nav-toggle .bars::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle .bars::after { top: 0; transform: rotate(-45deg); }

/* ------------------------------------------------------------------
   Hero and hint card
------------------------------------------------------------------ */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero-lead { font-size: 1.18rem; color: var(--ss-muted); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-proof { list-style: none; margin: 36px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-proof li { font-size: .92rem; color: var(--ss-muted); position: relative; padding-left: 22px; }
.hero-proof li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--ss-yellow);
  box-shadow: inset 0 0 0 2px var(--ss-ink);
}

.hint-card {
  background: var(--ss-ink); color: #e9ecf3; border-radius: 24px; padding: 32px;
  box-shadow: 0 30px 60px -28px rgba(28, 34, 48, .55); position: relative;
}
.hint-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.hint-date { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ss-yellow); }
.hint-free { font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; }
.hint-title { font-family: var(--ss-serif); color: #fff; font-size: 1.7rem; margin-bottom: 22px; font-variation-settings: "opsz" 48; }
.hint-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hint-item { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; overflow: hidden; transition: border-color .2s ease; }
.hint-item:hover { border-color: rgba(246, 201, 69, .45); }
.hint-btn {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: none; border: 0;
  color: #fff; cursor: pointer; text-align: left; font: inherit;
}
.hint-btn:focus-visible { outline: 2px solid var(--ss-yellow); outline-offset: -2px; }
.hint-num {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700;
}
.hint-name { flex: 1; font-weight: 600; font-size: 1rem; display: flex; flex-direction: column; line-height: 1.3; }
.hint-name small { font-weight: 500; font-size: .8rem; color: #9aa3b5; margin-top: 2px; }
.hint-chev { font-size: 1.4rem; color: var(--ss-yellow); line-height: 1; transition: transform .2s ease; }
.hint-btn.is-open .hint-chev { transform: rotate(45deg); }
.hint-btn.is-open .hint-num { background: var(--ss-yellow); color: var(--ss-ink); }
.hint-panel { padding: 0 18px 18px 66px; }
.hint-panel p { margin: 0; color: #dfe4ee; font-size: 1rem; line-height: 1.6; }
.hint-progress { margin: 18px 0 0; font-size: .85rem; color: #9aa3b5; }

/* ------------------------------------------------------------------
   Cards, steps, grids
------------------------------------------------------------------ */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--ss-surface); border: 1px solid var(--ss-border); border-radius: var(--ss-radius);
  padding: 32px; box-shadow: var(--ss-shadow);
}
.card p { color: var(--ss-muted); margin: 0; }
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--ss-soft); color: var(--ss-ink); font-size: 1.2rem;
}
.steps { counter-reset: step; }
.step { border-top: 2px solid var(--ss-ink); padding-top: 22px; }
.step-num { font-family: var(--ss-serif); font-size: 2.4rem; font-weight: 700; color: var(--ss-primary); line-height: 1; margin-bottom: 14px; }
.step p { color: var(--ss-muted); margin: 0; }

/* ------------------------------------------------------------------
   Post cards and blog
------------------------------------------------------------------ */
.post-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; height: 100%; }
.post-card .post-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; margin: 0; border-radius: 0; }
.post-card .post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-thumb img { transform: scale(1.03); }
.post-card .post-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.post-card h3 { margin-bottom: 8px; }
.post-card h3 a { color: var(--ss-ink); }
.post-card h3 a:hover { color: var(--ss-primary); }
.post-card p { color: var(--ss-muted); margin-bottom: 16px; font-size: .97rem; }
.post-card .read-more { margin-top: auto; }
.read-more { font-weight: 600; font-size: .95rem; }
.entry-meta { color: var(--ss-muted); font-size: .85rem; margin-bottom: 12px; letter-spacing: .02em; }
.thumb-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; min-height: 180px;
  background: var(--ss-yellow); color: var(--ss-ink); font-family: var(--ss-serif); font-size: 4rem; font-weight: 700;
}
.blog-hero { text-align: left; }
.blog-listing { padding-top: 56px; }
.featured-post {
  display: grid; grid-template-columns: 1.1fr 1fr; background: var(--ss-surface); border: 1px solid var(--ss-border);
  border-radius: 22px; overflow: hidden; box-shadow: var(--ss-shadow); margin-bottom: 40px;
}
.featured-media { display: block; min-height: 320px; overflow: hidden; background: var(--ss-soft); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-media .thumb-placeholder { min-height: 320px; font-size: 6rem; }
.featured-body { padding: 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.featured-body h2 { font-size: clamp(1.6rem, 2.7vw, 2.2rem); margin-bottom: 12px; }
.featured-body h2 a { color: var(--ss-ink); }
.featured-body h2 a:hover { color: var(--ss-primary); }
.featured-body p { color: var(--ss-muted); margin-bottom: 24px; }
.blog-grid { margin-top: 8px; }
.blog-listing .pagination { margin-top: 48px; }

/* ------------------------------------------------------------------
   Pages and content
------------------------------------------------------------------ */
.page-hero { padding: 72px 0 48px; background: var(--ss-surface); border-bottom: 1px solid var(--ss-border); }
.page-hero h1 { margin-bottom: 14px; }
.page-hero p { color: var(--ss-muted); max-width: 640px; margin: 0; font-size: 1.1rem; }
.page-body { padding: 72px 0; }
.entry-content { max-width: 720px; font-size: 1.07rem; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 { font-size: 1.6rem; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.2rem; margin-top: 1.4em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content blockquote { border-left: 3px solid var(--ss-yellow); margin: 1.5em 0; padding: 4px 0 4px 20px; color: var(--ss-ink); font-style: italic; }
.entry-content code { background: var(--ss-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.entry-content pre { background: var(--ss-ink); color: #e2e8f0; padding: 20px; border-radius: var(--ss-radius-sm); overflow-x: auto; }
.entry-content img { border-radius: var(--ss-radius-sm); }
.post-thumb-wide { max-width: 960px; margin: 0 auto 48px; border-radius: var(--ss-radius); overflow: hidden; }
.post-thumb-wide img { width: 100%; height: auto; }
.empty-state { text-align: center; padding: 80px 0; }
.related-section { margin-top: 72px; }
.comments-wrap { max-width: 720px; }
.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
  min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--ss-border); color: var(--ss-text); background: var(--ss-surface); font-weight: 500;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--ss-ink); border-color: var(--ss-ink); color: #fff; }

/* ------------------------------------------------------------------
   FAQ
------------------------------------------------------------------ */
.faq-wrap { max-width: 820px; }
.faq details {
  background: var(--ss-surface); border: 1px solid var(--ss-border); border-radius: var(--ss-radius-sm);
  padding: 20px 24px; margin-bottom: 12px; transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--ss-ink); }
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--ss-ink); list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--ss-ink); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 14px 0 0; color: var(--ss-muted); }
.faq summary:focus-visible { outline: 2px solid var(--ss-primary); outline-offset: 4px; border-radius: 6px; }

/* ------------------------------------------------------------------
   Closing CTA
------------------------------------------------------------------ */
.cta-band {
  background: var(--ss-ink); color: #e9ecf3; border-radius: 24px; padding: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: #aab2c3; margin: 0; max-width: 520px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------
   Forms and notices
------------------------------------------------------------------ */
.inquiry-wrap { max-width: 720px; }
.inquiry-form { background: var(--ss-surface); border: 1px solid var(--ss-border); border-radius: var(--ss-radius); padding: 36px; box-shadow: var(--ss-shadow); }
.inquiry-form label { display: block; margin-bottom: 18px; }
.inquiry-form label > span { display: block; font-weight: 600; color: var(--ss-ink); font-size: .92rem; margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.inquiry-form input[type="text"], .inquiry-form input[type="email"], .inquiry-form input[type="url"],
.inquiry-form select, .inquiry-form textarea {
  width: 100%; padding: 13px 16px; font: inherit; color: var(--ss-ink);
  border: 1px solid var(--ss-border); border-radius: var(--ss-radius-sm); background: #fff;
}
.inquiry-form input:focus, .inquiry-form select:focus, .inquiry-form textarea:focus {
  outline: none; border-color: var(--ss-ink); box-shadow: 0 0 0 4px rgba(246, 201, 69, .45);
}
.inquiry-form .btn { margin-top: 6px; }
.hp-field { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: var(--ss-radius-sm); margin-bottom: 24px; font-weight: 500; }
.notice-success { background: #ecf7f0; color: #1d5e3b; border: 1px solid #b9e2c9; }
.notice-error { background: #fdf0ee; color: #8a2a1e; border: 1px solid #f3c6bf; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.site-footer { background: var(--ss-ink); color: #9aa3b5; padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.site-footer .brand { color: #fff; }
.site-footer .brand:hover { color: #fff; }
.site-footer .brand-mark { background: var(--ss-yellow); color: var(--ss-ink); }
.site-footer p { max-width: 320px; margin-top: 16px; font-size: .95rem; }
.site-footer h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 18px; font-family: var(--ss-font); }
.footer-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-menu a { color: #aab2c3; }
.footer-menu a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(154, 163, 181, .2); padding-top: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .9rem; }

/* ------------------------------------------------------------------
   Motion
------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 1100px) {
  .primary-nav .menu, .primary-nav ul { gap: 18px; }
  .primary-nav a { font-size: .9rem; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding: 48px 0 72px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .primary-nav {
    position: absolute; top: 76px; left: 0; right: 0; background: var(--ss-bg); border-bottom: 1px solid var(--ss-border);
    padding: 8px 24px 24px; margin: 0; display: none; box-shadow: var(--ss-shadow);
  }
  .nav-open .primary-nav { display: block; }
  .primary-nav .menu, .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--ss-border); }
  .primary-nav a::after { display: none; }
  .section { padding: 72px 0; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-media, .featured-media .thumb-placeholder { min-height: 220px; }
  .featured-body { padding: 28px; }
  .cta-band { padding: 36px 28px; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hint-card { padding: 22px; }
  .hint-panel { padding-left: 18px; }
  .inquiry-form { padding: 24px; }
  .card { padding: 24px; }
}

/* ------------------------------------------------------------------
   Inner page layout: centered, balanced content
------------------------------------------------------------------ */
.page-hero .container { text-align: center; }
.page-hero .eyebrow { display: block; }
.page-hero p { margin-left: auto; margin-right: auto; }
.entry-content { max-width: 760px; margin-left: auto; margin-right: auto; }
.inquiry-wrap { max-width: 760px; margin-left: auto; margin-right: auto; }
.comments-wrap { max-width: 760px; margin-left: auto; margin-right: auto; }
.post-thumb-wide { max-width: 960px; }
.related-section .section-head { margin-bottom: 40px; }
.empty-state { margin: 0 auto; }
.blog-listing .pagination { margin-top: 56px; }
.page-body .entry-content { padding-bottom: 8px; }

/* Homepage with no hint published yet: center the copy */
.hero-solo { grid-template-columns: 1fr; max-width: 760px; text-align: center; }
.hero-solo .hero-lead { margin-left: auto; margin-right: auto; }
.hero-solo .hero-actions, .hero-solo .hero-proof { justify-content: center; }
.hero-solo .hero-copy { margin: 0 auto; }
.hero-solo .eyebrow { display: block; }
