/* Ønskeseddel jul 2026 — "Julebroderi på hør" (VISUAL.md) */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/Fraunces-Italic.woff") format("woff");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Pixelify Sans";
  src: url("../fonts/PixelifySans.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/IBMPlexMono-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --linen: #e9e1cf;
  --linen-dark: #dcd2bc;
  --red: #b3261e;
  --green: #2e5b3c;
  --indigo: #1f2a3a;
  --straw: #c9a248;
  --petrol: #1f5c66;
  --gap: 1.75rem;
  --frame: 16px;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--indigo);
  background-color: var(--linen);
  background-image:
    url("../img/grain.png"),
    repeating-linear-gradient(
      0deg,
      rgba(31, 42, 58, 0.035) 0 1px,
      transparent 1px 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(31, 42, 58, 0.035) 0 1px,
      transparent 1px 4px
    );
  background-size: 256px 256px, 4px 4px, 4px 4px;
  font-family: Fraunces, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
  font-variation-settings: "SOFT" 40, "WONK" 0.4, "opsz" 18;
  line-height: 1.5;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 20;
  padding: 0.4rem 0.7rem;
  background: var(--indigo);
  color: var(--linen);
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

/* --- Header --- */

.site-header {
  text-align: center;
}

.band {
  width: 100%;
  height: 88px;
  background-image: url("../img/border-tile.svg");
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 88px;
}

.header-inner {
  padding: 0.85rem 1.25rem 1.35rem;
}

h1 {
  margin: 0;
  color: var(--red);
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: clamp(1.7rem, 4.2vw, 2.85rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.lede {
  margin: 0.45rem 0 0;
  font-style: italic;
  font-size: 1.15rem;
  font-variation-settings: "SOFT" 60, "WONK" 0.8, "opsz" 20;
}

/* --- Layout --- */

main {
  padding: 0.5rem 1.25rem 2.75rem;
}

.sections {
  display: flex;
  align-items: stretch;
  gap: var(--gap);
  max-width: 1080px;
  margin: 0 auto;
}

.panel {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  background: var(--linen-dark);
  padding: 1.6rem 1.45rem 1.35rem;
  /* room for the stitched frame */
  box-shadow: inset 0 0 0 var(--frame) transparent;
}

.frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.corner {
  position: absolute;
  top: 1.35rem;
  right: 1.25rem;
  width: 118px;
  pointer-events: none;
}

.panel-alice .corner {
  width: 102px;
  top: 1.45rem;
}

.panel h2 {
  margin: 0 7.5rem 1.05rem 0.15rem;
  padding: 0.15rem 0 0 0.1rem;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.panel-totte h2 {
  color: var(--indigo);
}

.panel-alice h2 {
  color: var(--petrol);
}

/* --- Wishes --- */

.wishes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wishes li + li {
  border-top: 1px solid rgba(31, 42, 58, 0.12);
}

.wish {
  display: grid;
  grid-template-columns: 76px 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.85rem;
  row-gap: 0.1rem;
  align-items: center;
  padding: 0.75rem 0.4rem;
  color: var(--indigo);
  text-decoration: none;
  border-radius: 2px;
}

a.wish:hover,
a.wish:focus-visible {
  background: rgba(233, 225, 207, 0.45);
}

a.wish:focus-visible,
.skip:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

.wish .icon {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 80px;
}

.wish .icon svg {
  width: 76px;
  height: auto;
  max-height: 80px;
  display: block;
}

.wish .name {
  font-size: 1.05rem;
  font-weight: 560;
  font-variation-settings: "SOFT" 40, "WONK" 0.3, "opsz" 19;
}

.shop {
  grid-column: 2;
  color: var(--indigo);
  font-family: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
}

.shop .arrow {
  display: inline-block;
  margin-left: 0.2em;
  transition: transform 0.2s ease;
}

a.wish:hover .shop .arrow,
a.wish:focus-visible .shop .arrow {
  transform: translate(2px, -1px);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Alice quote */

.quote {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 6.5rem 1.1rem 0.1rem;
  color: var(--indigo);
  font-style: italic;
  font-size: 1.18rem;
  font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 22;
  line-height: 1.35;
}

.quote img {
  width: 52px;
  height: auto;
  flex-shrink: 0;
}

.paws {
  display: block;
  width: 100%;
  margin: auto 0 0.15rem;
  padding-top: 1rem;
  pointer-events: none;
}

/* --- Footer --- */

.site-footer {
  text-align: center;
}

.site-footer p {
  margin: 0;
  padding: 0.35rem 1rem 0.85rem;
  font-family: "Pixelify Sans", "Courier New", monospace;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

/* --- Stitch sew-in on hover --- */

.wish .icon svg line {
  stroke-dasharray: 14;
  stroke-dashoffset: 0;
}

@media (prefers-reduced-motion: no-preference) {
  a.wish:hover .icon svg line,
  a.wish:focus-visible .icon svg line {
    animation: sew 0.4s ease-out both;
    animation-delay: calc(var(--i, 0) * 12ms);
  }
}

@keyframes sew {
  from {
    stroke-dashoffset: 14;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  a.wish:hover .shop .arrow,
  a.wish:focus-visible .shop .arrow {
    transform: none;
  }

  .wish .icon svg line {
    animation: none !important;
    stroke-dashoffset: 0;
  }
}

/* --- Mobile --- */

@media (max-width: 800px) {
  .sections {
    flex-direction: column;
    gap: 1.35rem;
  }

  .panel {
    flex: 1 1 auto;
  }

  .band {
    height: 56px;
    background-size: auto 56px;
  }

  .header-inner {
    padding: 0.45rem 1rem 0.7rem;
  }

  h1 {
    font-size: clamp(1.5rem, 7vw, 1.9rem);
  }

  .lede {
    margin-top: 0.3rem;
    font-size: 1.05rem;
  }

  .panel h2,
  .quote {
    margin-right: 6.25rem;
  }

  .corner {
    width: 96px;
  }

  .panel-alice .corner {
    width: 86px;
  }
}

/* Keep the header within 40% of a phone screen (VISUAL.md) */
@media (max-width: 720px) {
  .site-header {
    max-height: 40vh;
  }
}


/* --- Prices --- */

.price {
  margin: 0;
  padding: 0 0.4rem 0.9rem calc(76px + 0.85rem + 0.4rem);
  color: var(--indigo);
  font-family: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}

.price-date::before {
  content: "·";
  margin: 0 0.5em;
}
