/* ============================================
   cotoaleksandra — the public page
   A quiet list on the left, boxes in the middle,
   and a background colour that changes per category.
   (admin/ and login/ still use styles.css.)
   ============================================ */

:root {
  --ink: #191410;
  --box: #fffdf9;
  --accent: #d9481f;
  --hair: rgba(25, 20, 16, 0.12);

  /* one background per category */
  --bg-hello: #f7cfdc;   /* pink */
  --bg-showcase: #f6e27f;     /* yellow */
  --bg-about: #bcd6f4;  /* blue */
  --bg-contact: #cfe7c4; /* green */

  --display: "Fraunces", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", sans-serif;
  --side: 220px;
  --pad: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  --bg: var(--bg-hello);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.7s var(--ease);
}
body[data-category="showcase"] { --bg: var(--bg-showcase); }
body[data-category="about"] { --bg: var(--bg-about); }
body[data-category="contact"] { --bg: var(--bg-contact); }

::selection { background: var(--ink); color: var(--box); }
a { color: inherit; }

em {
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "SOFT" 60, "WONK" 1;
}

/* ---------- The list on the left ---------- */
.side {
  position: fixed; inset: 0 auto 0 0;
  width: var(--side);
  display: flex; flex-direction: column;
  padding: 36px 28px;
  z-index: 10;
}

.side__logo {
  font-family: var(--display);
  font-size: 17px;
  text-decoration: none;
  margin-bottom: 56px;
}

.side__nav { display: flex; flex-direction: column; gap: 14px; }

.side a[data-go],
.side__foot a {
  font-weight: 200;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  opacity: 0.42;
  transition: opacity 0.25s;
}
.side a[data-go]:hover,
.side__foot a:hover { opacity: 0.8; }
.side a[data-go].is-on { opacity: 1; font-weight: 400; }

.side__foot {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.side__foot a { font-size: 13px; }

/* ---------- The middle ---------- */
.stage {
  margin-left: var(--side);
  min-height: 100vh;
  padding: 72px var(--pad);
  display: flex; justify-content: center;
}

.panel {
  width: 100%; max-width: 640px;
  display: flex; flex-direction: column; gap: 20px;
  margin-block: auto; /* centred when it fits, starts at the top when it doesn't */
}
.panel[hidden] { display: none; }
.panel.enter .box { animation: rise 0.6s var(--ease) both; }
.panel.enter .box:nth-child(2) { animation-delay: 60ms; }
.panel.enter .box:nth-child(3) { animation-delay: 120ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.works { display: flex; flex-direction: column; gap: 20px; }

.box {
  background: var(--box);
  border-radius: 6px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 1px 2px rgba(25, 20, 16, 0.05), 0 12px 32px -18px rgba(25, 20, 16, 0.25);
}

.kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 14px;
}

.big {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.big em { color: var(--accent); }

.lede { font-size: 18px; margin-top: 18px; }
.box > .lede:first-of-type:nth-child(2) { margin-top: 0; }
.lede a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

.prose { font-size: 18px; line-height: 1.65; }
.section__note { font-family: var(--display); font-style: italic; font-size: 18px; }

/* ---------- Work ---------- */
.work__media {
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg) 35%, var(--box));
  display: grid; place-items: center;
  margin-bottom: 22px;
  transition: background-color 0.7s var(--ease);
}
.work__media span { font-size: 13px; font-weight: 200; opacity: 0.5; }
.work__media img,
.work__media video { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

.work__name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
}
.work__name em { color: var(--accent); }
a.work { display: block; text-decoration: none; transition: transform 0.3s var(--ease); }
a.work:hover { transform: translateY(-3px); }

/* ---------- Person ---------- */
.inv {
  display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--hair);
  font-size: 15px;
}
.meter { height: 6px; background: var(--hair); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }

/* ---------- The letter (contact form) ---------- */
.letter { display: flex; flex-direction: column; gap: 18px; }
.letter[hidden] { display: none; }
.letter__field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.letter__field span { opacity: 0.55; }
.letter__field input,
.letter__field textarea {
  font: inherit; font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--hair);
  padding: 6px 0;
  resize: vertical;
}
.letter__field input:focus,
.letter__field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.letter__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.letter__send {
  align-self: flex-start;
  font: inherit; font-size: 14px; letter-spacing: 0.04em;
  padding: 10px 22px;
  background: var(--ink); color: var(--box);
  border: 0; border-radius: 999px;
  cursor: pointer;
}
.letter__send:disabled { opacity: 0.5; cursor: progress; }
.letter__note { font-size: 14px; min-height: 1.4em; }
.letter__note.ok { color: var(--accent); }
.letter__note.bad { color: #a8301a; }

/* ---------- Phones: the list moves to the top ---------- */
@media (max-width: 760px) {
  .side {
    position: sticky; top: 0; bottom: auto;
    width: 100%;
    flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
    padding: 16px;
    background: var(--bg);
    transition: background-color 0.7s var(--ease);
  }
  .side__logo { margin: 0 auto 0 0; }
  .side__nav { flex-direction: row; flex-wrap: wrap; gap: 4px 16px; width: 100%; }
  .side__foot { display: none; }
  .stage { margin-left: 0; min-height: auto; padding: 24px 16px 56px; }
  .panel { margin-block: 0; }
  .inv { grid-template-columns: 1fr; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  body, .side, .work__media { transition: none; }
  .panel.enter .box { animation: none; }
}
