:root {
  --link-color: #900;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  background: #ebe9fd;
  color: #333;

  & > * {
    width: 100%;
    max-width: min(90%, 900px);
  }
}

button:not(.link), .button {
  display: inline-block;
  font-family: inherit;
  font-size: inherit;
  text-decoration: none;
  background-color: #EEEEEE;
  color: #333333;
  padding: 2px 6px 2px 6px;
  border-top: 1px solid #CCCCCC;
  border-right: 1px solid #333333;
  border-bottom: 1px solid #333333;
  border-left: 1px solid #CCCCCC;
  cursor: pointer;
}

a:not(.button):not(.logo), .link {
  background: none !important;
  border: none;
  padding: 0 !important;
  font-family: inherit;
  font-size: inherit;
  color: var(--link-color);
  text-decoration: underline;
  cursor: pointer;

  &:hover {
    text-decoration: underline;
  }
}

header {
  font-size: min(48px, 9vw);
  line-height: 1.1;
  display: flex;
  justify-content: center;
  padding: 16px 0;

  .logo {
    background: linear-gradient(6deg, #ffe6d3, #dfdfdf);
    padding: 8px 18px;
    outline: 8px dotted #ebe9fd;
    outline-offset: -4px;
    transform: rotate(-3deg);
    display: flex;
    -webkit-text-stroke: 0.5px #777;
    animation: wiggle 1.2s ease-in-out infinite paused;

    img {
      height: min(48px, 9vw);
      aspect-ratio: 1;
      animation: spin 1s linear infinite paused;
    }

    &:hover {
      animation-play-state: running;

      img {
        animation-play-state: running;
      }
    }
  }
}

nav {
  ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1ch;
  }
}

main {
  flex: 1;
}

aside {
  background: white;
  padding: 1ch 2ch;
  margin: 1ch 0;
}

@media (min-width: 720px) {
  aside {
    margin: 0 2ch 2ch;
    float: right;
    width: clamp(14em, 18em, 25vw);
  }
}

footer {
  font-size: 75%;
  padding: 8px 1ch;
  background: #fff7;
  max-width: 100%;

  ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1ch;
  }
}

.logo {
  font-family: 'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive; 
  font-weight: bold;
  text-decoration: none;

  .logo-guest {
    color: #30c03f;
  }
  .logo-melon {
    color: #eb4e41;
  }
}

/* The word "customisable" on the homepage gets a wonky style: */
.customisable-01 {
  font-family: system-ui, sans-serif;
  font-style: italic;
}
.customisable-02 {
  font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif; 
  font-weight: bold;
}
.customisable-03 {
  font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif; 
}
.customisable-04 {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  font-weight: bold;
  text-transform: uppercase;
}
.customisable-05 {
  font-family: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif;
}
.customisable-06 {
  font-family: Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif; 
  font-style: oblique;
}
.customisable-07 {
  font-family: Superclarendon, 'Bookman Old Style', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif; 
  font-weight: bold;
}
.customisable-08 {
  font-family: Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif; 
}
.customisable-09 {
  font-family: 'Nimbus Mono PS', 'Courier New', monospace; 
  font-style: italic;
}
.customisable-10 {
  font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif; 
}
.customisable-11 {
  font-family: Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif;
  font-weight: 100;
}
.customisable-12 {
  font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
  display: inline-block;
  transform: rotate(-20deg);
}

.using-your-guestbook {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.5ch;

  h2 {
    grid-column: span 2;
  }

  pre {
    white-space: pre-wrap;
    font-size: 80%;
  }
}

/** Tabs */
.tabs {
	display: flex;
	flex-wrap: wrap;

  & > label {
    display: block;
    padding: 1rem 2rem;
    margin-right: 0.2rem;
    cursor: pointer;
    background: #90CAF9;
    font-weight: bold;
    transition: background ease 0.2s;

    input[type="radio"] {
      display: none;
    }

    &:has(input[type="radio"]:checked) {
      background: #fff;

      + .tab {
        display: block;
      }
    }
  }

  .tab {
    order: 1;
    flex-grow: 1;
    width: 100%;
    display: none;
    padding: 1rem;
    background: #fff;
  }
}

/** Forms **/
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5ch;
  margin: 2.5ch 0;
}

.field-help {
  font-size: 0.8em;
  color: #666;
}

label {
  font-weight: bold;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  padding: 0.25ch 0.5ch;
  border: 1px solid #ccc;
  border-radius: 0.25ch;
}

textarea {
  resize: vertical;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(-3deg);
  }
  50% {
    transform: rotate(1deg);
  }
}