/* Practical Magic — practicalmagic.nyc
   One stylesheet for the whole site. Layout is fluid; the three
   breakpoints collapse the desktop grid rather than switching templates. */

:root {
  --ink:    #000000;
  --prose:  #1A1A1A;
  --grey:   #767676;
  --rule:   #DCDCDC;
  --green:  #1F6B45;
  --cream:  #F6EDD2;
  --mono:   "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif:  "EB Garamond", Garamond, Georgia, serif;
  --gutter: 44px;
  --maxw:   1280px;
}

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

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

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

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

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding: 46px 0 40px;
}

.masthead__name {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 50px;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.masthead__meta {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--grey);
}

.nav { display: flex; align-items: center; gap: 34px; padding-top: 6px; }
.nav a { font-size: 15px; text-decoration: none; }
.nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); padding-bottom: 3px; }

/* ---------- the scroll ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 46px;
}

.tile { display: block; text-decoration: none; }
.tile__img { width: 100%; height: 300px; object-fit: cover; background: #FFFFFF; }
.tile__body { padding-top: 14px; }
.tile__name, .tile__price { font-size: 13px; line-height: 1.5; }
.tile__price { margin-top: 3px; }

.tile--sold { cursor: default; }
.tile--sold .tile__img { opacity: 0.42; }
.tile--sold .tile__name,
.tile--sold .tile__price { color: var(--grey); }

.tile__state {
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--grey); padding-bottom: 6px;
}

.scroll-end {
  display: flex; justify-content: center; gap: 10px;
  padding: 42px 0 52px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--grey);
}

/* ---------- a single piece ---------- */

.piece { display: flex; align-items: flex-start; gap: 70px; padding-bottom: 70px; }
.gallery { flex: 1 1 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gallery img { width: 100%; height: 700px; object-fit: cover; background: #FFFFFF; }
.piece__detail { flex: 0 0 440px; }

.piece__name { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.25; margin: 0; }
.piece__price { font-family: var(--serif); font-size: 20px; margin-top: 10px; }
.piece__dims { margin-top: 16px; font-size: 13px; line-height: 1.7; color: var(--grey); }
.piece__desc { margin: 18px 0 0; font-size: 13px; line-height: 1.8; color: var(--prose); }

/* ---------- buttons ---------- */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 54px; width: 100%;
  border: 1px solid var(--ink); background: #FFFFFF;
  text-decoration: none; cursor: pointer;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
}
.btn + .btn { margin-top: 10px; }
.btn--primary { margin-top: 30px; }
.btn__note { margin-top: 10px; text-align: center; font-size: 11px; line-height: 1.6; color: var(--grey); }
.btn svg { width: 17px; height: 17px; fill: currentColor; }

/* ---------- spec rows ---------- */

.spec__head {
  margin-top: 40px; padding-bottom: 6px;
  font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase;
}
.spec { border-top: 1px solid var(--ink); }
.spec__row { display: flex; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.spec__key { flex: 0 0 150px; font-size: 12px; line-height: 1.6; color: var(--grey); }
.spec__val { flex: 1 1 auto; font-size: 12px; line-height: 1.6; }

/* ---------- prose pages ---------- */

.page-title {
  font-family: var(--serif); font-weight: 400; font-size: 74px;
  line-height: 1; margin: 56px 0 0; text-align: center;
}
.centred { max-width: 580px; margin: 92px auto 0; text-align: center; }
.centred p { font-size: 15px; line-height: 1.9; margin: 0 0 18px; }
.centred .muted { color: var(--grey); }

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

.site-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  padding: 60px 0 56px; border-top: 1px solid var(--rule);
}
.site-footer__brand { display: flex; align-items: center; gap: 30px; }
.site-footer__mark { flex: 0 0 132px; width: 132px; }
.site-footer__lines { font-size: 13px; line-height: 1.8; color: var(--grey); }
.site-footer__links { display: flex; gap: 52px; }
.site-footer__col { display: flex; flex-direction: column; gap: 11px; }
.site-footer__col a {
  font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--grey); text-decoration: none;
}

/* ---------- breakpoints ---------- */

@media (max-width: 1100px) {
  :root { --gutter: 28px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .piece { gap: 40px; }
  .piece__detail { flex-basis: 360px; }
  .gallery img { height: 520px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .masthead { flex-direction: column; gap: 18px; padding: 30px 0 24px; }
  .masthead__name { font-size: 30px; }
  .masthead__meta { margin-top: 12px; font-size: 12px; }
  .nav { gap: 20px; padding-top: 0; }
  .nav a { font-size: 13px; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 34px; }
  .tile__img { height: 240px; }

  .piece { flex-direction: column; gap: 24px; }
  .piece__detail { flex: 1 1 auto; width: 100%; }
  .gallery img { height: 420px; }
  .piece__name { font-size: 24px; }

  .page-title { font-size: 46px; margin-top: 40px; }
  .centred { margin-top: 52px; }
  .centred p { font-size: 13px; }

  .site-footer { flex-direction: column; align-items: flex-start; gap: 26px; padding: 44px 0 40px; }
  .site-footer__mark { flex-basis: 92px; width: 92px; }
  .site-footer__links { flex-wrap: wrap; gap: 14px 22px; }
  .site-footer__col { flex-direction: row; flex-wrap: wrap; gap: 14px 22px; }
}

/* ---------- in store, no online checkout ---------- */

.instore {
  margin-top: 30px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  font-size: 12px;
  line-height: 1.7;
}
.piece__detail .btn--primary { margin-top: 12px; }
.back { margin-top: 34px; }
.back a { font-size: 12px; color: var(--grey); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- checkout ---------- */

.checkout { display: flex; align-items: flex-start; gap: 64px; padding-bottom: 70px; }
.checkout__item { flex: 1 1 0; min-width: 0; }
.checkout__img { width: 100%; height: 520px; object-fit: cover; background: #FFFFFF; }
.checkout__name { margin: 18px 0 0; font-size: 13px; }
.checkout__price { margin: 4px 0 0; font-family: var(--serif); font-size: 20px; }
.checkout__note { margin: 10px 0 0; font-size: 11px; line-height: 1.7; color: var(--grey); }

.checkout__form { flex: 0 0 440px; }
.checkout__title { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 26px; }

.field { display: block; margin-bottom: 18px; }
.field__label {
  display: block; font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--grey);
}
.field input {
  width: 100%; height: 44px; padding: 0 12px; margin-top: 6px;
  background: #FFFFFF; border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 13px; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--ink); }

.card-container { margin: 26px 0 12px; min-height: 90px; }

.btn.is-disabled { opacity: 0.4; pointer-events: none; }

.checkout__status { margin: 14px 0 0; font-size: 12px; line-height: 1.7; color: var(--grey); min-height: 1.2em; }
.checkout__status--error { color: var(--ink); }

.checkout__terms { margin: 30px 0 0; font-size: 11px; line-height: 1.8; color: var(--grey); }
.checkout__done { width: 100%; }

.sold-note {
  margin: 0 0 20px; padding: 14px 16px;
  border: 1px solid var(--rule); font-size: 12px; line-height: 1.7;
}

@media (max-width: 760px) {
  .checkout { flex-direction: column; gap: 30px; }
  .checkout__form { flex: 1 1 auto; width: 100%; }
  .checkout__img { height: 320px; }
}
