/* Wild Grace — "Meadow, forest". Colors and fonts come from the brand guide. */
:root {
  --cream: #FBF8F3;
  --pine: #24302A;
  --forest: #24372D;
  --rose: #C2877A;
  --gold: #A8843E;
  --moss: #EEF0E8;
  --line: rgba(168, 132, 62, 0.45);
  --display: 'Cormorant Garamond', Georgia, serif;
  --text: 'Jost', system-ui, sans-serif;
  --page: 68rem;
  --gutter: 20px;
}

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

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

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

main { flex: 1; width: 100%; max-width: var(--page); margin: 0 auto; padding: 2.5rem var(--gutter) 5rem; }

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

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.08; margin: 0 0 0.6em; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); margin-top: 2.2em; }
h3 { font-size: 1.4rem; margin-top: 1.8em; }
p, ul, ol, dl { margin: 0 0 1.1em; }
.prose { max-width: 38rem; }
.prose li { margin-bottom: 0.4em; }
.lede { font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.6rem); line-height: 1.35; max-width: 32rem; }

a { color: var(--forest); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: 2px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .inner {
  max-width: var(--page); margin: 0 auto; padding: 0.75rem var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1.5rem;
}
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; font-family: var(--display); font-size: 1.6rem; color: var(--pine); }
.logo img { width: 60px; height: 60px; border-radius: 50%; mix-blend-mode: multiply; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.15rem 1.35rem; align-items: center; }
.site-nav a { color: var(--pine); text-decoration: none; padding: 0.45rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current='page'] { border-bottom-color: var(--gold); }
.cart-link { white-space: nowrap; }
.cart-count { display: inline-block; min-width: 1.5em; padding: 0 0.4em; margin-left: 0.3em; text-align: center; background: var(--forest); color: var(--cream); border-radius: 999px; font-size: 0.85em; }

.site-footer { background: var(--forest); color: var(--cream); }
.site-footer .inner { max-width: var(--page); margin: 0 auto; padding: 2.5rem var(--gutter); display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; align-items: baseline; }
.site-footer a { color: var(--cream); }
.site-footer :focus-visible { outline-color: var(--cream); }
.site-footer p { margin: 0; }
.footer-name { font-family: var(--display); font-size: 1.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; list-style: none; padding: 0; margin: 0; }

/* Buttons */
.button {
  display: inline-block; font: inherit; font-weight: 500; color: var(--pine); background: var(--rose);
  border: 0; border-radius: 999px; padding: 0.8rem 1.7rem; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.button:hover { background: #b87a6c; }
.button[disabled] { opacity: 0.55; cursor: not-allowed; }
.button.quiet { background: transparent; border: 1px solid var(--pine); }
.button.quiet:hover { background: var(--moss); }
.link-button { font: inherit; color: var(--forest); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }

/* The arch: every product photo sits in a display-window frame with a fine gold line. */
.frame {
  position: relative; display: block; aspect-ratio: 4 / 5; background: var(--moss);
  border-radius: 999px 999px 6px 6px; overflow: hidden;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame::after {
  content: ''; position: absolute; inset: 8px; border: 1px solid var(--gold);
  border-radius: 999px 999px 3px 3px; pointer-events: none;
}

/* Home */
.hero { display: grid; gap: 2.5rem; align-items: center; padding: 1.5rem 0 1rem; }
.hero-logo { width: 100%; max-width: 16rem; height: auto; justify-self: center; order: -1; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
@media (min-width: 46rem) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 4rem; padding: 3rem 0 2rem; }
  .hero-logo { max-width: 24rem; justify-self: end; order: 0; }
}
.signup { margin-top: 4rem; padding: 2rem var(--gutter); background: var(--moss); border-radius: 6px; }
.signup h2 { margin-top: 0; }
.signup form { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.signup input { flex: 1 1 14rem; }

/* Shop grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 40rem) { .grid { grid-template-columns: repeat(3, 1fr); gap: 3rem 2rem; } }
@media (min-width: 62rem) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { display: block; color: var(--pine); text-decoration: none; }
.card .frame { margin-bottom: 0.8rem; }
.card-name { display: block; font-family: var(--display); font-size: 1.3rem; line-height: 1.2; }
.card:hover .card-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.card-price { display: block; }
.card.is-sold img { opacity: 0.5; }
.card.is-sold .card-price { font-style: italic; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2.5rem; padding: 0; list-style: none; }
.filters a { display: block; padding: 0.35rem 1rem; border: 1px solid var(--line); border-radius: 999px; color: var(--pine); text-decoration: none; }
.filters a:hover { background: var(--moss); }
.filters a[aria-current='true'] { background: var(--forest); border-color: var(--forest); color: var(--cream); }

/* Product page */
.product { display: grid; gap: 2rem; }
@media (min-width: 46rem) { .product { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; } }
.product .frame { max-width: 30rem; }
.thumbs { display: flex; gap: 0.6rem; margin-top: 0.9rem; padding: 0; list-style: none; }
.thumbs button { width: 64px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: var(--moss); cursor: pointer; overflow: hidden; }
.thumbs button[aria-pressed='true'] { border-color: var(--gold); }
.thumbs img { aspect-ratio: 1; object-fit: cover; }
.product h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 0.2em; }
.price { font-size: 1.35rem; margin-bottom: 1.2rem; }
.facts { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1.2rem; }
.facts dt { font-weight: 500; }
.facts dd { margin: 0 0 0.9rem; }
.buy { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin: 1.5rem 0 0.5rem; }

/* Forms */
label { display: block; font-weight: 500; margin-bottom: 0.3rem; }
input[type='email'], input[type='text'], select {
  font: inherit; color: var(--pine); background: #fff; border: 1px solid var(--pine); border-radius: 6px; padding: 0.7rem 0.9rem; max-width: 100%;
}
select { padding-right: 2rem; }
fieldset { border: 0; padding: 0; margin: 2rem 0; }
legend { font-family: var(--display); font-size: 1.5rem; padding: 0; margin-bottom: 0.6rem; }
.choice { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.5rem 0; font-weight: 400; }
.choice input { margin-top: 0.4rem; accent-color: var(--forest); width: 1.1rem; height: 1.1rem; flex: none; }

/* Cart and checkout */
.lines { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 0.4rem 1rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.line .frame { border-radius: 999px 999px 4px 4px; }
.line .frame::after { display: none; }
.line-name { font-family: var(--display); font-size: 1.3rem; line-height: 1.2; color: var(--pine); text-decoration: none; }
.line-name:hover { text-decoration: underline; }
.line-controls { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; margin-top: 0.3rem; }
.line-controls select { padding: 0.3rem 1.8rem 0.3rem 0.6rem; }
.line-total { text-align: right; }
.totals { max-width: 24rem; margin: 1.5rem 0 0 auto; }
.totals div { display: flex; justify-content: space-between; gap: 2rem; padding: 0.3rem 0; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 0.4rem; padding-top: 0.7rem; font-weight: 500; font-size: 1.15rem; }
.checkout { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .checkout { grid-template-columns: 1.3fr 1fr; gap: 4rem; align-items: start; } .checkout .summary { order: 2; } }
.summary { background: var(--moss); border-radius: 6px; padding: 1.5rem; }
.summary h2 { margin-top: 0; }
.summary .totals { margin-left: 0; max-width: none; }
.stripe-box { margin-bottom: 1.5rem; }

.notice { background: var(--moss); border-left: 3px solid var(--gold); padding: 0.9rem 1.1rem; margin: 0 0 1.5rem; border-radius: 0 6px 6px 0; max-width: 38rem; }
.notice p:last-child { margin-bottom: 0; }
.muted { opacity: 0.8; font-size: 0.95em; }
[hidden] { display: none !important; }

/* Sheet check table */
table { border-collapse: collapse; width: 100%; max-width: 46rem; }
th, td { text-align: left; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; }

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

@media (prefers-reduced-motion: no-preference) {
  .button, .filters a, .site-nav a { transition: background-color 120ms ease, border-color 120ms ease; }
}

/* Phones: keep the header to two short rows. */
@media (max-width: 40rem) {
  .logo { font-size: 1.35rem; gap: 0.55rem; }
  .logo img { width: 44px; height: 44px; }
  .site-nav { gap: 0 1rem; font-size: 0.95rem; }
  .site-nav a { padding: 0.3rem 0; }
}
