@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=IM+FELL+English:ital@0;1&display=swap');

:root {
  --paper: #f5eddc;
  --paper-deep: #e9d9bb;
  --ink: #432d21;
  --ink-soft: #73533f;
  --accent: #ad452e;
  --clay: #c7744c;
  --ochre: #ddb765;
  --line: rgba(67, 45, 33, 0.5);
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --fell: 'IM FELL English', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-size: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

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

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  top: 1rem;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.inner-nav {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 2rem 0 0.9rem;
  border-bottom: 1px solid var(--ink);
  font-family: var(--sans);
}

.inner-nav__links {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 2.8vw, 2.4rem);
  flex-wrap: wrap;
}

.inner-nav a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  text-decoration: none;
}

.inner-nav a:hover,
.inner-nav a:focus-visible,
.inner-nav a[aria-current='page'] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35rem;
}

.site-footer {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 0.9rem 0 1.8rem;
  border-top: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.brand-logo {
  display: block;
  object-fit: contain;
}

.scribble-ring {
  position: relative;
}

.scribble-ring::before,
.scribble-ring::after {
  content: '';
  position: absolute;
  inset: 3%;
  border: 2px solid var(--accent);
  border-radius: 48% 52% 46% 54%;
  transform: rotate(-8deg);
  pointer-events: none;
}

.scribble-ring::after {
  inset: 10%;
  border-color: var(--line);
  transform: rotate(10deg);
}

/* Home */
.home-page {
  min-height: 100vh;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  position: relative;
  overflow: hidden;
}

.home-page::before {
  content: '';
  position: absolute;
  width: 15rem;
  height: 15rem;
  right: -6rem;
  top: 5rem;
  border: 2px solid var(--accent);
  border-radius: 47% 53% 50% 50%;
  transform: rotate(-9deg);
  pointer-events: none;
}

.home-mark {
  align-self: center;
  justify-self: center;
  width: min(18rem, 68%);
  aspect-ratio: 1;
  position: relative;
  transform: rotate(-3deg);
}

.home-mark::after {
  content: '';
  position: absolute;
  left: 7%;
  right: -5%;
  bottom: -0.8rem;
  height: 2px;
  background: var(--accent);
  transform: rotate(3deg);
}

.home-mark .brand-logo {
  width: 100%;
  height: 100%;
}

.home-nav {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  position: relative;
  z-index: 1;
}

.home-nav a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.1;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.45rem;
}

.home-nav a:nth-child(2) {
  transform: translateX(1.5rem);
}

.home-nav a:nth-child(3) {
  transform: translateX(-0.4rem);
}

.home-nav a:nth-child(4) {
  color: var(--accent);
  transform: translateX(2.25rem);
}

.home-footer {
  grid-column: 1 / -1;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-align: right;
}

/* About */
.about-main {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  display: grid;
  grid-template-columns: minmax(15rem, 0.78fr) minmax(22rem, 1.22fr);
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
  font-family: var(--fell);
}

.about-art {
  min-height: 28rem;
  display: grid;
  place-items: center;
}

.about-art__ring {
  width: min(18rem, 82%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.about-art .brand-logo {
  width: 72%;
  position: relative;
  z-index: 1;
  transform: rotate(-4deg);
}

.about-copy {
  max-width: 39rem;
  position: relative;
}

.about-copy::before {
  content: '';
  position: absolute;
  width: 6rem;
  height: 2.2rem;
  left: -2rem;
  top: -1.7rem;
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.about-copy p {
  margin: 0 0 1.25rem;
  font-size: clamp(1.08rem, 1.9vw, 1.35rem);
  line-height: 1.52;
}

.about-copy .lede {
  margin-bottom: 2.1rem;
  font-size: clamp(2.1rem, 4.5vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.about-copy .lede::first-letter {
  color: var(--accent);
  font-size: 1.16em;
}

.about-copy a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3rem;
}

.about-copy p:last-child a {
  color: var(--accent);
}

/* Wild walruses */
.gallery-main {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4.5rem, 9vw, 8rem);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(4rem, 8vw, 7rem) 1.4rem;
}

.gallery-shot {
  margin: 0;
  min-width: 0;
}

.gallery-shot img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--paper-deep);
}

.gallery-shot figcaption {
  max-width: 95%;
  margin-top: 0.8rem;
  font-family: var(--fell);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  font-style: italic;
  line-height: 1.38;
}

.gallery-shot:nth-child(1) {
  grid-column: 1 / span 7;
}

.gallery-shot:nth-child(1) img {
  aspect-ratio: 4 / 5;
  object-position: 50% 34%;
}

.gallery-shot:nth-child(2) {
  grid-column: 8 / span 5;
  align-self: end;
  transform: translateY(4.5rem) rotate(1deg);
}

.gallery-shot:nth-child(2) img {
  aspect-ratio: 4 / 5;
  object-position: 52% 40%;
}

.gallery-shot:nth-child(3) {
  grid-column: 2 / span 5;
  transform: rotate(-1deg);
}

.gallery-shot:nth-child(3) img {
  aspect-ratio: 5 / 6;
  object-position: 50% 66%;
}

.gallery-shot:nth-child(4) {
  grid-column: 7 / span 6;
  margin-top: 5.5rem;
}

.gallery-shot:nth-child(4) img,
.gallery-shot:nth-child(5) img {
  aspect-ratio: 16 / 10;
}

.gallery-shot:nth-child(4) figcaption {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.gallery-shot:nth-child(5) {
  grid-column: 2 / span 10;
  margin-top: 1.25rem;
  position: relative;
}

.gallery-shot:nth-child(5)::before {
  content: '';
  position: absolute;
  width: 7.5rem;
  height: 7.5rem;
  left: -3.25rem;
  top: -2.75rem;
  z-index: 1;
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.gallery-shot:nth-child(5) figcaption {
  max-width: none;
  text-align: right;
}

/* Websites */
.businesses-main {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6rem) 0;
  display: grid;
  grid-template-columns: minmax(15rem, 0.78fr) minmax(22rem, 1.22fr);
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
  font-family: var(--fell);
}

.businesses-art {
  min-height: 28rem;
  display: grid;
  place-items: center;
}

.businesses-art__ring {
  width: min(18rem, 82%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.businesses-art .brand-logo {
  width: 70%;
  position: relative;
  z-index: 1;
  transform: rotate(-3deg);
}

.site-list {
  border-top: 1px solid var(--ink);
}

.site-item {
  min-height: 7rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  border-bottom: 1px solid var(--ink);
}

.site-item__name {
  width: fit-content;
  font-size: clamp(2.4rem, 5.2vw, 4.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.5rem;
}

.site-item:nth-child(2) .site-item__name {
  transform: translateX(1.1rem) rotate(-1deg);
}

.site-item:nth-child(3) .site-item__name {
  transform: translateX(-0.5rem) rotate(0.7deg);
}

.coming-soon {
  color: var(--accent);
  font-size: 1rem;
  font-style: italic;
  white-space: nowrap;
  position: relative;
}

.coming-soon::before {
  content: '';
  position: absolute;
  width: 6rem;
  height: 2.3rem;
  left: 50%;
  top: 50%;
  border: 1px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-5deg);
}

/* Partners — deliberately absurd, still usable */
.partners-main {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
  padding: 2rem 0 2.8rem;
}

.partners-stage {
  min-height: 34rem;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  overflow: hidden;
  position: relative;
  background: var(--clay);
  color: var(--ink);
}

.partners-stage::before,
.partners-stage::after {
  content: '';
  position: absolute;
  border: 3px solid var(--ochre);
  border-radius: 47% 53% 50% 50%;
  pointer-events: none;
}

.partners-stage::before {
  width: 28rem;
  height: 28rem;
  left: -8rem;
  top: -10rem;
  transform: rotate(-8deg);
}

.partners-stage::after {
  width: 16rem;
  height: 16rem;
  right: -4rem;
  bottom: -6rem;
  border-color: var(--paper-deep);
  transform: rotate(12deg);
}

.partners-art {
  min-height: 34rem;
  padding: 3rem 1.5rem 2rem 3rem;
  position: relative;
}

.partners-art h1 {
  max-width: 22rem;
  margin: 0;
  position: relative;
  z-index: 2;
  font-family: var(--fell);
  font-size: clamp(4.5rem, 10vw, 7.8rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.76;
  transform: rotate(-5deg);
}

.partners-art .brand-logo {
  width: 21rem;
  height: 21rem;
  position: absolute;
  left: -1.5rem;
  bottom: -4.2rem;
  opacity: 0.9;
  transform: rotate(4deg);
}

.partners-art__line {
  width: 22rem;
  height: 2px;
  position: absolute;
  left: 2.5rem;
  bottom: 4rem;
  z-index: 2;
  background: var(--ochre);
  transform: rotate(-7deg);
}

.partners-form-zone {
  display: grid;
  place-items: center;
  padding: 3rem clamp(2rem, 5vw, 5.5rem);
  position: relative;
  z-index: 2;
}

.partners-form {
  width: min(100%, 27rem);
  padding: clamp(2.2rem, 5vw, 3.4rem);
  background: var(--paper-deep);
  color: var(--ink);
  transform: rotate(2deg);
  position: relative;
}

.partners-form::before {
  content: '';
  position: absolute;
  width: 7rem;
  height: 2.5rem;
  right: -1rem;
  top: 1rem;
  border-top: 2px solid var(--accent);
  border-radius: 50%;
  transform: rotate(10deg);
}

.form-field {
  margin-bottom: 2rem;
}

.form-field:nth-child(2) {
  transform: translateX(0.8rem) rotate(-1deg);
}

.form-field label {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--fell);
  font-size: 1.15rem;
  font-style: italic;
}

.form-field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.5rem 0.2rem;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--fell);
  font-size: 1.25rem;
}

.form-field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0.35rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.sign-in-button {
  width: 6rem;
  height: 6rem;
  flex: 0 0 6rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--fell);
  font-size: 1.15rem;
  font-style: italic;
  text-decoration: none;
  transform: rotate(-8deg);
}

.sign-in-button:hover,
.sign-in-button:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
}

.partner-access-label {
  margin: 0 0 1.2rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.partner-access-copy {
  max-width: 20rem;
  margin: 0 0 2rem;
  font-family: var(--fell);
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.25;
}

.forgot-link {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  font-family: var(--fell);
  font-size: 1rem;
  font-style: italic;
  text-underline-offset: 0.3rem;
}

.auth-status {
  min-height: 1.5rem;
  margin: 1.2rem 0 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.45;
}

.auth-status:empty {
  min-height: 0;
  margin: 0;
}

@media (max-width: 760px) {
  .inner-nav,
  .site-footer,
  .about-main,
  .gallery-main,
  .businesses-main,
  .partners-main {
    width: min(100% - 2.25rem, 42rem);
  }

  .inner-nav {
    padding-top: 1.25rem;
  }

  .inner-nav__links {
    gap: 0.25rem 1rem;
  }

  .inner-nav a {
    font-size: 0.82rem;
  }

  .home-page {
    min-height: 42rem;
    padding: 1.6rem 1.35rem 1.4rem;
    grid-template-columns: 1fr;
    grid-template-rows: 17rem 1fr auto;
  }

  .home-mark {
    width: 11rem;
  }

  .home-nav {
    align-self: start;
    padding-left: 6%;
  }

  .home-nav a {
    font-size: 1.45rem;
  }

  .home-nav a:nth-child(2) {
    transform: translateX(0.9rem);
  }

  .home-nav a:nth-child(3) {
    transform: translateX(-0.2rem);
  }

  .home-nav a:nth-child(4) {
    transform: translateX(1.3rem);
  }

  .home-footer {
    grid-column: 1;
    text-align: center;
  }

  .about-main,
  .businesses-main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2.5rem 0 3.5rem;
  }

  .about-art,
  .businesses-art {
    min-height: 15rem;
  }

  .about-art__ring,
  .businesses-art__ring {
    width: 12rem;
  }

  .about-copy::before {
    left: 0;
  }

  .gallery-main {
    display: block;
    padding: 3rem 0 4rem;
  }

  .gallery-shot,
  .gallery-shot:nth-child(2),
  .gallery-shot:nth-child(3),
  .gallery-shot:nth-child(4),
  .gallery-shot:nth-child(5) {
    margin: 0 0 3.25rem;
    transform: none;
  }

  .gallery-shot:nth-child(5)::before {
    width: 4.5rem;
    height: 4.5rem;
    left: -0.75rem;
    top: -1.35rem;
  }

  .site-item {
    min-height: 6rem;
  }

  .site-item__name {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .site-item:nth-child(2) .site-item__name,
  .site-item:nth-child(3) .site-item__name {
    transform: none;
  }

  .partners-stage {
    grid-template-columns: 1fr;
  }

  .partners-art {
    min-height: 19rem;
    padding: 2.2rem 1.5rem;
  }

  .partners-art h1 {
    max-width: 15rem;
    font-size: 4.6rem;
  }

  .partners-art .brand-logo {
    width: 14rem;
    height: 14rem;
    left: auto;
    right: -2rem;
    bottom: -2.5rem;
  }

  .partners-art__line {
    width: 12rem;
    left: 1.5rem;
    bottom: 2rem;
  }

  .partners-form-zone {
    padding: 2rem 1rem 3rem;
  }

  .partners-form {
    padding: 2.4rem 1.8rem 2rem;
    transform: rotate(1deg);
  }

  .form-field:nth-child(2) {
    transform: none;
  }

  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
