/* Nepwitch — Nadia Estia Putri, Social Media Specialist
   ANTI-SLOP DESIGN NOTES (read before touching this file):
   - No gradients. No glassmorphism, no backdrop blur, no soft purple glow.
   - No generic rounded cards with soft shadows. Corners stay sharp (2px),
     shadows are hard offsets (4px 4px 0 ink), borders are real hairlines.
   - No emoji icons, no sparkle bullets, no stock-photo hero. The only
     decorative glyph is the moon — it IS the brand mark.
   - Type does the work: Fraunces for display, Inter for body,
     Space Mono for labels, captions and numbers. Everything labelled
     like field notes: N°01, WEEK 1, FIG. A.
   - Palette is flat and deliberate — the user's own four colours:
     #CB7087 dusty rose, #EDBECA light pink, #FFD6DC pale pink
     on a white base. Ink is a deep rose-plum derived from #CB7087
     (#3F1E2A) so text stays readable. Nothing else. */

:root {
  --ink: #3F1E2A;
  --ink-soft: #6E3B4C;
  --paper: #FFFFFF;
  --paper-2: #FFD6DC;
  --card: #FFFFFF;
  --lilac: #CB7087;
  --lilac-ink: #9C4A62;
  --lilac-wash: #EDBECA;
  --coffee: #9C4A62;
  --line: #3F1E2A;
  --line-soft: #EBC9CF;
  --muted: #96707C;
  --hard: 5px 5px 0 var(--ink);
  --hard-sm: 3px 3px 0 var(--ink);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--lilac); color: #fff; }

img { display: block; max-width: 100%; height: auto; }
a { color: var(--lilac-ink); }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h1 em, h2 em { font-style: italic; color: var(--lilac-ink); }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coffee);
}
.eyebrow::before { content: "☾  "; color: var(--lilac); }

/* --- Moon rule divider: a typographic divider, not a decoration --- */
.moon-rule {
  font-family: var(--mono);
  letter-spacing: 0.6em;
  color: var(--lilac);
  font-size: 0.9rem;
  padding: 0.4rem 0;
  user-select: none;
}

/* --- Top bar: flat, solid, one hairline --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
}
.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: #FFD6DC;
  box-shadow: var(--hard-sm);
}
.brand small {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 0.1rem;
}
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.nav-cta {
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink) !important;
  box-shadow: var(--hard-sm);
}
.nav-cta:hover { background: var(--lilac-wash); text-decoration: none; }

/* --- Layout --- */
main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-head { max-width: 680px; margin-bottom: 2.5rem; }
.section-sub { color: var(--ink-soft); margin: 0; }
.section-no {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--lilac);
  text-transform: uppercase;
}

/* --- Buttons: sharp corners, hard shadow, press-down on hover --- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  box-shadow: var(--hard-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--lilac-ink); }
.btn-ghost { background: #fff; color: var(--ink); }
.btn-ghost:hover { background: var(--lilac-wash); }

/* --- Hero: editorial, asymmetric, with a field-notes margin --- */
.hero { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 2.5rem;
  align-items: start;
}
.hero-sub { max-width: 620px; font-size: 1.15rem; color: var(--ink-soft); }
.hero-sub strong { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.6rem 0 2.2rem; }

/* Field-notes margin: dashed border, mono type, rotated label. */
.field-notes {
  border: 1.5px dashed var(--coffee);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--ink-soft);
  transform: rotate(1.2deg);
}
.field-notes h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coffee);
  margin: 0 0 0.6rem;
}
.field-notes p { margin: 0.35rem 0; }
.field-notes strong { color: var(--ink); }

.hero-proof {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 1.1rem 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  border-top: 2px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
}
.hero-proof li { display: flex; flex-direction: column; gap: 0.15rem; }
.hero-proof strong { font-family: var(--serif); font-size: 1.9rem; }
.hero-proof strong .unit { font-size: 1rem; color: var(--muted); }
.hero-proof span { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }

.hero-photo { margin: 0 auto; max-width: 760px; position: relative; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 16 / 8.2;
  object-fit: cover;
  object-position: center 38%;
  border: 2px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--hard);
}
.hero-photo figcaption {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.hero-photo figcaption::before { content: "FIG. 01 — "; color: var(--coffee); font-weight: 700; }

/* --- Work / projects: numbered entries, hairline rules, flat frames --- */
.work { border-top: 2px solid var(--line); }
.project {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: 2.8rem 0;
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.project:first-of-type { border-top: none; }
.project-flip .project-media { order: 2; }
.project-flip .project-body { order: 1; }
.project-text-only { grid-template-columns: 1fr; }
.project-text-only .project-body { max-width: 46rem; }

.project-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  position: sticky;
  top: 5.5rem;
}
.project-media img {
  width: 100%;
  aspect-ratio: 3 / 4.4;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--hard-sm);
}
.project-media img:nth-child(2) { margin-top: 1.6rem; transform: rotate(0.8deg); }
.project-media img:nth-child(1) { transform: rotate(-0.6deg); }

.project-no {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--coffee);
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}
.project-no b { color: var(--lilac); font-size: 1.05rem; }
.project-line {
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0 0 1.4rem;
}

.psr { margin: 0 0 1.4rem; display: grid; gap: 1rem; }
.psr > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  border-top: 1px dashed var(--line-soft);
  padding-top: 0.9rem;
}
.psr > div:first-child { border-top: none; padding-top: 0; }
.psr dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lilac-ink);
}
.psr dd { margin: 0; }
.psr dd q { font-style: italic; }

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.2rem;
  padding: 0;
}
.tags li {
  padding: 0.3rem 0.7rem;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: #fff;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.result-link {
  border: 2px solid var(--line);
  background: var(--lilac-wash);
  border-radius: 2px;
  padding: 1rem 1.2rem;
  box-shadow: var(--hard-sm);
  margin: 0 0 1.2rem;
}
.result-link strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lilac-ink);
  margin-bottom: 0.3rem;
}
.result-link p { margin: 0; }

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 2px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding: 1rem 0;
  margin: 0 0 0.8rem;
}
.result-stats div { display: flex; flex-direction: column; gap: 0.15rem; }
.result-stats strong { font-family: var(--serif); font-size: 1.6rem; }
.result-stats span { color: var(--muted); font-size: 0.85rem; line-height: 1.45; }


.process {
  border-top: 1px dashed var(--line-soft);
  padding-top: 1.2rem;
  margin: 0 0 1.2rem;
}
.process h4 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lilac-ink);
  margin: 0 0 1rem;
}
.process-steps {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.process-steps li { display: flex; flex-direction: column; gap: 0.4rem; }
.process-steps img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--hard-sm);
}
.process-steps strong { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.04em; }
.process-steps span { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; }

.week-plan {
  background: var(--paper-2);
  border: 2px solid var(--line);
  border-radius: 2px;
  padding: 1rem 1.2rem;
  box-shadow: var(--hard-sm);
}
.week-plan summary { cursor: pointer; font-family: var(--mono); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; }
.week-plan ol { margin: 0.9rem 0 0.4rem; padding-left: 1.25rem; display: grid; gap: 0.6rem; }
.week-plan p { margin: 0.8rem 0 0; }

/* --- Gallery: contact sheet, pinned prints, mono captions --- */
.gallery { border-top: 2px solid var(--line); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.gallery-grid figure { margin: 0; }
.gallery-grid figure:nth-child(odd) { transform: rotate(-0.9deg); }
.gallery-grid figure:nth-child(even) { transform: rotate(0.9deg); }
.gallery-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 2px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--hard-sm);
  background: #fff;
  padding: 6px;
}
.gallery-grid figcaption {
  margin-top: 0.6rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

/* --- Services: a ruled list, not a card grid --- */
.services { border-top: 2px solid var(--line); }
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--line);
}
.service-list li {
  display: grid;
  grid-template-columns: 4rem 1fr 1.4fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.4rem 0.2rem;
  border-bottom: 1px solid var(--line-soft);
}
.service-list li:hover { background: var(--lilac-wash); }
.service-no { font-family: var(--mono); font-weight: 700; color: var(--lilac); font-size: 0.95rem; }
.service-list h3 { margin: 0; }
.service-list p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* --- About: dark grimoire frame, dashed inner border --- */
.about { border-top: 2px solid var(--line); }
.about-card {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  background: var(--ink);
  color: #FFD6DC;
  border-radius: 2px;
  padding: clamp(1.8rem, 4vw, 2.8rem);
  border: 2px solid var(--ink);
  outline: 1.5px dashed rgba(203, 112, 135, 0.6);
  outline-offset: -12px;
}
.about-card h2 { color: #fff; }
.about-card .eyebrow { color: var(--lilac); }
.about-card .eyebrow::before { color: #FFD6DC; }
.about-lede { font-size: 1.08rem; }
.about-card p { color: #F3D9DE; }
.about-facts h3 {
  color: #fff;
  font-size: 1rem;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}
.about-facts .tags li { background: transparent; border-color: #CB7087; color: #FFD6DC; }
.about-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: 0.35rem; color: #F3D9DE; }
.about-list li::before { content: "☾  "; color: var(--lilac); }

/* --- Contact --- */
.contact { text-align: center; border-top: 2px solid var(--line); }
.contact .hero-actions { justify-content: center; }
.contact-sub { max-width: 560px; margin: 0 auto; color: var(--ink-soft); }
.contact-mail { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); font-weight: 700; margin-top: 1.4rem; }

/* --- Photo viewer (lightbox): tap any photo, zoom, swipe, Esc to close --- */
.hero-photo img, .project-media img, .gallery-grid img, .process-steps img { cursor: zoom-in; }
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #3F1E2A;
  color: #FFD6DC;
}
.lightbox-top {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 1rem clamp(1rem, 4vw, 2rem) 0.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.lightbox-count { color: var(--lilac); font-weight: 700; white-space: nowrap; }
.lightbox-caption {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lightbox-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  padding: 0.5rem;
}
.lightbox-stage img {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 11rem);
  max-height: calc(100dvh - 11rem);
  object-fit: contain;
  border: 2px solid #FFD6DC;
  border-radius: 2px;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-stage.zoomed { cursor: grab; }
.lightbox-stage.zoomed:active { cursor: grabbing; }
.lightbox-controls {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.8rem 1rem 1.2rem;
}
.lightbox-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.lightbox-controls button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45); }
#lb-zoom-label {
  min-width: 3.4rem;
  text-align: center;
  font-family: var(--mono);
  font-weight: 700;
  color: #FFD6DC;
}

/* --- Footer --- */
.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem;
  border-top: 2px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.8;
}
.footer p { margin: 0.3rem 0; }
.footer a { color: var(--ink-soft); }

/* --- Responsive --- */
@media (max-width: 760px) {
  .nav a:not(.nav-cta) { display: none; }
  .brand small { display: none; }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .field-notes { transform: rotate(0deg); max-width: 420px; }
  .project, .project-flip .project-media, .project-flip .project-body { grid-template-columns: 1fr; }
  .project-media { position: static; order: 0 !important; }
  .project-body { order: 0 !important; }
  .project-media img { aspect-ratio: 4 / 3.4; }
  .project-media img:nth-child(2) { margin-top: 0; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .result-stats { grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .service-list li { grid-template-columns: 3rem 1fr; }
  .service-list li p { grid-column: 2; }
  .about-card { grid-template-columns: 1fr; }
  .hero-proof { grid-template-columns: 1fr; gap: 0.9rem; }
  .psr > div { grid-template-columns: 1fr; gap: 0.1rem; }
}
@media (max-width: 560px) {
  h1 br, h2 br { display: none; }
  .gallery-grid { grid-template-columns: 1fr; }
  .result-stats { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .hero-photo img { aspect-ratio: 4 / 3; }
}
