/*
Theme Name: Tidepools
Theme URI: https://tidepoolssoftware.com
Author: Tidepools Team
Author URI: https://tidepoolssoftware.com
Description: A light-mode first theme for Tidepools — content over algorithms. Interactive content platform for creators.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tidepools
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --tp-orange: #FB835F;
  --tp-teal: #288BAF;
  --tp-dark: #060A0B;
  --tp-light: #F2F2F2;
  --tp-radius: 12px;
  --tp-radius-sm: 8px;
  --tp-transition: 0.25s ease;
  --tp-max-width: 1120px;
  --tp-gutter: clamp(1rem, 4vw, 2rem);
  --bg: #F2F2F2;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --text: #060A0B;
  --text-muted: #4A5559;
  --border: #D8DDDF;
  --heading: #060A0B;
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--tp-teal); text-decoration: none; transition: color var(--tp-transition); }
a:hover { color: var(--tp-orange); }

h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 0.75em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin-bottom: 0.5em; }
p { max-width: 65ch; margin-bottom: 1em; }

.text-orange { color: var(--tp-orange); }
.text-teal { color: var(--tp-teal); }
.text-muted { color: var(--text-muted); }

.tp-container { width: 100%; max-width: var(--tp-max-width); margin-inline: auto; padding-inline: var(--tp-gutter); }
.tp-section { padding-block: clamp(3rem, 8vw, 6rem); }
.tp-section--alt { background-color: var(--bg-surface); }
.tp-grid { display: grid; gap: 2rem; }
.tp-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tp-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.tp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.875rem 2rem; border-radius: var(--tp-radius-sm);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: all var(--tp-transition); border: 2px solid transparent; text-decoration: none;
}
.tp-btn--primary { background-color: var(--tp-orange); color: var(--tp-dark); }
.tp-btn--primary:hover { background-color: #e5724e; color: var(--tp-dark); transform: translateY(-1px); }
.tp-btn--outline { border-color: var(--tp-teal); color: var(--tp-teal); background: transparent; }
.tp-btn--outline:hover { background-color: var(--tp-teal); color: #FFFFFF; }
.tp-btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }

.tp-card {
  background-color: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--tp-radius); padding: 2rem;
  transition: border-color var(--tp-transition), transform var(--tp-transition);
}
.tp-card:hover { border-color: var(--tp-teal); transform: translateY(-2px); }
.tp-card__icon { font-size: 2rem; margin-bottom: 0.75rem; }
.tp-card h3 { color: var(--heading); }

.tp-badge {
  display: inline-block; padding: 0.35rem 0.875rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.tp-badge--orange { background-color: rgba(251, 131, 95, 0.15); color: var(--tp-orange); }
.tp-badge--teal { background-color: rgba(40, 139, 175, 0.15); color: var(--tp-teal); }

.tp-divider {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--tp-orange), var(--tp-teal));
  border: none; border-radius: 2px; margin-bottom: 1.5rem;
}

.tp-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(242, 242, 242, 0.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.tp-header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.tp-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.25rem; font-weight: 700; color: var(--heading); text-decoration: none;
}
.tp-logo svg, .tp-logo img { height: 36px; width: auto; }
.tp-nav__list { display: flex; list-style: none; gap: 2rem; }
.tp-nav__link { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; transition: color var(--tp-transition); white-space: nowrap; }
.tp-nav__link:hover { color: var(--heading); }
.tp-menu-toggle { display: none; background: none; border: none; color: var(--heading); font-size: 1.5rem; cursor: pointer; }

.tp-hero { min-height: 100vh; display: flex; align-items: center; padding-top: 72px; position: relative; overflow: hidden; }
.tp-hero__bg { position: absolute; inset: 0; z-index: 0; opacity: 0.08; }
.tp-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.tp-hero__content { position: relative; z-index: 1; max-width: 700px; }
.tp-hero__tagline { font-size: 1.1rem; color: var(--tp-orange); font-weight: 600; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.tp-hero h1 { margin-bottom: 1.25rem; }
.tp-hero h1 span {
  background: linear-gradient(135deg, var(--tp-orange), var(--tp-teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.tp-hero__sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-muted); margin-bottom: 2rem; max-width: 540px; }

.tp-what .tp-highlight-box {
  background: var(--bg-surface); border-left: 4px solid var(--tp-teal);
  border-radius: 0 var(--tp-radius-sm) var(--tp-radius-sm) 0;
  padding: 1.5rem 2rem; margin-top: 1.5rem;
}
.tp-what .tp-highlight-box p { color: var(--heading); font-size: 1.1rem; margin-bottom: 0; }

.tp-problem__quote {
  font-size: clamp(1.1rem, 2vw, 1.35rem); font-style: italic; color: var(--text-muted);
  border-left: 3px solid var(--tp-orange); padding-left: 1.5rem; margin: 2rem 0; max-width: 600px;
}

.tp-steps { counter-reset: step; }
.tp-step {
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start;
  padding: 1.5rem 0; border-bottom: 1px solid var(--border);
}
.tp-step:last-child { border-bottom: none; }
.tp-step__number {
  counter-increment: step; width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--tp-orange), var(--tp-teal));
  color: #FFFFFF; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}
.tp-step__number::before { content: counter(step); }

.tp-belief { text-align: center; padding: 2rem 1.5rem; }
.tp-belief__number {
  font-size: 3rem; font-weight: 800;
  background: linear-gradient(135deg, var(--tp-orange), var(--tp-teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 0.5rem;
}
.tp-belief h3 { font-size: 1.15rem; }

.tp-monetize__split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.tp-stat { text-align: center; padding: 2rem; }
.tp-stat__number { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; color: var(--tp-orange); line-height: 1; }
.tp-stat__label { color: var(--text-muted); margin-top: 0.5rem; }

.tp-cta {
  text-align: center;
  background: linear-gradient(135deg, rgba(251,131,95,0.08), rgba(40,139,175,0.08));
  border-radius: var(--tp-radius); padding: clamp(3rem, 6vw, 5rem) 2rem;
}
.tp-cta h2 { margin-bottom: 0.5rem; }
.tp-cta p { margin-inline: auto; margin-bottom: 2rem; color: var(--text-muted); }

.tp-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.tp-footer a { color: var(--text-muted); }
.tp-footer a:hover { color: var(--heading); }
.tp-footer__links { display: flex; justify-content: center; gap: 1.5rem; list-style: none; margin-bottom: 1rem; }

/* ========================================
   DECOR — Option 1: Full-width background layer (floating relief)
   50–200px, random dispersion, no legibility impact
   ======================================== */
.tp-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.tp-decor img {
  position: absolute;
  width: clamp(50px, 9vw, 180px);
  height: auto;
  opacity: 0.13;
  filter: saturate(0.65);
}

/* Per-section positioning — all at bottom, dispersed horizontally, not margins */
.tp-what .tp-decor img { left: 62%; bottom: 3%; right: auto; top: auto; }
.tp-complementary .tp-decor img { left: 38%; bottom: 3%; right: auto; top: auto; width: clamp(50px, 8vw, 160px); }
.tp-how .tp-decor img { left: 58%; bottom: 3%; right: auto; top: auto; width: clamp(50px, 10vw, 190px); }
.tp-beliefs .tp-decor img { left: 35%; bottom: 3%; right: auto; top: auto; width: clamp(50px, 7vw, 140px); }
.tp-monetize .tp-decor img { left: 60%; bottom: 3%; right: auto; top: auto; width: clamp(50px, 8.5vw, 170px); }

/* Sections that host decor */
.tp-what,
.tp-complementary,
.tp-how,
.tp-beliefs,
.tp-monetize {
  position: relative;
  overflow: hidden;
}

.tp-what .tp-container,
.tp-complementary .tp-container,
.tp-how .tp-container,
.tp-beliefs .tp-container,
.tp-monetize .tp-container {
  position: relative;
  z-index: 1;
}

/* Progressive fade — adapts to screen size, never blocks text */
@media (max-width: 1150px) {
  .tp-decor img { opacity: 0.09; }
}

@media (max-width: 900px) {
  .tp-decor img { opacity: 0.06; width: clamp(40px, 7vw, 120px); }
}

@media (max-width: 768px) {
  .tp-decor { display: none; }
}

@media (max-width: 1150px) {
  .tp-menu-toggle { display: block; }
  .tp-nav {
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--bg-surface); /* opaque #FFFFFF — fixes transparent overlay */
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(6, 10, 11, 0.08);
    padding: 1.25rem var(--tp-gutter) 1.75rem;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 99;
  }
  .tp-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .tp-nav__list { flex-direction: column; gap: 1rem; }
  .tp-nav__link { font-size: 1.1rem; white-space: normal; padding: 0.5rem 0; display: block; }
}

@media (max-width: 768px) {
  .tp-monetize__split { grid-template-columns: 1fr; }
  .tp-hero { min-height: auto; padding-block: calc(72px + 3rem), 3rem; }
}
