/* ==========================================================================
   Joey August Jewelry and Adornments
   Single stylesheet for all pages. No build step, no external requests.

   The palette is sampled from images/title_header.png and images/logo.png and
   lives ONLY in the :root block below. If the branding ever changes, edit
   those values and the whole site follows.
   ========================================================================== */

:root {
  /* Brand palette ------------------------------------------------------- */
  --ja-red:         #C93A1E; /* "Joey August" letter face   */
  --ja-red-deep:    #7E2412; /* its drop shadow             */
  --ja-purple:      #B695DE; /* "Jewelry and Adornments"    */
  --ja-purple-deep: #5F2C87; /* its drop shadow             */
  --ja-purple-mid:  #7E5AA8; /* butterfly wings             */
  --ja-ink:         #1A1A1A; /* ladybug spots               */
  --ja-cream:       #FBF8FD; /* page ground                 */
  --ja-white:       #FFFFFF;

  /* Derived surfaces ---------------------------------------------------- */
  --ja-wash:        #F3ECFA;
  --ja-border:      #E3D6F2;
  --ja-muted:       #4A4A4A;

  /* Type and spacing ---------------------------------------------------- */
  --font-body: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  --measure: 1140px;
  --radius: 10px;
  --shadow-card: 0 2px 4px rgba(95, 44, 135, .08), 0 8px 20px rgba(95, 44, 135, .07);
}

/* Base --------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ja-cream);
  color: var(--ja-ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

a { color: var(--ja-red); }
a:hover { color: var(--ja-red-deep); }

/* One consistent, high-contrast focus ring everywhere. */
:focus-visible {
  outline: 3px solid var(--ja-purple-deep);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Screen-reader-only, but still focusable (skip link, honeypot label). */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3.5rem;
  z-index: 100;
  background: var(--ja-purple-deep);
  color: var(--ja-white);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top .15s ease-in-out;
}
.skip-link:focus { top: 0; color: var(--ja-white); }

/* The signature move from the logo art: a flat letter face with a hard
   offset shadow. Reused on headings so the pages match the header image. */
.stamped {
  text-shadow: 3px 3px 0 var(--shadow-colour, var(--ja-purple-deep));
}

/* Header and navigation ---------------------------------------------------- */

.site-header {
  background: var(--ja-white);
  border-bottom: 4px solid var(--ja-purple);
  padding-block: 1.25rem 0;
}

.site-banner {
  margin-inline: auto;
  max-width: 760px;
  width: 100%;
}

.site-nav {
  margin-top: 1rem;
  border-top: 1px solid var(--ja-border);
}

/* Shown only at narrow widths, and only once nav.js has confirmed it works. */
.nav-toggle {
  display: none;
  width: 100%;
  align-items: center;
  gap: .6rem;
  background: none;
  border: 0;
  border-radius: var(--radius);
  padding: .85rem .25rem;
  font: inherit;
  font-weight: 700;
  color: var(--ja-purple-deep);
  cursor: pointer;
}
.nav-toggle .bars {
  display: inline-block;
  width: 22px; height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px; height: 2px;
  background: currentColor;
}
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after  { top:  7px; }

.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  margin: 0;
  padding: .35rem 0 .6rem;
}

.nav-list a {
  display: block;
  padding: .55rem .9rem;
  border-radius: var(--radius);
  color: var(--ja-purple-deep);
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
}
.nav-list a:hover { background: var(--ja-wash); color: var(--ja-red); }

.nav-list a[aria-current="page"] {
  color: var(--ja-red);
  box-shadow: inset 0 -3px 0 var(--ja-red);
}

/* Main --------------------------------------------------------------------- */

main {
  flex: 1;
  padding-block: 2.5rem 3.5rem;
}

.page-title {
  margin: 0 0 .35rem;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.15;
  color: var(--ja-red);
  --shadow-colour: var(--ja-red-deep);
}

.page-intro {
  margin: 0 0 2.5rem;
  max-width: 62ch;
  font-size: 1.1rem;
}

/* Gallery ------------------------------------------------------------------ */

.category-jump {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 2.75rem;
  padding: 0;
}
.category-jump a {
  display: block;
  padding: .4rem .95rem;
  border: 2px solid var(--ja-purple);
  border-radius: 999px;
  background: var(--ja-white);
  color: var(--ja-purple-deep);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}
.category-jump a:hover { background: var(--ja-purple); color: var(--ja-white); }

.category {
  margin-bottom: 3.5rem;
  scroll-margin-top: 1.5rem;
}

.category-title {
  margin: 0 0 1.25rem;
  padding-bottom: .5rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--ja-purple);
  --shadow-colour: var(--ja-purple-deep);
  border-bottom: 3px solid var(--ja-border);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.item-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--ja-white);
  border: 1px solid var(--ja-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.item-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--ja-wash);
}

.item-card figcaption {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.1rem 1.2rem;
}

.item-name {
  margin: 0 0 .4rem;
  font-size: 1.15rem;
  color: var(--ja-purple-deep);
}

.item-desc {
  margin: 0 0 1rem;
  flex: 1;
  font-size: .95rem;
  color: var(--ja-muted);
}

.item-price {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ja-red);
}

/* Forms -------------------------------------------------------------------- */

.panel {
  max-width: 720px;
  background: var(--ja-white);
  border: 1px solid var(--ja-border);
  border-top: 5px solid var(--ja-purple);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
}

.order-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.75rem;
}

.order-form legend {
  padding: 0;
  margin-bottom: .75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ja-purple-deep);
}

.field { margin-bottom: 1.25rem; }

.field > label,
.field-label {
  display: block;
  margin-bottom: .35rem;
  font-weight: 700;
  color: var(--ja-purple-deep);
}

.req { color: var(--ja-red); }

.hint {
  display: block;
  margin-top: .3rem;
  font-size: .9rem;
  font-weight: 400;
  color: #5C5C5C;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: .65rem .75rem;
  border: 2px solid var(--ja-border);
  border-radius: var(--radius);
  background: var(--ja-white);
  color: var(--ja-ink);
  font: inherit;
}

input:hover, select:hover, textarea:hover { border-color: var(--ja-purple); }
input:focus, select:focus, textarea:focus { border-color: var(--ja-purple-deep); }

textarea { min-height: 8rem; resize: vertical; }

/* For the supporting textareas, where a couple of lines is the usual answer
   and a tall box just makes the form look like more work than it is. */
.textarea-short { min-height: 5rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

/* Inspiration URL repeater */
.inspiration-row {
  display: flex;
  gap: .6rem;
  align-items: center;
  margin-bottom: .6rem;
}
.inspiration-row input { flex: 1; }

.btn {
  display: inline-block;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: .7rem 1.4rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--ja-red);
  color: var(--ja-white);
  font-size: 1.05rem;
  padding: .85rem 2rem;
}
.btn-primary:hover { background: var(--ja-red-deep); color: var(--ja-white); }

.btn-secondary {
  background: var(--ja-white);
  border-color: var(--ja-purple-mid);
  color: var(--ja-purple-deep);
}
.btn-secondary:hover { background: var(--ja-wash); }
.btn-secondary[disabled] { opacity: .5; cursor: not-allowed; }
.btn-secondary[disabled]:hover { background: var(--ja-white); }

.btn-remove {
  flex: none;
  padding: .55rem .8rem;
  background: var(--ja-white);
  border: 2px solid var(--ja-border);
  border-radius: var(--radius);
  color: var(--ja-red-deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn-remove:hover { background: var(--ja-wash); border-color: var(--ja-red); }

.form-actions { margin-top: 1.5rem; }

/* Contact page ------------------------------------------------------------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.contact-list { margin: 0; }
.contact-list dt {
  margin-top: 1.1rem;
  font-weight: 700;
  color: var(--ja-purple-deep);
}
.contact-list dt:first-child { margin-top: 0; }
.contact-list dd { margin: .15rem 0 0; }

.social-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: .5rem 0 0;
  padding: 0;
}
.social-list a {
  display: block;
  padding: .45rem 1rem;
  border: 2px solid var(--ja-purple);
  border-radius: 999px;
  color: var(--ja-purple-deep);
  font-weight: 700;
  text-decoration: none;
}
.social-list a:hover { background: var(--ja-purple); color: var(--ja-white); }

.aside-card {
  background: var(--ja-wash);
  border: 1px solid var(--ja-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.aside-card h2 { margin-top: 0; color: var(--ja-purple-deep); }
.aside-card > :last-child { margin-bottom: 0; }

/* Footer ------------------------------------------------------------------- */

.site-footer {
  background: var(--ja-purple-deep);
  color: var(--ja-white);
  padding-block: 2rem;
}

.site-footer a { color: var(--ja-white); }
.site-footer a:hover { color: var(--ja-purple); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.footer-note { margin: 0; font-size: .95rem; }

/* Narrow screens ----------------------------------------------------------- */

@media (max-width: 700px) {
  /* nav.js adds [data-collapsible] only once it can guarantee a working
     toggle, so a visitor without JS keeps a plain, fully visible link list. */
  .site-nav[data-collapsible] .nav-toggle { display: flex; }
  .site-nav[data-collapsible] .nav-list { display: none; }
  .site-nav[data-collapsible][data-open="true"] .nav-list { display: block; }

  .nav-list {
    justify-content: flex-start;
    gap: 0;
    padding-bottom: .75rem;
  }
  .nav-list a { padding: .7rem .5rem; }
  .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--ja-red); }

  .field-row { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .panel { padding: 1.25rem; }
  main { padding-block: 2rem 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Print -------------------------------------------------------------------- */

@media print {
  .site-nav, .skip-link, .category-jump, .btn { display: none; }
  body { background: #fff; }
  .item-card, .panel { box-shadow: none; }
}
