/* ==========================================

   STUDIO LEPUS LUNARI

   Stylesheet v0.4

   ========================================== */

/* 01. VARIABLES */

:root {

  --cream: #f9f3e3;

  --paper: #f5f0e3;

  --darkblue: #0a437a;

  --yellow: #fecf0b;

  --ink: #221f20;

  --line: #2c83a0;

  --font-main: "IBM Plex Mono", monospace;

}

/* 02. GLOBAL */

*,

*::before,

*::after {

  box-sizing: border-box;

}

html {

  scroll-behavior: smooth;

}

body {

  margin: 0;

  background: var(--cream);

  color: var(--ink);

  font-family: var(--font-main);

  font-weight: 400;

}

a {

  color: inherit;

  text-decoration: none;

}

h1,

h2,

p {

  margin-top: 0;

}

h1,

h2 {

  font-weight: 700;

  letter-spacing: -0.065em;

}

.period {

  color: var(--yellow);

}

/* Small labels and document metadata */

nav a,

.document-label,

.eyebrow,

.section-heading,

.hero-footer,

.project-meta,

.project-bottom,

.site-footer,

.hero-phone-caption {

  font-size: 11px;

  font-weight: 500;

  letter-spacing: 0.02em;

}

/* Shared document rows */

.document-label,

.hero-footer,

.section-heading,

.project-meta,

.project-bottom {

  display: flex;

  justify-content: space-between;

  gap: 20px;

}

/* 03. HEADER */

.top-stripe {

  height: 9px;

  background: var(--yellow);

}

.site-header {

  display: flex;

  justify-content: space-between;

  align-items: center;

  padding: 22px 5%;

  border-bottom: 1px solid var(--line);

}

.brand {

  display: flex;

  align-items: center;

  gap: 15px;

  font-size: 17px;

  font-weight: 700;

  letter-spacing: -0.04em;

  line-height: 1.05;

}

.logo {

  width: 162px;

  height: auto;

  object-fit: contain;

  mix-blend-mode: multiply;

}

nav {

  display: flex;

  gap: 30px;

}

nav a {

  transition: color 0.2s ease;

}

nav a:hover {

  color: var(--yellow);

}

/* 04. HERO */

.hero {

  display: flex;

  flex-direction: column;

  min-height: 690px;

  padding: 30px 5% 24px;

  background: var(--ink);

  color: var(--paper);

}

.document-label {

  padding-bottom: 18px;

  border-bottom: 1px solid rgb(245 240 227 / 35%);

}

.hero-content {

  flex: 1;

  display: grid;

  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);

  align-items: center;

  gap: 50px;

  padding: 60px 0;

}

.hero-copy {

  position: relative;

  z-index: 2;

  min-width: 0;

}

.hero .eyebrow {

  margin-bottom: 20px;

  color: var(--yellow);

}

.hero h1 {

  margin-bottom: 32px;

  font-size: clamp(42px, 5.8vw, 100px);

  line-height: 1.08;

  overflow-wrap: anywhere;

}

.hero h1 em {

  color: var(--yellow);

  font-style: normal;

}

.hero-description {

  max-width: 440px;

  font-size: 18px;

  line-height: 1.6;

}

/* Hero action */

.action-link {

  display: inline-block;

  margin-top: 20px;

  padding: 18px 22px;

  background: var(--yellow);

  color: var(--ink);

  font-size: 13px;

  font-weight: 600;

  transition: background 0.2s, transform 0.2s;

}

.action-link:hover {

  background: var(--cream);

  transform: translateY(-3px);

}

.action-link span {

  margin-left: 25px;

}

/* Hero footer */

.hero-footer {

  margin-top: auto;

  padding-top: 20px;

  border-top: 1px solid rgb(245 240 227 / 35%);

}

.status {

  display: flex;

  align-items: center;

  gap: 8px;

}

.status i {

  width: 7px;

  height: 7px;

  background: var(--yellow);

  border-radius: 50%;

}

/* 05. PHONE MOCKUP */

.hero-phone-stage {

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  min-width: 0;

  padding: 25px;

}

.phone {

  position: relative;

  display: flex;

  flex-direction: column;

  width: min(250px, 100%);

  aspect-ratio: 9 / 18.5;

  padding: 12px 8px;

  background: var(--ink);

  border: 5px solid var(--darkblue);

  border-radius: 35px;

  transform: rotate(13deg);

  box-shadow:

    22px 25px 0 rgba(0, 0, 0, 0.13),

    30px 40px 50px rgba(0, 0, 0, 0.35);

  transition: transform 0.4s ease;

}

.phone:hover {

  transform: rotate(7deg) translateY(-10px);

}

.phone-camera {

  width: 52px;

  height: 7px;

  margin: 0 auto 9px;

  background: var(--ink);

  border-radius: 10px;

}

.phone-screen {

  flex: 1;

  min-height: 0;

  overflow: hidden;

  background: var(--line);

  border-radius: 16px;

}

.phone-screen img {

  display: block;

  width: 100%;

  height: 100%;

  object-fit: cover;

}

.phone-home {

  width: 65px;

  height: 4px;

  margin: 12px auto 0;

  background: var(--line);

  border-radius: 5px;

}

.hero-phone-caption {

  margin-top: 65px;

  color: var(--yellow);

  text-align: center;

}

/* 06. SHARED SECTIONS */

.section-pad {

  padding: 70px 5% 110px;

}

.section-heading {

  padding-bottom: 18px;

  margin-bottom: 70px;

  border-bottom: 1px solid var(--line);

}

/* 07. ABOUT */

.about h2,

.contact h2 {

  margin-bottom: 30px;

  font-size: clamp(38px, 5.5vw, 82px);

  line-height: 1.12;

}

.about p,

.contact p {

  max-width: 570px;

  font-size: 20px;

  line-height: 1.6;

}

/* 08. PROJECTS */

.projects {

  background: var(--ink);

}

.project-card {

  padding: 30px;

  background: var(--paper);

  border: 1px solid var(--darkblue);

}

.section-heading-projects {

  color: var(--cream);

}

.project-meta {

  padding-bottom: 20px;

  border-bottom: 1px solid var(--line);

}

.project-body {

  display: flex;

  justify-content: space-between;

  gap: 20px;

  padding: 65px 0 80px;

}

.project-info {

  flex: 1;

  min-width: 0;

}

.project-body h2 {

  margin: 20px 0 35px;

  font-size: clamp(48px, 7vw, 105px);

  line-height: 1;

}

.project-body p:not(.eyebrow) {

  max-width: 380px;

  font-size: 17px;

  line-height: 1.6;

}

.project-symbol {

  color: var(--yellow);

  font-size: 120px;

  line-height: 1;

}

.project-bottom {

  padding-top: 20px;

  border-top: 1px solid var(--line);

}

/* 09. EVIDENCE GALLERY */

.evidence-gallery {

  position: relative;

  flex: 0 1 48%;

  min-height: 420px;

}

.evidence-photo {

  position: absolute;

  margin: 0;

  padding: 10px 10px 8px;

  background: var(--paper);

  border: 1px solid var(--line);

  box-shadow: 9px 12px 22px rgba(0, 0, 0, 0.14);

  transition: transform 0.25s ease;

}

.evidence-photo img {

  display: block;

  width: 100%;

  aspect-ratio: 4 / 5;

  object-fit: cover;

  background: var(--cream);

}

.evidence-photo figcaption {

  padding-top: 10px;

  font-size: 10px;

  letter-spacing: 0.04em;

}

.evidence-main {

  width: 58%;

  left: 7%;

  top: 0;

  transform: rotate(-7deg);

}

.evidence-detail {

  width: 43%;

  right: 0;

  top: 85px;

  transform: rotate(9deg);

}

.evidence-main:hover {

  transform: rotate(0) scale(1.04);

  z-index: 3;

}

.evidence-detail:hover {

  transform: rotate(0) scale(1.04);

  z-index: 3;

}

/* 10. CONTACT */

.contact {

  min-height: 420px;

}

.contact-layout {

  display: grid;

  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

  gap: 8%;

  align-items: start;

}

.contact .contact-note {

  margin-top: 60px;

  font-size: 11px;

  letter-spacing: 0.06em;

  color: var(--line);

}

/* Correspondence form */

.contact-form {

  display: flex;

  flex-direction: column;

  min-width: 0;

  padding: 30px;

  background: var(--paper);

  border: 1px solid var(--ink);

}

.form-heading {

  display: flex;

  justify-content: space-between;

  gap: 12px;

  padding-bottom: 20px;

  margin-bottom: 30px;

  border-bottom: 1px solid var(--line);

  font-size: 11px;

}

.contact-form label {

  margin-bottom: 10px;

  font-size: 11px;

  font-weight: 600;

}

.contact-form input,

.contact-form textarea {

  width: 100%;

  margin-bottom: 26px;

  padding: 14px;

  background: transparent;

  border: 1px solid var(--line);

  border-radius: 0;

  color: var(--ink);

  font: 14px var(--font-main);

}

.contact-form textarea {

  resize: vertical;

}

.contact-form input:focus,

.contact-form textarea:focus {

  outline: 2px solid var(--yellow);

  outline-offset: 2px;

}

.form-submit {

  padding: 18px;

  border: 0;

  background: var(--line);

  color: var(--paper);

  font: 600 12px var(--font-main);

  cursor: pointer;

}

.form-submit:hover {

  background: var(--darkblue);

}

.contact .form-disclaimer {

  margin: 20px 0 0;

  font-size: 10px;

}

/* 11. FOOTER */

.site-footer {

  display: flex;

  justify-content: space-between;

  gap: 20px;

  padding: 30px 5%;

  background: var(--ink);

  color: var(--paper);

}

.site-footer a:hover {

  color: var(--yellow);

}

/* 12. RESPONSIVE — TABLET */

@media (max-width: 800px) {

  .hero-content {

    grid-template-columns: 1fr;

    gap: 30px;

    padding: 65px 0;

  }

  .hero h1 {

    font-size: clamp(34px, 8vw, 64px);

  }

  .hero-phone-stage {

    padding: 35px 20px;

  }

  .hero-phone-stage .phone {

    width: min(230px, 60vw);

  }

  .project-body {

    flex-direction: column;

  }

  .evidence-gallery {

    flex: none;

    width: 100%;

    min-height: 390px;

  }

  .contact-layout {

    grid-template-columns: 1fr;

    gap: 35px;

  }

}

/* 13. RESPONSIVE — MOBILE */

@media (max-width: 700px) {

  .site-header {

    flex-direction: column;

    align-items: flex-start;

    gap: 24px;

  }

  nav {

    flex-wrap: wrap;

    gap: 16px;

  }

  nav a {

    font-size: 10px;

  }

  .hero {

    min-height: 620px;

  }

  .document-label,

  .hero-footer,

  .section-heading,

  .project-meta,

  .project-bottom {

    flex-wrap: wrap;

    font-size: 10px;

  }

  .section-pad {

    padding: 50px 5% 75px;

  }

  .section-heading {

    margin-bottom: 50px;

  }

  .project-card {

    padding: 20px;

  }

  .project-body {

    padding: 60px 0;

  }

  .project-symbol {

    display: none;

  }

  .site-footer {

    flex-direction: column;

  }

}

@media (max-width: 450px) {

  .evidence-gallery {

    min-height: 300px;

  }

  .contact-form {

    padding: 20px;

  }

}

/* 14. ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {

  html {

    scroll-behavior: auto;

  }

  *,

  *::before,

  *::after {

    transition: none !important;

    animation: none !important;

  }

  .phone:hover {

    transform: rotate(13deg);

  }

  .evidence-main:hover {

    transform: rotate(-7deg);

  }

  .evidence-detail:hover {

    transform: rotate(9deg);

  }

}

/* the game */

/* 15. RABBIT CLEARANCE TEST */

.clearance {

  background: var(--paper);

}

.clearance-header {

  display: flex;

  justify-content: space-between;

  align-items: flex-start;

  gap: 30px;

  margin-bottom: 65px;

}

.clearance-header h2 {

  font-size: clamp(42px, 6vw, 90px);

  line-height: 1.05;

  letter-spacing: -0.065em;

  margin-bottom: 30px;

}

.clearance-header p:not(.eyebrow) {

  max-width: 500px;

  font-size: 17px;

  line-height: 1.6;

}

.clearance-stamp {

  flex-shrink: 0;

  padding: 15px 25px;

  border: 4px double var(--yellow);

  color: var(--yellow);

  font-size: 24px;

  font-weight: 700;

  line-height: 1.2;

  text-align: center;

  transform: rotate(12deg);

}

/* Terminal */

.game-terminal {

  max-width: 850px;

  margin: 0 auto;

  padding: 25px;

  background: var(--darkblue);

  border: 8px solid var(--ink);

  color: var(--paper);

  font-family: var(--font-main);

  box-shadow: 12px 15px 0 rgba(0,0,0,.12);

}

.terminal-header,

.terminal-footer,

.game-stats {

  display: flex;

  justify-content: space-between;

  gap: 15px;

}

.terminal-header,

.terminal-footer {

  font-size: 10px;

  letter-spacing: .04em;

}

.terminal-header {

  padding-bottom: 15px;

  border-bottom: 1px solid var(--line);

}

.terminal-footer {

  padding-top: 15px;

  border-top: 1px solid var(--line);

}

.game-instructions {

  padding: 30px 0 15px;

}

.game-instructions p {

  font-size: 12px;

  line-height: 1.7;

}

.game-instructions h3 {

  margin: 15px 0;

  color: #f5f0e3;

  font-size: clamp(18px, 3vw, 28px);

}

.game-stats {

  margin: 25px 0 15px;

  font-size: 14px;

  font-weight: 500;

}

.game-stats strong {

  color: #f5f0e3;

}

/* Playing field */

.game-grid {

  display: grid;

  grid-template-columns: repeat(5, 1fr);

  gap: 5px;

  padding: 8px;

  background: var(--ink);

  border: 1px solid var(--line);

}

.game-cell {

  display: flex;

  align-items: center;

  justify-content: center;

  min-width: 0;

  aspect-ratio: 1;

  background: var(--darkblue);

  border: 1px solid var(--line);

  color: var(--paper);

  font-size: clamp(18px, 4vw, 38px);

}

button.game-cell {

  cursor: pointer;

  font-family: var(--font-main);

}

.game-cell.rabbit {

  background: var(--line);

  color: #f5f0e3;

}

.game-cell.rabbit:hover {

  background: var(--yellow);

}

.game-cell:focus-visible {

  outline: 3px solid var(--yellow);

  outline-offset: -3px;

}

/* Controls */

.game-start {

  width: 100%;

  margin: 20px 0;

  padding: 18px;

  background: var(--paper);

  border: 0;

  color: var(--darkblue);

  font: 600 12px var(--font-main);

  cursor: pointer;

}

.game-start:hover {

  background: #f5f0e3;

}

.game-result {

  margin-top: 20px;

  padding: 20px;

  border: 1px dashed var(--paper);

  font-size: 13px;

  line-height: 1.8;

}

.game-result[hidden] {

  display: none;

}

/* Responsive */

@media (max-width: 700px) {

  .clearance-header {

    flex-direction: column;

    gap: 20px;

  }

  .clearance-stamp {

    font-size: 17px;

  }

  .game-terminal {

    padding: 12px;

    border-width: 5px;

  }

  .game-stats {

    font-size: 11px;

  }

  .terminal-header,

  .terminal-footer {

    flex-wrap: wrap;

    font-size: 9px;

  }

}


.game-rabbit-image {
  display: block;
  width: 85%;
  height: 85%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

/* Keep the active rabbit square highlighted */
.game-cell.rabbit {
  background: var(--line);
  overflow: hidden;
}

/* Yellow highlight when hovering */
.game-cell.rabbit:hover {
  background: var(--yellow);
}


/* 16. FILING-FOLDER NAVIGATION */
.folder-nav {
  --tab-height: 45px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  padding: 12px 5% 0;
  background: var(--cream);
  border-bottom: 4px solid var(--yellow);
  box-shadow: 0 3px 0 rgb(34 31 32 / 8%);
}

/* Override generic nav rules only within the folder navigation. */
.folder-nav .folder-tab {
  --tab-color: var(--yellow);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: var(--tab-height);
  padding: 12px clamp(8px, 2vw, 24px);
  background: var(--ink);
  color: var(--paper);
  border-radius: 11px 11px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.folder-nav .folder-tab[data-folder="studio"] { --tab-color: var(--yellow); }
.folder-nav .folder-tab[data-folder="about"] { --tab-color: var(--yellow); }
.folder-nav .folder-tab[data-folder="projects"] { --tab-color: var(--yellow); }
.folder-nav .folder-tab[data-folder="clearance"] { --tab-color: var(--yellow); }
.folder-nav .folder-tab[data-folder="contact"] { --tab-color: var(--yellow); }

.folder-nav .folder-tab.is-active {
  background: var(--tab-color);
  color: var(--ink);
  transform: translateY(-5px);
}
.folder-nav .folder-tab.is-active[data-folder="about"],
.folder-nav .folder-tab.is-active[data-folder="contact"] { color: var(--ink); }
.folder-nav .folder-tab:hover:not(.is-active) { background: var(--ink); color: var(--paper); }
.folder-nav .folder-tab:focus-visible { outline: 3px solid var(--line); outline-offset: 3px; }

/* Colour of the line below the selected folder. */
.folder-nav:has([data-folder="projects"].is-active) { border-bottom-color: var(--darkblue); }
.folder-nav:has([data-folder="clearance"].is-active) { border-bottom-color: var(--line); }
.folder-nav:has([data-folder="about"].is-active),
.folder-nav:has([data-folder="contact"].is-active) { border-bottom-color: var(--yellow); }

/* Avoid hiding section headings behind the sticky tabs on anchor jumps. */
#about, #projects, #clearance, #contact { scroll-margin-top: 90px; }

@media (max-width: 700px) {
  .folder-nav { gap: 3px; padding: 10px 3% 0; }
  .folder-nav .folder-tab { flex: 1; min-height: 40px; padding: 10px 3px; font-size: clamp(7px, 1.8vw, 10px); letter-spacing: -0.02em; }
}
@media (prefers-reduced-motion: reduce) {
  .folder-nav .folder-tab { transition: none; }
}

/* Folder navigation refinements */
.site-header { justify-content: flex-start; }
.folder-nav .folder-tab { gap: .6em; }
.folder-nav .folder-tab.is-active { transform: translateY(-5px); }
@media(max-width:700px) { .folder-nav .folder-tab { flex-direction: column; gap: 2px; } }





/* ==========================================
   17. OVERLAPPING PHONE HERO
   ========================================== */

.hero-phone-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  column-gap: 0;
  row-gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  isolation: isolate;
}

/* Both phones */
.hero-phone-stage .phone {
  width: 100%;
  max-width: 220px;
  min-width: 0;
  position: relative;
  transition: transform 0.4s ease;
}

/* Left phone: slightly behind */
.hero-phone-stage .phone:nth-child(1) {
  z-index: 1;
  transform: translateX(30px) rotate(-12deg);
}

/* Right phone: overlapping in front */
.hero-phone-stage .phone:nth-child(2) {
  z-index: 2;
  transform: translateX(-30px) rotate(10deg);
}

/* Bring whichever phone is hovered to the front */
.hero-phone-stage .phone:hover {
  z-index: 3;
}

.hero-phone-stage .phone:nth-child(1):hover {
  transform: translateX(30px)
             rotate(-5deg)
             translateY(-12px);
}

.hero-phone-stage .phone:nth-child(2):hover {
  transform: translateX(-30px)
             rotate(4deg)
             translateY(-12px);
}

/* Caption beneath both phones */
.hero-phone-stage .hero-phone-caption {
  grid-column: 1 / -1;
  margin-top: 25px;
  text-align: center;
  position: relative;
  z-index: 4;
}

/* Desktop layout */
@media (min-width: 801px) {
  .hero-content {
    grid-template-columns:
      minmax(0, 1.1fr)
      minmax(0, 1fr);
  }
}

/* Tablet */
@media (max-width: 800px) {
  .hero-phone-stage .phone {
    width: 100%;
    max-width: 190px;
  }
}

/* Mobile */
@media (max-width: 450px) {
  .hero-phone-stage {
    padding: 15px 10px;
  }

  .hero-phone-stage .phone {
    max-width: 145px;
  }

  .hero-phone-stage .phone:nth-child(1) {
    transform: translateX(18px) rotate(-12deg);
  }

  .hero-phone-stage .phone:nth-child(2) {
    transform: translateX(-18px) rotate(10deg);
  }

  .hero-phone-stage .phone:nth-child(1):hover {
    transform: translateX(18px) rotate(-5deg);
  }

  .hero-phone-stage .phone:nth-child(2):hover {
    transform: translateX(-18px) rotate(4deg);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-phone-stage .phone {
    transition: none;
  }

  .hero-phone-stage .phone:nth-child(1):hover {
    transform: translateX(30px) rotate(-12deg);
  }

  .hero-phone-stage .phone:nth-child(2):hover {
    transform: translateX(-30px) rotate(10deg);
  }
}



/* 18. ABOUT / PERSONNEL ARCHIVE */
.archive-tabs { display: flex; align-items: stretch; gap: 5px; }
.archive-tab { flex: 1; min-width: 0; padding: 17px 15px 13px; border: 0; border-radius: 11px 11px 0 0; background: var(--ink); color: var(--paper); text-align: left; font: 700 12px var(--font-main); cursor: pointer; }
.archive-tab span, .archive-tab small { display: block; }
.archive-tab small { margin-top: 7px; font-size: 10px; font-weight: 400; }
.archive-tab.is-active { background: var(--yellow); color: var(--ink); }
.archive-tab:hover:not(.is-active) { background: var(--darkblue); }
.archive-tab:focus-visible { outline: 3px solid var(--line); outline-offset: 3px; }
.archive-document { background: var(--paper); border: 1px solid var(--darkblue); padding: clamp(22px, 4vw, 48px); box-shadow: 10px 12px 0 rgb(34 31 32 / 8%); }
.archive-panel[hidden] { display: none; }
.archive-meta, .archive-end { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--darkblue); }
.archive-meta { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 35px; }
.archive-end { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 45px; }
.archive-panel h2 { margin-bottom: 25px; }
.archive-intro { max-width: 650px; }
.about .archive-prose p { max-width: none; margin: 0 0 20px; font-size: 16px; line-height: 1.8; }
.about .archive-intro p { font-size: 20px; }
.archive-person { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: clamp(25px, 5vw, 65px); align-items: start; }
.archive-portrait { margin: 0; padding: 10px; border: 1px solid var(--line); background: var(--cream); box-shadow: 6px 7px 0 rgb(34 31 32 / 10%); }
.archive-portrait img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: #dedbd1; }
.archive-portrait figcaption { padding: 12px 0 2px; font-size: 10px; color: var(--darkblue); }
.archive-kicker { display: block; margin-bottom: 15px; color: var(--darkblue); font-size: 11px; font-weight: 600; }
@media (max-width: 700px) {
  .archive-tab { padding: 12px 8px; font-size: 10px; }
  .archive-tab small { font-size: 9px; }
  .archive-person { grid-template-columns: 1fr; }
  .archive-portrait { width: min(260px, 100%); }
  .about .archive-prose p { font-size: 15px; }
  .about .archive-intro p { font-size: 18px; }
}
