/* Fan ID photo booth site. Hand-written; there is no CSS build step. */

@font-face {
  font-family: "Sohne";
  src: url("/fonts/Sohne-Kraftig.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --green-300: #86efac;
  --gray-300: #d1d5db;
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --green-300: oklch(87.1% 0.15 154.449);
    --gray-300: oklch(87.2% 0.01 258.338);
  }
}

/* Reset: the parts of Tailwind's preflight the pages rely on. */
*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

img,
svg {
  display: block;
  vertical-align: middle;
}

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

button {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background-color: transparent;
  border-radius: 0;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "Sohne", sans-serif;
  background-color: #000;
  color: #fff;
}

/* Page frame */
.page {
  position: relative;
  max-width: 48rem;
  height: 100%;
  margin-inline: auto;
}

.site-header {
  position: relative;
  width: 100%;
  height: 2rem;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
}

.language-form {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
}

.language-button {
  display: flex;
  align-items: center;
  padding-inline: 0.5rem;
  cursor: pointer;
}

.header-logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.header-logo img {
  width: auto;
  height: 1rem;
  margin-inline: auto;
}

@media (min-width: 48rem) {
  .site-header {
    height: 2.5rem;
  }

  .header-logo img {
    height: 1.5rem;
  }
}

.site-footer {
  display: flex;
  justify-content: space-around;
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
}

/* Vertically centers a page's content in most of the viewport. */
.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  overflow: hidden;
  text-align: center;
}

/* Language modal */
.language-modal {
  position: absolute;
  inset: 0;
  background-color: rgb(0 0 0 / 50%);
}

.language-dialog {
  width: fit-content;
  max-width: 20rem;
  margin-top: 10rem;
  margin-inline: auto;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: #fff;
  color: #000;
  text-align: center;
}

.language-title {
  font-size: 1.25rem;
  line-height: calc(1.75 / 1.25);
  text-transform: uppercase;
}

.language-options {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top-width: 2px;
}

.language-option {
  padding-inline: 0.5rem;
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  text-transform: uppercase;
}

/* Photo page */
.photo-title {
  background-color: #000;
  color: var(--green-300);
  font-size: 3rem;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.photo-actions {
  display: flex;
  width: 100%;
  max-width: 28rem;
  margin-top: 1rem;
  font-size: 1.25rem;
  line-height: calc(1.75 / 1.25);
}

.photo-action {
  display: flex;
  flex: 50%;
  align-items: center;
  justify-content: center;
}

/* When Share is unsupported its button is hidden; Save then fills the row. */
.photo-action:has(> [hidden]) {
  display: none;
}

.photo-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 2px solid #fff;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  text-transform: uppercase;
  cursor: pointer;
}

.photo-strip {
  /* Fits a 320px phone with its 1rem margins. */
  max-width: min(22.5rem, calc(100% - 2rem));
  margin: 1rem;
  border-radius: 0.25rem;
  background-color: #fff;
}

.photo-divider {
  width: 90%;
  margin-top: 1rem;
  margin-bottom: 2rem;
  border: 1px solid #fff;
}

/* 404 page */
.not-found-title {
  background-color: #000;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  text-align: center;
  text-transform: uppercase;
}

.not-found-message {
  margin-top: 0.25rem;
  color: var(--gray-300);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  text-align: center;
  text-wrap: pretty;
}

.section-divider {
  width: 20rem;
  margin-block: 1rem;
  border-top-width: 2px;
  border-color: #fff;
}

.visit-title {
  background-color: #000;
  color: var(--green-300);
  font-size: 1.5rem;
  line-height: calc(2 / 1.5);
  text-align: center;
  text-transform: uppercase;
}

.visit-text {
  max-width: 24rem;
  margin-inline: 1rem;
  text-wrap: balance;
}

.learn-more-button {
  display: block;
  width: 20rem;
  margin-inline: auto;
  margin-top: 1rem;
  border: 2px solid var(--green-300);
  border-radius: 0.375rem;
  color: var(--green-300);
  font-size: 1.125rem;
  line-height: calc(1.75 / 1.125);
  text-align: center;
  text-transform: uppercase;
  text-wrap: pretty;
}
