/*
Theme Name: AudioToolWorks
Theme URI: https://audiotoolworks.com/
Author: Morris Digital Network
Author URI: https://audiotoolworks.com/
Description: A fast, free, tracker-free theme for the AudioToolWorks tools site: navy, blue and white, accessible, and built to host the AudioToolWorks Tools plugin. No external fonts, scripts or images.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: audiotoolworks
Tags: one-column, custom-menu, custom-logo, accessibility-ready, block-styles, wide-blocks
*/

/* ------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------ */

:root {
  --mdn-navy: #0b2545;
  --mdn-navy-soft: #12325c;
  --mdn-blue: #2563eb;
  --mdn-blue-dark: #1d4ed8;
  --mdn-sky: #60a5fa;
  --mdn-blue-tint: #dbeafe;
  --mdn-mist: #f4f7fc;
  --mdn-line: #cfd9e8;
  --mdn-ink: #14213d;
  --mdn-muted: #4b5a73;
  --mdn-white: #ffffff;
  --mdn-radius: 12px;
  --mdn-wrap: 1120px;
  --mdn-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mdn-shadow: 0 1px 2px rgba(11, 37, 69, 0.06), 0 12px 32px rgba(11, 37, 69, 0.08);
}

/* ------------------------------------------------------------------
   2. Base
   ------------------------------------------------------------------ */

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

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

body {
  margin: 0;
  font-family: var(--mdn-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--mdn-ink);
  background: var(--mdn-white);
}

img,
svg,
canvas {
  max-width: 100%;
}

a {
  color: var(--mdn-blue-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6rem;
  line-height: 1.2;
  color: var(--mdn-navy);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin-top: 2.2rem;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  margin-top: 1.6rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.3rem;
}

li {
  margin-bottom: 0.4rem;
}

code,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--mdn-mist);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 1px solid var(--mdn-line);
  margin: 2rem 0;
}

:focus-visible {
  outline: 3px solid var(--mdn-blue-dark);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--mdn-white);
  color: var(--mdn-navy);
  font-weight: 700;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
  outline: 3px solid var(--mdn-sky);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--mdn-wrap);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ------------------------------------------------------------------
   3. Header
   ------------------------------------------------------------------ */

.site-header {
  background: var(--mdn-navy);
  color: var(--mdn-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--mdn-white);
  text-decoration: none;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--mdn-blue);
  color: var(--mdn-white);
  flex: 0 0 auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.brand__network {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b9cbe4;
}

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--mdn-white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  cursor: pointer;
}

.primary-nav .nav-list,
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav li {
  margin: 0;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.8rem;
  color: #dbe6f5;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--mdn-white);
  background: rgba(255, 255, 255, 0.1);
}

.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current_page_ancestor > a {
  color: var(--mdn-white);
  background: var(--mdn-blue);
}

/* ------------------------------------------------------------------
   4. Hero
   ------------------------------------------------------------------ */

.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(37, 99, 235, 0.55), transparent 60%),
    linear-gradient(160deg, var(--mdn-navy) 0%, var(--mdn-navy-soft) 100%);
  color: var(--mdn-white);
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero h1 {
  color: var(--mdn-white);
  max-width: 22ch;
}

.hero__lede {
  font-size: clamp(1.05rem, 2.2vw, 1.22rem);
  color: #d7e3f4;
  max-width: 46ch;
}

.hero__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #cfe0f7;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.button--primary {
  background: var(--mdn-blue);
  color: var(--mdn-white);
}

.button--primary:hover {
  background: var(--mdn-blue-dark);
}

.button--ghost {
  color: var(--mdn-white);
  border-color: rgba(255, 255, 255, 0.45);
}

.button--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.button--onlight {
  background: var(--mdn-navy);
  color: var(--mdn-white);
}

.button--onlight:hover {
  background: var(--mdn-blue-dark);
}

.hero__points {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.hero__points li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0;
  color: #d7e3f4;
  font-size: 0.95rem;
}

.hero__points li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: var(--mdn-sky);
}

.hero__panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--mdn-radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  backdrop-filter: blur(2px);
}

.hero__panel h2 {
  margin: 0 0 0.75rem;
  color: var(--mdn-white);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero__panel ol {
  margin: 0;
  padding-left: 1.15rem;
  color: #d7e3f4;
  font-size: 0.95rem;
}

.hero__panel li {
  margin-bottom: 0.6rem;
}

/* ------------------------------------------------------------------
   5. Sections
   ------------------------------------------------------------------ */

.section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.section--mist {
  background: var(--mdn-mist);
  border-top: 1px solid var(--mdn-line);
  border-bottom: 1px solid var(--mdn-line);
}

.section__head {
  max-width: 62ch;
  margin-bottom: 2rem;
}

.section__head p {
  color: var(--mdn-muted);
  margin: 0;
}

.eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mdn-blue-dark);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps > li {
  margin: 0;
  padding: 1.4rem;
  background: var(--mdn-white);
  border: 1px solid var(--mdn-line);
  border-radius: var(--mdn-radius);
}

.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--mdn-navy);
  color: var(--mdn-white);
  font-weight: 800;
  font-size: 0.9rem;
}

.steps h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--mdn-muted);
  font-size: 0.95rem;
}

.callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--mdn-navy);
  color: var(--mdn-white);
  border-radius: var(--mdn-radius);
}

.callout h2 {
  margin: 0 0 0.4rem;
  color: var(--mdn-white);
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
}

.callout p {
  margin: 0;
  color: #d7e3f4;
}

/* ------------------------------------------------------------------
   6. Content (pages, posts)
   ------------------------------------------------------------------ */

.page-header {
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 0;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header__lede {
  max-width: 62ch;
  color: var(--mdn-muted);
  font-size: 1.05rem;
  margin: 0;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--mdn-muted);
  margin-bottom: 0.75rem;
}

.breadcrumbs a {
  color: var(--mdn-muted);
}

.entry {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.entry__content {
  max-width: 72ch;
}

.entry__content h2 {
  margin-top: 2.4rem;
}

.entry__content > :first-child {
  margin-top: 0;
}

.entry__content blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid var(--mdn-blue);
  background: var(--mdn-mist);
  border-radius: 0 8px 8px 0;
}

.entry__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.entry__content th,
.entry__content td {
  border-bottom: 1px solid var(--mdn-line);
  padding: 0.6rem 0.75rem;
  text-align: left;
}

.entry__meta {
  font-size: 0.85rem;
  color: var(--mdn-muted);
  margin-bottom: 1.5rem;
}

.post-list {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-list > li {
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--mdn-line);
  border-radius: var(--mdn-radius);
}

.guide-toc {
  padding: 1.25rem 1.5rem;
  background: var(--mdn-mist);
  border-radius: var(--mdn-radius);
  margin-bottom: 2rem;
}

.guide-toc h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.guide-toc ul {
  margin: 0;
  columns: 2;
  column-gap: 2rem;
}

.faq dt {
  font-weight: 700;
  color: var(--mdn-navy);
  margin-top: 1.25rem;
}

.faq dd {
  margin: 0.25rem 0 0;
  color: var(--mdn-muted);
}

/* ------------------------------------------------------------------
   7. Footer
   ------------------------------------------------------------------ */

.site-footer {
  background: var(--mdn-navy);
  color: #cfdcec;
  padding: clamp(2rem, 5vw, 3rem) 0 1.5rem;
  font-size: 0.92rem;
}

.site-footer a {
  color: #dbe6f5;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand .brand__name {
  color: var(--mdn-white);
}

.footer-brand p {
  margin: 0.75rem 0 0;
  max-width: 42ch;
  color: #b9cbe4;
}

.footer-col h2 {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93aac6;
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  padding-top: 1.25rem;
  color: #93aac6;
  font-size: 0.85rem;
}

/* ------------------------------------------------------------------
   8. Responsive
   ------------------------------------------------------------------ */

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__panel {
    order: 2;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    flex-basis: 100%;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav .nav-list,
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 0.75rem;
  }

  .primary-nav a {
    width: 100%;
    border-radius: 6px;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .callout {
    grid-template-columns: 1fr;
  }

  .guide-toc ul {
    columns: 1;
  }

  .footer-legal {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}

/* ------------------------------------------------------------------
   9. Print
   ------------------------------------------------------------------ */

@media print {
  .site-header,
  .site-footer,
  .hero__actions,
  .nav-toggle {
    display: none;
  }

  body {
    color: #000;
  }
}
