/* Jana, Vol. 34. Honey and chocolate. A soulful 1970s album: curvy retro serif titles, raised lettering, real photographs, one rolling record. */
@font-face { font-family: "Berkshire Swash"; src: url(/fonts/berkshire.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Titan One"; src: url(/fonts/titan.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Covered By Your Grace"; src: url(/fonts/handwritten.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-stretch: 94% 100%; font-display: swap; }
@font-face { font-family: Archivo; src: url(/fonts/archivo.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }

:root {
  --butter: #ffd449;
  --chocolate: #42281e;
  --oat: #f5e8d3;
  --caramel: #c78d54;
  --porcelain: #faf8f3;
  --display: "Berkshire Swash", "Cooper Black", Georgia, serif;
  --pop: "Titan One", "Arial Black", Arial, sans-serif;
  --hand: "Covered By Your Grace", "Segoe Print", "Bradley Hand", cursive;
  /* Display is the album title. Pop is the raised lettering. Hand is only for Jana's note. Loud and body keep everything else easy to read. */
  --side: var(--caramel);
  --edge: var(--chocolate);
  --loud: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --body: Archivo, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 3.2vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body { margin: 0; background: var(--porcelain); color: var(--chocolate); font: 400 1.0625rem/1.5 var(--body); }
h1, h2, h3, p, dl, dd, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg, canvas { display: block; max-width: 100%; }
h1, h2 { font: 400 2rem/1 var(--display); letter-spacing: 0; text-wrap: balance; }
/* Raised lettering: a bright face, an outline, then a solid side and a shadow edge, like cut-out signs. */
.raised { font-family: var(--pop) !important; font-weight: 400 !important; letter-spacing: .015em !important; color: var(--face, var(--porcelain)); -webkit-text-stroke: .05em var(--edge); paint-order: stroke fill;
  text-shadow: .022em .022em 0 var(--side), .04em .04em 0 var(--side), .058em .058em 0 var(--side), .076em .076em 0 var(--edge), .094em .094em 0 var(--edge); }
a { color: inherit; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--butter); color: var(--chocolate); }
:focus-visible { outline: 3px solid var(--chocolate); outline-offset: 3px; box-shadow: 0 0 0 3px var(--porcelain); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; }
.skip { position: absolute; left: 1rem; top: -5rem; z-index: 60; padding: .75rem 1rem; background: var(--chocolate); color: var(--porcelain); }
.skip:focus { top: .5rem; }

/* Record and mark */
.record { width: 100%; height: 100%; }
.vinyl { fill: var(--chocolate); }
.grooves { fill: none; stroke: var(--caramel); stroke-width: .55; opacity: .6; }
.shine { fill: var(--porcelain); opacity: .09; }
.mark-disc { fill: var(--butter); }
.mark-ring { fill: none; stroke: var(--chocolate); stroke-width: 1.25; }
.mark-small { font: 700 11.5px var(--body); letter-spacing: 2.2px; fill: var(--chocolate); }
.mark-num { font: 850 106px var(--body); font-stretch: 92%; fill: var(--chocolate); }
.roll { font: 400 27px var(--display); fill: var(--butter); }
.mark-hole { fill: var(--porcelain); stroke: var(--butter); stroke-width: 5; }

/* Moving between pages: the next page opens through the spindle hole. Browsers without this just load the page. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out .5s both; }
::view-transition-new(root) { animation: page-in .55s cubic-bezier(.6, 0, .2, 1) both; }
.top-disc { view-transition-name: disc; }
@keyframes page-out { to { opacity: .6; } }
@keyframes page-in { from { clip-path: circle(0 at 50% 50%); } to { clip-path: circle(75% at 50% 50%); } }

/* Header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; padding: 0 var(--gutter); background: var(--porcelain); }
.top a { text-decoration: none; }
.top-name { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; font: 400 1.25rem/1 var(--display); letter-spacing: 0; white-space: nowrap; }
.top-disc { width: 2.5rem; height: 2.5rem; transition: rotate .8s cubic-bezier(.2, .8, .2, 1); }
.top-name:hover .top-disc { rotate: 180deg; }
.top nav { display: flex; align-items: center; align-self: stretch; gap: clamp(.75rem, 3vw, 2rem); font-size: .9375rem; font-weight: 600; }
.top nav a:not(.top-rsvp) { padding: .75rem 0 .6rem; background: linear-gradient(var(--caramel), var(--caramel)) 0 100% / 0 2px no-repeat; transition: background-size .35s; }
.top nav a:not(.top-rsvp):hover { background-size: 100% 2px; }
.top .top-rsvp { display: flex; align-items: center; align-self: stretch; padding: 0 1.1rem; margin-right: calc(var(--gutter) * -1); background: var(--chocolate); color: var(--porcelain); transition: background .25s, color .25s; }
.top .top-rsvp:hover { background: var(--butter); color: var(--chocolate); }
.hq .top { background: var(--chocolate); color: var(--porcelain); }

/* Buttons: a butter disc opens from the center, like the label on a record. */
.btn { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .6rem 1.35rem; border: 1.5px solid var(--chocolate); border-radius: 0; background: transparent; color: var(--chocolate); font-weight: 650; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: color .3s, border-color .3s, scale .2s; }
.btn::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 110%; aspect-ratio: 1; border-radius: 50%; background: var(--butter); translate: -50% -50%; scale: 0; transition: scale .5s cubic-bezier(.2, .8, .2, 1); }
.btn:active { scale: .97; }
.btn-pop { border-color: var(--butter); background: var(--butter); }
.btn-pop::before { background: var(--caramel); }
.btn-dark { background: var(--chocolate); color: var(--porcelain); }
.btn-line { background: transparent; }
.btn-text { border-color: transparent; padding-inline: 0; text-decoration: underline; font-weight: 500; overflow: visible; }
.btn-text::before { display: none; }
.btn-big { min-height: 4rem; padding-inline: 2.25rem; font-size: 1.1875rem; }
.btn:disabled { opacity: .65; cursor: progress; }
@media (hover: hover) {
  .btn:not(:disabled):hover { color: var(--chocolate) !important; }
  .btn:not(:disabled):hover::before { scale: 1; }
}
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Footer */
.foot { display: grid; gap: 1.5rem 3rem; padding: clamp(2.5rem, 5vw, 4.5rem) var(--gutter); background: var(--oat); color: var(--chocolate); font-size: .9375rem; }
.foot-line { font: 400 clamp(2.5rem, 6vw, 5.5rem)/1.05 var(--display); letter-spacing: 0; }
.foot-spot b, .foot-spot span { display: block; text-wrap: balance; }
.foot-spot { max-width: 24rem; padding-left: 1rem; border-left: 4px solid var(--caramel); font-size: 1.0625rem; font-weight: 600; }
.foot-spot b { font: 400 1.75rem/1.2 var(--display); }
@media (min-width: 900px) { .foot { grid-template-columns: 1fr auto auto; align-items: end; } }

/* Form basics, shared with HQ. Each page's layout is in its own file. */
.page { min-height: 100svh; display: flex; flex-direction: column; }
.page main { flex: 1 0 auto; }
form { display: grid; gap: 2rem; justify-items: start; }
form > *, #coming > * { width: 100%; min-width: 0; }
form > .btn { width: auto; }
#coming, #guest-names { display: grid; gap: 1rem; }
#guest-names:empty { display: none; }
.pair { display: grid; gap: 1.5rem 1rem; }
.field { min-width: 0; }
.field label, .field legend { display: block; padding: 0; margin-bottom: .4rem; font-weight: 650; }
.hint { margin: -.25rem 0 .5rem; font-size: .9375rem; }
.optional { font: 450 .875rem var(--body); letter-spacing: 0; }
input:not([type=radio], [type=checkbox], [type=file]), select, textarea { display: block; width: 100%; min-height: 3.25rem; padding: .7rem .85rem; border: 1.5px solid var(--chocolate); border-radius: 0; background-color: #fff; transition: background-color .25s, box-shadow .25s; }
textarea { resize: vertical; }
[aria-invalid=true] { border-width: 3px !important; }
/* Problems are marked with words, weight and a panel, not just color. */
.error, .form-error { padding: .6rem .8rem; background: var(--butter); font-weight: 650; }
.error { margin-top: .5rem; font-size: .9375rem; }
.trap { position: absolute; left: -9999px; width: 1px !important; height: 1px; overflow: hidden; }
.notice { padding: 1.5rem; margin-bottom: 2rem; background: var(--oat); }
.notice h2 { font: 800 2rem/1 var(--loud); margin-bottom: .6rem; }
.notice h2:focus { outline: 0; box-shadow: none; }
.notice .actions { margin-top: 1rem; }
.copy { display: grid; gap: .75rem; }
@media (min-width: 560px) {
  .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .copy { grid-template-columns: minmax(0, 1fr) auto; }
}

/* A page that doesn't exist */
.lost { display: grid; gap: 1.5rem; align-content: center; justify-items: start; padding: 4rem var(--gutter); }
.lost h1 { max-width: 12ch; font: 800 clamp(3.5rem, 11vw, 10rem)/.84 var(--loud); font-stretch: 94%; letter-spacing: 0; }
.lost h1 em { --face: var(--butter); font-style: normal; line-height: 1.05; }

@media (max-width: 400px) {
  .top { gap: .5rem; }
  .top-name { gap: .4rem; font-size: 1.0625rem; }
  .top-disc { width: 2rem; height: 2rem; }
  .top nav { gap: .7rem; font-size: .875rem; }
  .top .top-rsvp { padding: 0 .8rem; }
}
@media (max-width: 359px) { .top-name span { display: none; } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { animation-duration: .001s !important; animation-delay: 0s !important; transition-duration: .001s !important; }
  .top-name:hover .top-disc { rotate: none; }
}
