/*
Theme Name: Simplify Radicals
Theme URI: https://simplifyradicalscalculator.com
Author: Antigravity Development Team
Author URI: https://simplifyradicalscalculator.com
Description: Custom, ultra-lightweight, high-performance WordPress theme designed specifically for Simplify Radicals Calculator. Engineered with semantic HTML5, zero runtime bloat, and modern CSS custom properties based on the reference design.
Version: 1.0.0
Tested up to: 6.7
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simplify-radicals
Tags: education, mathematics, calculator, fast-loading, accessibility-ready, block-patterns
*/

/* ==========================================================================
   1. CSS Reset & Custom Property Design Tokens (from Screenshot Reference)
   ========================================================================== */
:root {
  /* Color Palette */
  --clr-primary-coral: #b9452a; /* a11y 2026-11-22: was #e76f51 (3.09:1 on white, 2.78:1 on mint). #b9452a = 5.32:1 on white, 4.79:1 on mint and coral-light; white text on it 5.32:1. */
  --clr-primary-coral-hover: #9a3820; /* darker than the new base for hover */
  --clr-primary-coral-light: #fef0ec;
  --clr-secondary-teal: #2a6f78;
  --clr-secondary-teal-hover: #1f555c;
  --clr-dark-teal: #1b383d;
  --clr-mint-bg: #e8f6f3;
  --clr-mint-light: #f3faf8;
  --clr-mint-border: #c8e8e1;
  --clr-pure-white: #ffffff;
  --clr-slate-text: #2d3748;
  --clr-slate-muted: #5c6e74;
  --clr-border-light: rgba(42, 111, 120, 0.12);
  --clr-error-red: #d90429;
  --clr-warning-amber: #f4a261;

  /* Typography */
  --font-family-display: "Outfit", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-math: "KaTeX_Math", "TeX Gyre Termes", "Cambria Math", "Fira Code", monospace;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 6px rgba(42, 111, 120, 0.05);
  --shadow-md: 0 10px 25px rgba(42, 111, 120, 0.07);
  --shadow-lg: 0 16px 36px rgba(42, 111, 120, 0.10);
  --shadow-floating: 0 14px 34px rgba(27, 56, 61, 0.08);

  /* Layout & Spacing */
  --container-max-width: 1200px;
  --container-narrow-width: 860px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
}

/* ==========================================================================
   2. Modern Accessible Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: var(--font-family-body);
  color: var(--clr-slate-text);
  background-color: var(--clr-pure-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--clr-secondary-teal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover, a:focus-visible {
  color: var(--clr-primary-coral);
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--clr-secondary-teal);
  outline-offset: 2px;
}

/* Accessibility: Screen Reader Only */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--clr-pure-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  clip: auto !important;
  clip-path: none;
  color: var(--clr-dark-teal);
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 1rem;
  line-height: normal;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  top: 1rem;
  width: auto;
  z-index: 100000;
}
