/* T. Crawford Bookshop — palette, type, and ornament taken from the printed
   business card: oxblood cardstock with a dark speckle, a cream plate for the
   logo, gold hairlines and diamonds, cream small-caps lettering. */

:root {
  --oxblood:       #52222a;
  --oxblood-deep:  #3c161b;
  --oxblood-soft:  #5e2c35;

  --cream:         #f4eddd;
  --cream-bright:  #fbf7ee;
  --cream-dim:     #d6c6ae;

  --gold:          #d9b25b;
  --gold-deep:     #a8842f;

  --ink:           #23150f;   /* text on cream */
  --ink-soft:      #5a483c;

  --serif-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --serif-text:    "EB Garamond", Georgia, "Times New Roman", serif;

  --measure: 34rem;
  --page:    58rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background-color: var(--oxblood);
  color: var(--cream);
  font-family: var(--serif-text);
  font-size: clamp(1.0625rem, 0.98rem + 0.4vw, 1.1875rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

/* The card's flecked stock: fractal noise multiplied over the oxblood, with a
   soft vignette so the page has the same depth as the printed card. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .38;
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 90% 70% at 50% 20%, transparent 35%, rgba(30, 8, 12, .55) 100%);
}

a {
  color: var(--cream);
  text-decoration-color: var(--gold-deep);
  text-underline-offset: .18em;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { color: var(--gold); text-decoration-color: var(--gold); }

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

.skip-link {
  position: absolute; left: -9999px;
  background: var(--cream); color: var(--ink);
  padding: .6rem 1rem; z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- hero: the business card ---------- */

.hero {
  max-width: 30rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) 1.25rem clamp(2rem, 5vw, 3rem);
  text-align: center;
}

/* Cream plate; the logo brings its own gold rule, inset like the card's. */
.plate {
  background: var(--cream-bright);
  padding: clamp(.7rem, 2.5vw, 1rem);
  box-shadow: 0 2px 14px rgba(20, 5, 8, .38);
}

.plate__logo { display: block; width: 100%; height: auto; }

.flourish {
  display: block;
  width: min(19rem, 82%);
  height: auto;
  margin: clamp(1.1rem, 3vw, 1.6rem) auto clamp(.9rem, 2.5vw, 1.3rem);
  color: var(--gold);
}

.hero__tagline {
  font-family: var(--serif-display);
  font-size: clamp(.82rem, .74rem + .35vw, .98rem);
  letter-spacing: .16em;
  color: var(--cream);
  margin: 0;
}

/* Thin gold rule with a centred diamond — the card's minor divider. */
.hairline {
  position: relative;
  height: 1px;
  width: min(20rem, 88%);
  margin: clamp(1.1rem, 3vw, 1.5rem) auto;
  background: linear-gradient(90deg, transparent, var(--gold-deep) 18%, var(--gold-deep) 82%, transparent);
}
.hairline::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 7px; height: 7px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

.hero__name {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.15rem);
  letter-spacing: .04em;
  color: var(--cream-bright);
  margin: 0;
  line-height: 1.15;
}

.hero__role {
  font-family: var(--serif-display);
  font-size: clamp(.74rem, .68rem + .3vw, .86rem);
  letter-spacing: .2em;
  color: var(--cream-dim);
  margin: .45rem 0 0;
}

.hero__address {
  font-family: var(--serif-display);
  font-size: clamp(.8rem, .72rem + .35vw, .95rem);
  letter-spacing: .06em;
  margin: 1.1rem 0 0;
}
.hero__address a { text-decoration: none; }
.hero__address a:hover { text-decoration: underline; }

.hero__contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  margin: 0;
  font-family: var(--serif-display);
  letter-spacing: .05em;
}
.hero__contact a { text-decoration: none; }
.hero__contact a:hover { text-decoration: underline; }

.hero__phone {
  font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem);
  color: var(--cream-bright);
}

.hero__contact a:not(.hero__phone) {
  font-size: clamp(.72rem, .64rem + .35vw, .86rem);
  letter-spacing: .07em;
  word-break: break-word;
}

/* ---------- motto band ---------- */

.motto {
  border-top: 1px solid rgba(217, 178, 91, .3);
  border-bottom: 1px solid rgba(217, 178, 91, .3);
  background: rgba(30, 8, 12, .22);
  padding: clamp(2rem, 5vw, 3rem) 1.25rem;
  text-align: center;
}

.motto__quote {
  margin: 0;
  font-family: var(--serif-display);
  font-size: clamp(1.1rem, .95rem + .8vw, 1.6rem);
  letter-spacing: .06em;
  color: var(--gold);
  line-height: 1.4;
}
.motto__quote::before { content: "\201C"; }
.motto__quote::after  { content: "\201D"; }

.motto__sub {
  margin: .9rem 0 0;
  font-family: var(--serif-display);
  font-size: clamp(.68rem, .62rem + .28vw, .8rem);
  letter-spacing: .17em;
  color: var(--cream-dim);
}

/* ---------- sections ---------- */

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 3.75rem) 1.25rem;
  text-align: center;
}

.section + .section { border-top: 1px solid rgba(217, 178, 91, .22); }

.section__title {
  font-family: var(--serif-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem);
  letter-spacing: .14em;
  color: var(--cream-bright);
  margin: 0;
}

.rule {
  width: 8rem;
  height: 1px;
  margin: 1rem auto 1.75rem;
  background: linear-gradient(90deg, transparent, var(--gold-deep), transparent);
  position: relative;
}
.rule::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

.lede {
  max-width: var(--measure);
  margin: 0 auto 1.1rem;
  color: var(--cream);
}
.lede--tight { margin-bottom: 2rem; }

/* ---------- visit cards ---------- */

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  max-width: 44rem;
  margin: 0 auto;
}
@media (min-width: 40em) {
  .card-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
}

.card {
  background: var(--oxblood-soft);
  border: 1px solid rgba(217, 178, 91, .38);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 2px 12px rgba(20, 5, 8, .28);
}

.card__title {
  font-family: var(--serif-display);
  font-size: .8rem;
  letter-spacing: .24em;
  color: var(--gold);
  margin: 0 0 1.1rem;
}

.card__body {
  font-style: normal;
  margin: 0 0 .9rem;
  line-height: 1.7;
}
.card__body:last-child { margin-bottom: 0; }

.card__note {
  margin: 1rem 0 0;
  font-style: italic;
  font-size: .95rem;
  color: var(--cream-dim);
}

.hours { margin: 0; }
.hours > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .32rem 0;
  border-bottom: 1px dotted rgba(217, 178, 91, .3);
}
.hours > div:last-child { border-bottom: 0; }
.hours dt { text-align: left; }
.hours dd { margin: 0; text-align: right; color: var(--cream-dim); }

/* ---------- form ---------- */

.form {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
}

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-family: var(--serif-display);
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--gold);
  margin-bottom: .45rem;
}
.field .opt {
  letter-spacing: .04em;
  font-style: italic;
  color: var(--cream-dim);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--serif-text);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream-bright);
  border: 1px solid var(--gold-deep);
  border-radius: 0;
  padding: .65rem .75rem;
  transition: box-shadow .15s ease;
}
.field input:hover, .field select:hover, .field textarea:hover {
  box-shadow: 0 0 0 2px rgba(217, 178, 91, .3);
}
.field textarea { resize: vertical; min-height: 8rem; }

.field [aria-invalid="true"] {
  border-color: #8c2f1d;
  box-shadow: 0 0 0 2px rgba(140, 47, 29, .35);
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: block;
  margin: 1.5rem auto 0;
  font-family: var(--serif-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--oxblood-deep);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: .85rem 2.2rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--cream-bright); border-color: var(--cream-bright); }
.btn[disabled] { opacity: .6; cursor: progress; }

.form-status {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  font-style: italic;
  text-align: center;
}
.form-status--ok  { color: #9fd0a4; }
.form-status--err { color: #f0b3a4; }

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

.footer {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 3.5rem) 1.25rem clamp(2rem, 4vw, 3rem);
  border-top: 1px solid rgba(217, 178, 91, .22);
  background: rgba(30, 8, 12, .22);
}

.footer__mark {
  width: 84px; height: 84px;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--cream-bright);
  padding: 5px;
}

.footer__line {
  margin: 0 0 .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.footer__line .dot { display: none; color: var(--gold); }

@media (min-width: 34em) {
  .footer__line { flex-direction: row; justify-content: center; gap: 0; }
  .footer__line .dot { display: inline; margin: 0 .5rem; }
}

.footer__fine {
  margin: 0;
  font-size: .85rem;
  letter-spacing: .06em;
  color: var(--cream-dim);
}
