/* ============================================
   LOW TIDE LOCAL — Minimal Newsletter Site
   Retro Coastal Surf Culture
   ============================================ */

@font-face {
  font-family: 'TAYLennon';
  src: url('/fonts/TAYLennonRegular.woff2') format('woff2');
  font-display: swap;
}

:root {
  --cream: #F3EDE3;
  --ink: #2A2A28;
  --terracotta: #A85A3B;
  --sand: #D4C4A8;
  --sage: #7D9E8C;
  --teal: #7E9DAB;
  --mustard: #E2B83A;
  --forest: #3A3D3B;
  --navy: #3A3D3B;

  --font-display: 'TAYLennon', 'Playfair Display', Georgia, serif;
  --font-body: 'IBM Plex Mono', 'DM Sans', system-ui, monospace;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); color: var(--ink); background: var(--cream); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 1.5rem; }

/* --- SECTION HEADER --- */
.section-header {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--sand);
}

/* --- NAV --- */
.nav {
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-wordmark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--cream);
  text-decoration: none;
}

.nav-wordmark:hover { text-decoration: none; }

.nav-logo {
  width: 34px;
  height: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cream);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.nav-link:hover {
  opacity: 1;
  text-decoration: none;
}

.nav-subscribe-btn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--forest);
  background: var(--mustard);
  padding: 0.45rem 1.1rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-subscribe-btn:hover {
  background: #c9a330;
  text-decoration: none;
}

/* --- HERO --- */
.hero {
  background: var(--forest);
  color: var(--cream);
  text-align: center;
  padding: 8rem 0 0;
  position: relative;
  overflow: hidden;
  width: 100%;
  background-image: linear-gradient(rgba(58, 61, 59, 0.55), rgba(58, 61, 59, 0.62)), url('/images/hero.jpg');
  background-size: cover;
  background-position: center 70%;
}

.hero-logo {
  width: 60px;
  height: auto;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.hero-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mustard);
  margin-bottom: 0.75rem;
}

.masthead {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: var(--cream);
  margin-bottom: 0.75rem;
}

.tagline {
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--sand);
  max-width: 420px;
  margin: 0 auto 2rem;
}

.wave-divider { line-height: 0; margin-top: 5rem; }
.wave-divider svg { width: 100%; height: 35px; display: block; }

/* --- SUBSCRIBE FORM --- */
.subscribe-form { max-width: 400px; margin: 0 auto; }

.signup-form {
  display: flex;
  gap: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.signup-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--cream);
  color: var(--ink);
  outline: none;
  min-width: 0;
}

.signup-form input[type="email"]::placeholder { color: var(--sand); }

.signup-form button {
  padding: 0.75rem 1.4rem;
  background: var(--terracotta);
  color: var(--cream);
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.signup-form button:hover { background: #a8432d; }

.signup-form-stacked {
  flex-direction: column;
}

.signup-form-stacked input[type="email"] {
  border-bottom: 1px solid var(--sand);
}

.form-note {
  font-size: 0.78rem;
  color: var(--mustard);
  margin-top: 0.4rem;
  text-align: center;
  opacity: 0.9;
}

/* --- MAIN CONTENT LAYOUT --- */
.content {
  padding: 2.5rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  overflow: hidden;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* --- SURF REPORT --- */
.surf-report {
  background: white;
  border: 1px solid var(--sand);
  border-radius: 6px;
  padding: 1.5rem;
  border-top: 3px solid var(--teal);
}

.surf-report .section-header {
  color: var(--teal);
  font-size: 1rem;
  margin-bottom: 1rem;
  border-bottom-color: var(--teal);
}

/* Tide curve chart */
.tide-chart {
  position: relative;
  margin-bottom: 1rem;
}

.tide-chart svg {
  width: 100%;
  height: 100px;
  display: block;
}

.tide-chart-labels {
  display: flex;
  justify-content: space-between;
  position: relative;
  height: 1.2rem;
  margin-top: 0.25rem;
}

.tide-chart-labels span {
  font-size: 0.7rem;
  color: var(--ink);
  opacity: 0.4;
  position: absolute;
  transform: translateX(-50%);
}

/* Tide times */
.tide-times {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f0ece4;
}

.tide-entry + .tide-entry {
  border-top: 1px solid #f0ece4;
}

.tide-entry {
  display: grid;
  grid-template-columns: 1.2rem 2.5rem 1fr auto;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.85rem;
}

.tide-icon { font-size: 0.65rem; text-align: center; }
.tide-high .tide-icon { color: var(--teal); }
.tide-low .tide-icon { color: var(--terracotta); }
.tide-type { font-weight: 600; font-size: 0.8rem; }
.tide-high .tide-type { color: var(--teal); }
.tide-low .tide-type { color: var(--terracotta); }
.tide-time { color: var(--ink); }
.tide-height { font-weight: 600; text-align: right; color: var(--ink); }

/* Conditions grid */
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.condition-item {
  text-align: center;
  padding: 0.5rem;
  background: var(--cream);
  border-radius: 4px;
}

.condition-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  opacity: 0.5;
  margin-bottom: 0.2rem;
}

.condition-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.2;
}

.condition-detail {
  display: block;
  font-size: 0.72rem;
  color: var(--ink);
  opacity: 0.45;
  margin-top: 0.1rem;
}

/* Surf report gate */
.surf-gated {
  position: relative;
}

.surf-gated .conditions,
.surf-gated .report-footer {
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.surf-gate-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(243, 237, 227, 0.6);
  border-radius: 4px;
  z-index: 2;
}

.surf-gate-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.6rem;
  text-align: center;
}

.surf-gate-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cream);
  background: var(--terracotta);
  padding: 0.45rem 1.2rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.2s;
}

.surf-gate-btn:hover {
  background: #8c4a30;
  text-decoration: none;
}

.surf-gate-login {
  display: block;
  margin: 0.5rem auto 0;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--ink);
  opacity: 0.5;
  cursor: pointer;
  text-decoration: underline;
}

.surf-gate-login:hover {
  opacity: 0.8;
}

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(42, 42, 40, 0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  background: var(--cream);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink);
  opacity: 0.4;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { opacity: 0.8; }

.modal-logo {
  width: 48px;
  height: auto;
  margin: 0 auto 1rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.modal-text {
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.7;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.modal .signup-form-stacked {
  flex-direction: column;
  box-shadow: none;
  border: 1px solid var(--sand);
}

.modal .signup-form-stacked button {
  width: 100%;
}

.modal-note {
  font-size: 0.72rem;
  color: var(--ink);
  opacity: 0.4;
  margin-top: 0.6rem;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-station {
  font-size: 0.72rem;
  color: var(--ink);
  opacity: 0.35;
}

.tide-link {
  font-size: 0.78rem;
  color: var(--teal);
  font-weight: 500;
}

.tide-loading {
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.4;
  padding: 0.5rem 0;
}

/* --- ARCHIVE (right sidebar) --- */
.archive {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.archive .section-header {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

.edition-list {
  display: flex;
  flex-direction: column;
}

.edition-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--sand);
  color: var(--ink);
  text-decoration: none;
}

.edition-item:hover {
  text-decoration: none;
  color: var(--terracotta);
}

.edition-date {
  font-size: 0.75rem;
  color: var(--terracotta);
  opacity: 0.75;
  font-weight: 500;
}

.edition-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: inherit;
}

.edition-coming-soon {
  opacity: 0.55;
  cursor: default;
}

.edition-coming-soon:hover {
  color: var(--ink);
}

.widget-header {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--sand);
}

/* --- SIDEBAR SUBSCRIBE --- */
.sidebar-subscribe {
  background: var(--sage);
  border-radius: 6px;
  padding: 1.25rem;
  color: var(--cream);
}

.sidebar-subscribe .widget-header {
  color: var(--mustard);
  border-bottom-color: rgba(226, 184, 58, 0.3);
}

.sidebar-subscribe-text {
  font-size: 0.88rem;
  color: var(--sand);
  margin-bottom: 1rem;
}

.sidebar-subscribe .signup-form {
  box-shadow: none;
}

.sidebar-subscribe .signup-form input[type="email"] {
  font-size: 0.88rem;
  padding: 0.65rem 0.8rem;
}

.sidebar-subscribe .signup-form button {
  font-size: 0.88rem;
  padding: 0.65rem 1rem;
}

/* --- FOOTER --- */
.footer {
  background: var(--terracotta);
  color: var(--cream);
  text-align: center;
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cream);
  margin-bottom: 0.3rem;
}

.footer-location {
  font-size: 0.8rem;
  opacity: 0.5;
  margin-bottom: 0.75rem;
}

.footer-subscribe {
  max-width: 360px;
  margin: 0 auto 1.25rem;
}

.footer-subscribe .signup-form {
  box-shadow: none;
  border: 1px solid rgba(212, 196, 168, 0.3);
}

.footer-subscribe .signup-form input[type="email"] {
  background: rgba(255, 255, 255, 0.15);
  color: var(--cream);
}

.footer-subscribe .signup-form input[type="email"]::placeholder {
  color: rgba(243, 237, 227, 0.5);
}

.footer-subscribe .signup-form button {
  background: var(--mustard);
  color: var(--forest);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--cream);
  font-size: 0.8rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-links a:hover { opacity: 0.7; text-decoration: none; }

.footer-copy {
  font-size: 0.7rem;
  opacity: 0.3;
}

/* --- RESPONSIVE --- */
@media (max-width: 720px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .surf-report {
    order: -1;
  }

  .masthead {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .signup-form {
    flex-direction: column;
  }

  .signup-form button {
    width: 100%;
  }

  .content {
    padding: 1.5rem 1rem;
  }
}
