/* ============================================================
   The Unkind Ice Cream Co. — theunkind.co.uk
   Palette: ledger paper, printer's ink, pillar-box red.
   Type: Besley (a Clarendon, like the logo) + Courier Prime.
   ============================================================ */

:root {
  --paper: #f4efe6;
  --paper-bright: #fbf8f2;
  --ink: #181310;
  --red: #c0311c;
  --rule: rgba(24, 19, 16, 0.85);
  --rule-faint: rgba(24, 19, 16, 0.18);
  --serif: "Besley", "Georgia", serif;
  --mono: "Courier Prime", "Courier New", monospace;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 80px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* faint paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0 0.06 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, header, footer { position: relative; z-index: 1; }

::selection { background: var(--red); color: var(--paper); }

a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

h1, h2, h3 { font-weight: 900; line-height: 1.04; letter-spacing: -0.01em; }

h2 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  max-width: 18ch;
  margin-bottom: 0.35em;
}

/* "The premise is simple." (23 characters) needs more room than the
   default 18ch before its own intentional <br> — otherwise it wraps
   a second, unwanted time first on desktop. Mobile naturally still
   wraps to 3 lines regardless of this value (viewport, not max-width,
   is the constraint there) — that's the intended look, not a bug. */
.h2--wide {
  max-width: 26ch;
}

.eyebrow {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--red);
  margin-bottom: 1.4rem;
}

.smallprint {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  padding: 0.85em 1.5em;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--red { background: var(--red); color: var(--paper); }
.btn:disabled { opacity: 0.6; cursor: wait; }

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem var(--pad);
  background: var(--paper);
  border-bottom: 2px solid var(--rule);
}

.site-head__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.05;
}
.site-head__brand img { display: block; }
.site-head__brand em {
  display: block;
  font-style: normal;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.site-head__nav {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}
.site-head__nav a {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.site-head__nav a:hover { border-bottom-color: var(--red); color: var(--red); }

.site-head__cta { padding: 0.6em 1.1em; box-shadow: 3px 3px 0 rgba(24,19,16,0.35); }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  padding: clamp(4rem, 9vw, 7.5rem) var(--pad) clamp(3.5rem, 7vw, 6rem);
}

.hero__title {
  font-size: clamp(2.6rem, 8vw, 6.2rem);
  max-width: 15ch;
}
.hero__title em {
  font-style: italic;
  color: var(--red);
}

.hero__lead {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  margin-top: 1.6rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.2rem;
}

/* rotating badge */
.hero__badge {
  position: absolute;
  top: clamp(3rem, 8vw, 6rem);
  right: clamp(1rem, 6vw, 5rem);
  width: clamp(120px, 16vw, 190px);
  aspect-ratio: 1;
}
.hero__badge svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 28s linear infinite;
}
.hero__badge text {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  fill: var(--ink);
}
.hero__badge img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 46%;
  height: 46%;
  border-radius: 50%;
  border: 2px solid var(--ink);
}
@keyframes spin { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .hero__badge svg { animation: none; }
}

/* ---------------- ticker ---------------- */

.ticker {
  overflow: hidden;
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  background: var(--paper-bright);
  padding: 0.75rem 0;
}
.ticker__track {
  display: inline-flex;
  align-items: center;
  gap: 2.2rem;
  white-space: nowrap;
  width: max-content;
  animation: ticker 46s linear infinite;
}
.ticker__track span {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.ticker__track i { font-style: normal; color: var(--red); }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
}

.ticker__note {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.8rem var(--pad) 0;
  opacity: 0.75;
}

/* ---------------- sections ---------------- */

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) var(--pad);
}
.section--ruled { border-top: 2px solid var(--rule); }

.section__lead {
  max-width: 52ch;
  margin: 0.6rem 0 2.4rem;
}
.section__lead a { color: var(--red); font-weight: 700; }

/* ---------------- premise steps ---------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 3rem;
  border-top: 2px solid var(--rule);
}
.steps__item {
  padding: 2rem 2rem 0.5rem 0;
}
.steps__item + .steps__item {
  border-left: 2px solid var(--rule);
  padding-left: 2rem;
}
.steps__num {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--red);
  margin-bottom: 1.2rem;
}
.steps__item h3 {
  font-size: 1.45rem;
  margin-bottom: 0.7rem;
}
.steps__item em { font-style: italic; }

/* ---------------- events menu ---------------- */

.menu {
  list-style: none;
  margin-top: 2.5rem;
  border-top: 2px solid var(--rule);
}
.menu li {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 1.8fr;
  gap: 0.5rem 3rem;
  align-items: baseline;
  padding: 1.4rem 0.8rem;
  border-bottom: 2px solid var(--rule);
  transition: background 140ms ease, color 140ms ease;
}
.menu li:hover {
  background: var(--ink);
  color: var(--paper);
}
.menu li:hover h3 { color: var(--paper); }
.menu h3 { font-size: 1.5rem; }
.menu p { max-width: 58ch; }

/* ---------------- gallery ---------------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 3vw, 2.5rem);
  margin-top: 1rem;
}
.gallery figure {
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  padding: 0.7rem 0.7rem 0.9rem;
  box-shadow: 5px 5px 0 rgba(24, 19, 16, 0.22);
}
.gallery figure:nth-child(odd) { transform: rotate(-1.1deg); }
.gallery figure:nth-child(even) { transform: rotate(1deg); }
.gallery figure:hover { transform: rotate(0deg); }
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--rule-faint);
}
.gallery figcaption {
  display: grid;
  gap: 0.4rem;
  padding-top: 0.75rem;
}
.gallery__name {
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.3;
}
.gallery__brief {
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
}
.gallery__brief em {
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
}

/* ---------------- faq ---------------- */

.faq {
  margin-top: 2.5rem;
  border-top: 2px solid var(--rule);
  max-width: 60rem;
}
.faq details { border-bottom: 2px solid var(--rule); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  padding: 1.3rem 0.4rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--red); }
.faq__plus {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--red);
  transition: transform 160ms ease;
  flex-shrink: 0;
}
.faq details[open] .faq__plus { transform: rotate(45deg); }
.faq details p {
  padding: 0 0.4rem 1.4rem;
  max-width: 60ch;
}

/* ---------------- brief form ---------------- */

.brief-form {
  max-width: 46rem;
  margin-top: 1rem;
}

.brief-form__honey { display: none; }

.brief-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.brief-form__row--three { grid-template-columns: 1fr 1.2fr 0.8fr; }

.brief-form label {
  display: block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1.2rem;
}

.brief-form input:not([type="checkbox"]),
.brief-form select,
.brief-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.45rem;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 0.75em 0.9em;
}
.brief-form textarea { resize: vertical; }
.brief-form ::placeholder { color: rgba(24, 19, 16, 0.45); font-style: italic; }

.brief-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23181310' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9em center;
  padding-right: 2.4em;
}

.brief-form__foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.brief-form__foot .smallprint { max-width: 30ch; opacity: 0.8; }

.brief-form__status {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--red);
  margin-top: 1.2rem;
  min-height: 1.4em;
}

.brief-alt {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px dashed var(--rule-faint);
  font-size: 1rem;
  max-width: 52ch;
}
.brief-alt a { color: var(--red); font-weight: 700; }

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

.site-foot {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 3.5rem var(--pad) 2.5rem;
}
.site-foot__badge img {
  border-radius: 50%;
  border: 3px solid var(--paper);
}
.site-foot__word {
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.1;
  margin-top: 1.2rem;
}
.site-foot__social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.site-foot__social a { text-decoration: none; border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.site-foot__social a:hover { color: var(--red); }
.site-foot__social span { color: var(--red); }
.site-foot__legal {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  margin-top: 2.2rem;
  opacity: 0.65;
}

/* ---------------- 404 ---------------- */

.melted {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: var(--pad);
}
.melted h1 {
  font-size: clamp(4rem, 16vw, 11rem);
  color: var(--red);
}
.melted p { max-width: 40ch; margin: 1rem 0 2rem; font-size: 1.15rem; }

/* ---------------- responsive ---------------- */

@media (max-width: 920px) {
  .hero__badge { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps__item { padding: 1.6rem 0; }
  .steps__item + .steps__item {
    border-left: none;
    border-top: 2px solid var(--rule);
    padding-left: 0;
  }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .site-head__nav { display: none; }
  .menu li { grid-template-columns: 1fr; padding: 1.2rem 0.4rem; }
  .brief-form__row, .brief-form__row--three { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; text-align: center; }
}
