/*
Theme Name: BitePattern
Theme URI: https://bitepattern.com
Author: BitePattern
Description: Block theme for BitePattern — the fishing log that learns your water. Dark by default, built on the app's deep-sea and glass-chrome design language.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bitepattern
Tags: full-site-editing, block-patterns, one-column, dark, custom-colors, custom-logo
*/

/* ---------------------------------------------------------------
   Almost everything lives in theme.json. This file carries only
   what theme.json cannot express: the drawn sea, the glass chrome,
   and a few accessibility affordances.
   --------------------------------------------------------------- */

/* The drawn sea — an SVG data URI, exactly like the app's cached
   shell. Drawn rather than photographed on purpose: it weighs ~1.5 KB,
   never 404s, and renders identically everywhere. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #040D12;
  background-image:
    radial-gradient(1100px 520px at 50% 100%, rgba(63, 217, 228, 0.08), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1280' height='420' viewBox='0 0 1280 420' preserveAspectRatio='none'%3E%3Cg fill='none' stroke-linecap='round' stroke-width='2'%3E%3Cpath d='M0 380 C80 380 80 340 160 340 C240 340 240 380 320 380 C400 380 400 340 480 340 C560 340 560 380 640 380 C720 380 720 340 800 340 C880 340 880 380 960 380 C1040 380 1040 340 1120 340 C1200 340 1200 380 1280 380' stroke='%2314303B'/%3E%3Cpath d='M0 330 C80 330 80 290 160 290 C240 290 240 330 320 330 C400 330 400 290 480 290 C560 290 560 330 640 330 C720 330 720 290 800 290 C880 290 880 330 960 330 C1040 330 1040 290 1120 290 C1200 290 1200 330 1280 330' stroke='%231B4453'/%3E%3Cpath d='M0 280 C80 280 80 240 160 240 C240 240 240 280 320 280 C400 280 400 240 480 240 C560 240 560 280 640 280 C720 280 720 240 800 240 C880 240 880 280 960 280 C1040 280 1040 240 1120 240 C1200 240 1200 280 1280 280' stroke='%23215263'/%3E%3Cpath d='M0 230 C80 230 80 190 160 190 C240 190 240 230 320 230 C400 230 400 190 480 190 C560 190 560 230 640 230 C720 230 720 190 800 190 C880 190 880 230 960 230 C1040 230 1040 190 1120 190 C1200 190 1200 230 1280 230' stroke='%232A6577'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center bottom, center bottom;
  background-size: 100% 60%, 100% auto;
}

/* Glass chrome — the same treatment as the app's fixed bars.
   Applied ONLY to the sticky header, never to list rows. */
.wp-site-blocks > header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 16, 21, 0.62);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  border-bottom: 1px solid var(--wp--preset--color--hairline);
}

/* A card surface any group can opt into. */
.is-style-bp-card {
  background: var(--wp--preset--color--deep);
  border: 1px solid var(--wp--preset--color--hairline);
  border-radius: 16px;
  padding: var(--wp--preset--spacing--50);
}

.is-style-bp-card-accent {
  border-top: 3px solid var(--wp--preset--color--horizon);
}

/* Small uppercase mono eyebrow. */
.is-style-bp-eyebrow {
  font-family: var(--wp--preset--font-family--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wp--preset--color--haze);
}

/* Secondary button — outline rather than filled. */
.wp-block-button.is-style-bp-outline .wp-block-button__link {
  background: transparent;
  color: var(--wp--preset--color--foam);
  border: 1px solid #2A6577;
}
.wp-block-button.is-style-bp-outline .wp-block-button__link:hover {
  background: rgba(63, 217, 228, 0.08);
  border-color: var(--wp--preset--color--horizon);
}

/* Accessibility ------------------------------------------------ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--wp--preset--color--horizon);
  color: #041016;
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--wp--preset--color--horizon);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* The brand is dark by default and deliberately has no light mode —
   this site is read at 04:30. Forced-colors mode is still honoured. */
@media (forced-colors: active) {
  body::before { display: none; }
}
