/* TreeWorks Chimes - modernized site stylesheet */

:root {
    --bg: #0f0f0f;
    --panel: #1c1c1c;
    --panel-2: #262626;
    --line: #3a3a3a;
    --gold: #cc9933;
    --gold-bright: #e0b45c;
    --text: #e8e8e8;
    --muted: #b3b3b3;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.65;
    font-size: 1rem;
    -webkit-text-size-adjust: 100%;
}

/* ---------- layout ---------- */

.wrap {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

main {
    padding: 1.5rem 0 3rem;
    min-height: 50vh;
}

/* ---------- skip link ---------- */

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--gold);
    color: #000;
    padding: 0.5rem 1rem;
    z-index: 100;
    font-weight: 600;
}

.skip-link:focus {
    left: 0.5rem;
    top: 0.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- header / nav ---------- */

.site-header {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 2rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand img {
    width: 3.4rem;
    height: auto;
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.1rem;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    padding: 0.35rem 0.15rem;
    display: inline-block;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--gold-bright);
    border-bottom-color: var(--gold);
}

.site-nav a[aria-current="page"] {
    color: var(--gold);
    border-bottom-color: var(--gold);
    font-weight: 600;
}

/* ---------- footer ---------- */

.site-footer {
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: 1.5rem 0 2rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.site-footer .footer-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    justify-content: center;
    margin: 0 0 1rem;
    padding: 0;
}

.site-footer address {
    font-style: normal;
    text-align: center;
    line-height: 1.5;
}

.site-footer a {
    color: var(--gold);
}

/* ---------- typography ---------- */

h1, h2, h3 {
    line-height: 1.25;
    color: #fff;
    font-weight: 700;
}

h1 {
    font-size: 1.75rem;
    margin: 0.5rem 0 1rem;
}

h2 {
    font-size: 1.3rem;
    margin: 2rem 0 0.75rem;
    color: var(--gold);
}

h3 {
    font-size: 1.05rem;
    margin: 1.5rem 0 0.5rem;
}

a {
    color: var(--gold-bright);
}

a:hover {
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.lead {
    font-size: 1.1rem;
    color: var(--muted);
}

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

/* ---------- home page ---------- */

.hero {
    text-align: center;
    padding: 2.5rem 0 2rem;
}

.hero img {
    max-width: 24rem;
    width: 100%;
    height: auto;
}

.hero .tagline {
    font-size: 1.25rem;
    color: var(--gold);
    margin: 0.5rem 0 0;
}

.card-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    padding: 1rem;
    display: block;
    text-decoration: none;
    color: var(--text);
    text-align: center;
}

.card img {
    width: 100%;
    height: 9rem;
    object-fit: cover;
    border-radius: 0.35rem;
}

.card .card-title {
    color: var(--gold);
    font-weight: 600;
    margin-top: 0.75rem;
    display: block;
}

.card:hover,
.card:focus-visible {
    border-color: var(--gold);
}

/* ---------- product catalog ---------- */

.category h2 {
    margin-top: 2.5rem;
}

.product-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.product-grid a {
    display: block;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    padding: 0.9rem;
    text-decoration: none;
    color: var(--text);
    height: 100%;
}

.product-grid img {
    width: 100%;
    height: auto;
    border-radius: 0.35rem;
}

.product-grid .p-name {
    display: block;
    margin-top: 0.6rem;
    color: var(--gold);
    font-weight: 600;
}

.product-grid a:hover,
.product-grid a:focus-visible {
    border-color: var(--gold);
}

/* ---------- product detail ---------- */

.product-detail {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) minmax(14rem, 1.2fr);
    gap: 2rem;
    align-items: start;
}

@media (max-width: 44rem) {
    .product-detail {
        grid-template-columns: 1fr;
    }
}

.product-images img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--line);
    display: block;
}

.product-images img + img {
    margin-top: 1rem;
}

.sound-link {
    display: inline-block;
    margin-top: 1rem;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: 600;
}

.sound-link::before {
    content: "\266A ";  /* musical note */
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
}

/* ---------- forms ---------- */

.form-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 40rem;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    margin: 0 0 1.25rem;
    padding: 1rem;
}

legend {
    color: var(--gold);
    font-weight: 700;
    padding: 0 0.4rem;
}

label {
    display: block;
    margin-bottom: 1rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    display: block;
    width: 100%;
    max-width: 28rem;
    background: #0a0a0a;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 0.35rem;
    padding: 0.5rem 0.6rem;
    font: inherit;
    margin-top: 0.25rem;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.radio-group {
    margin-bottom: 1rem;
}

.radio-group label {
    display: block;
    margin-bottom: 0.25rem;
}

.radio-group input {
    margin-right: 0.5rem;
}

.required {
    color: var(--gold-bright);
}

button {
    background: var(--gold);
    color: #000;
    font: inherit;
    font-weight: 700;
    border: 0;
    border-radius: 0.35rem;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
}

button:hover {
    background: var(--gold-bright);
}

button + button {
    margin-left: 0.75rem;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
}

/* ---------- generic content images ---------- */

.content-img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
    margin: 1rem auto;
}

.img-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.img-row img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--line);
}

.pullquote {
    border-left: 3px solid var(--gold);
    margin: 1.5rem 0;
    padding: 0.25rem 0 0.25rem 1.25rem;
    color: var(--muted);
    font-style: italic;
}

.distributor {
    margin-bottom: 1.5rem;
}

.distributor h3 {
    margin-bottom: 0.25rem;
}

.distributor p {
    margin: 0;
}
