/* Media guides. Same look as the photo guide: Celebration brand fonts (Gelica
   for headings, Circular for everything else, Regular only), solid colors,
   light and dark. Phone first. */

@font-face {
  font-family: "Gelica";
  src: url("/fonts/gelica.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Circular";
  src: url("/fonts/circular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #f4f1ed;
  --fg: #202021;
  --dim: #5b5855;
  --surface: #e9e4de;
  --surface-2: #dcd5cd;
  --accent: #c4421b;
  --on-accent: #ffffff;
  --link: #b03a15;
  --danger: #a3261b;
  --pad: 20px;
  --max: 720px;
  --r: 8px;
  --serif: "Gelica", Georgia, serif;
  --sans: "Circular", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #1b1b1c;
  --fg: #ece7e2;
  --dim: #a9a49f;
  --surface: #29292b;
  --surface-2: #363639;
  --link: #f79975;
  --danger: #f08c80;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.55 var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  flex: 1;
}
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
button,
input,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
dialog {
  margin: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0;
}
h1 {
  font-size: 40px;
  line-height: 1.1;
}
h2 {
  font-size: 27px;
  line-height: 1.2;
}
h3 {
  font-size: 21px;
  line-height: 1.25;
  margin: 26px 0 6px;
}
.dim {
  color: var(--dim);
}
.small {
  font-size: 15px;
}
.lede {
  font-size: 19px;
  line-height: 1.45;
  color: var(--dim);
  margin-top: 10px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.block {
  margin-top: 48px;
}

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) var(--pad) 12px;
  min-height: 60px;
}
.home {
  color: var(--fg);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 21px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.theme,
.edit-btn,
.edit-link {
  background: none;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  text-decoration: none;
}
.theme svg {
  display: block;
}
.edit-link {
  display: none;
}
html.editor .edit-link {
  display: inline-flex;
}
body.editing .edit-link {
  display: none;
}

/* ---------- home ---------- */

.intro {
  padding-top: 20px;
}
.intro h1 + .lede {
  margin-bottom: 28px;
}
.feature {
  display: block;
  color: var(--fg);
  text-decoration: none;
  margin: 0 calc(var(--pad) * -1);
}
.feature img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface);
}
.feature-text {
  display: flex;
  flex-direction: column;
  padding: 14px var(--pad) 0;
}
.feature-title {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.15;
}
.list {
  list-style: none;
  padding: 0;
  margin-top: 32px;
}
.list li + li {
  margin-top: 4px;
}
.list a {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--fg);
  text-decoration: none;
  padding: 8px 0;
  min-height: 56px;
}
.list a > span {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.list-title {
  font-size: 19px;
}
.thumb {
  width: 72px;
  height: 72px;
  flex: none;
  object-fit: cover;
  border-radius: var(--r);
  background: var(--surface);
}
.list.plain {
  margin-top: 12px;
}
.standing {
  margin-top: 56px;
}
.empty {
  margin-top: 8px;
}
@media (hover: hover) {
  .list a:hover .list-title,
  .feature:hover .feature-title {
    color: var(--link);
  }
}

/* ---------- one guide ---------- */

.cover {
  max-width: var(--max);
  margin: 0 auto;
}
.cover img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--surface);
}
.title {
  padding-top: 18px;
}
.title p {
  margin-top: 6px;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  margin-top: 24px;
}
.tabs .wrap {
  display: flex;
  gap: 28px;
}
.tabs button {
  background: none;
  border: 0;
  padding: 12px 0 10px;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--dim);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
html[data-team="photo"] [data-team-btn="photo"],
html[data-team="social"] [data-team-btn="social"] {
  color: var(--fg);
  border-bottom-color: var(--accent);
}
html:not(.js) .tabs {
  display: none;
}
html.js .team-name {
  display: none;
}
html[data-team="photo"] .team[data-team="social"],
html[data-team="social"] .team[data-team="photo"] {
  display: none;
}
.team-name {
  margin-top: 56px;
}

.questions {
  list-style: none;
  padding: 0;
  margin: 14px 0 12px;
  font-size: 21px;
  line-height: 1.35;
}
.questions li + li {
  margin-top: 10px;
}

.look {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 16px calc(var(--pad) * -1) 0;
}
.look a {
  display: block;
}
/* An odd number of photos on two columns: let the first one go full width. */
@media (max-width: 759px) {
  .look a:first-child:nth-last-child(odd) {
    grid-column: 1 / -1;
  }
  .look a:first-child:nth-last-child(odd) img {
    aspect-ratio: 4 / 3;
  }
}
.look img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--surface);
}
@media (min-width: 760px) {
  .look {
    grid-template-columns: repeat(3, 1fr);
    margin: 16px 0 0;
  }
  .look img,
  .cover img,
  .feature img {
    border-radius: var(--r);
  }
  .feature {
    margin: 0;
  }
  .cover img {
    aspect-ratio: 3 / 2;
    object-position: 50% 35%;
  }
  .feature-text {
    padding-left: 0;
    padding-right: 0;
  }
}

.h-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.shots {
  list-style: none;
  padding: 0;
}
.shots label {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 9px 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.shots input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  border: 2px solid var(--dim);
  border-radius: 5px;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.shots input::after {
  content: "";
  width: 12px;
  height: 7px;
  border: solid var(--on-accent);
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.shots input:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.shots input:checked::after {
  opacity: 1;
}
.shots input:checked + span {
  color: var(--dim);
}
.link-btn {
  background: none;
  border: 0;
  padding: 10px 0;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.clear-ticks {
  margin-top: 12px;
}

.notes {
  padding-left: 1.1em;
  margin-top: 12px;
}
.notes li + li {
  margin-top: 10px;
}

.every summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.every summary::-webkit-details-marker {
  display: none;
}
.every summary::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border: solid var(--dim);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.every[open] summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}
.every p {
  margin-top: 14px;
}

.viewer {
  border: 0;
  padding: 0;
  background: #000;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100vw;
  height: 100dvh;
}
.viewer::backdrop {
  background: #000;
}
.viewer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.viewer .close {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  right: 8px;
  width: 48px;
  height: 48px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

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

.foot {
  display: flex;
  gap: 20px;
  padding-top: 64px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  font-size: 15px;
}
.foot a {
  color: var(--dim);
}

/* ---------- sign-in and editor ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r);
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  text-decoration: none;
}
.btn.quiet {
  background: var(--surface);
  color: var(--fg);
}
.login {
  border: 0;
  border-radius: 12px;
  padding: 24px var(--pad) 20px;
  width: min(380px, calc(100vw - 32px));
  background: var(--bg);
  color: var(--fg);
}
.login::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.login h2 {
  margin-bottom: 18px;
}
.login label,
.field > label,
.label {
  display: block;
  font-size: 15px;
  color: var(--dim);
  margin-bottom: 6px;
}
input:not([type]),
input[type="password"],
input[type="date"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r);
  background: var(--surface);
  font-size: 17px;
  line-height: 1.45;
}
input[type="date"] {
  min-height: 50px;
  -webkit-appearance: none;
  appearance: none;
}
.login .row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.error {
  color: var(--danger);
  margin-top: 10px;
}

.editor-page h1 {
  margin: 12px 0 8px;
}
.status {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--surface);
}
.status.error {
  color: var(--danger);
}
.guide-form {
  margin-top: 28px;
}
.field + .field {
  margin-top: 22px;
}
.hint {
  font-size: 15px;
  margin: -2px 0 8px;
}
fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}
legend {
  padding: 0;
  margin-bottom: 14px;
}
fieldset .field + .field {
  margin-top: 18px;
}
textarea {
  resize: vertical;
  min-height: 96px;
}
.slug {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border-radius: var(--r);
  padding-left: 14px;
  font-size: 15px;
}
.slug input {
  background: none;
  padding-left: 0;
}
.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.photos:empty {
  display: none;
}
.cover-photos {
  grid-template-columns: 1fr 1fr;
}
.photos button {
  position: relative;
  padding: 0;
  border: 0;
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 5;
}
.photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photos .busy {
  display: grid;
  place-content: center;
  color: var(--dim);
  font-size: 14px;
}
.file {
  position: relative;
  overflow: hidden;
}
.file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.check {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 19px;
  cursor: pointer;
}
.check input {
  width: 24px;
  height: 24px;
  accent-color: var(--accent);
}
.save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
  padding: 12px 0 max(12px, env(safe-area-inset-bottom));
  background: var(--bg);
}
.new-form {
  margin: 18px 0 8px;
}
.new-form p {
  margin-top: 8px;
}
.danger {
  color: var(--danger);
}
.photo-menu {
  border: 0;
  border-radius: 12px;
  padding: 18px var(--pad);
  background: var(--bg);
  color: var(--fg);
  width: min(340px, calc(100vw - 32px));
}
.photo-menu::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.photo-menu img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 14px;
  max-height: 40vh;
  object-fit: contain;
}
.photo-menu .btn {
  width: 100%;
}
.photo-menu .btn + .btn {
  margin-top: 8px;
}
