/* ============================================================
   Jeiqual — minimal · zen · monochrome
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --ink-soft: #4a4a4a;
  --ink-faint: #9a9a9a;
  --paper: #fbfbf9;
  --line: #e4e4e0;
  --max: 720px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem clamp(1.5rem, 5vw, 4rem);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.brand {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.42em;
  color: var(--ink);
  text-decoration: none;
  padding-left: 0.42em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.2rem);
}

.nav { display: flex; gap: clamp(1.2rem, 3vw, 2.4rem); }

.nav a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.4s var(--ease);
}
.nav a:hover { color: var(--ink); }

/* Language toggle */
.lang {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding-left: clamp(0.4rem, 2vw, 1rem);
  border-left: 1px solid var(--line);
}
.lang-btn {
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.4s var(--ease);
}
.lang-btn:hover { color: var(--ink-soft); }
.lang-btn.is-active { color: var(--ink); }
.lang-sep { color: var(--line); font-size: 0.72rem; }

@media (max-width: 620px) {
  .nav a:nth-child(1) { display: none; }
}
@media (max-width: 480px) {
  .nav { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}

.enso {
  width: clamp(150px, 26vw, 230px);
  margin-bottom: clamp(1.5rem, 4vw, 2.8rem);
  opacity: 0;
  animation: enso-in 2.4s var(--ease) 0.2s forwards;
}
.enso svg { width: 100%; height: auto; display: block; }
.enso path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: enso-draw 2.6s var(--ease) 0.3s forwards;
}

@keyframes enso-in { to { opacity: 1; } }
@keyframes enso-draw { to { stroke-dashoffset: 0; } }

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(3.4rem, 12vw, 7rem);
  line-height: 1;
  letter-spacing: 0.02em;
}

.tagline {
  margin-top: 1.4rem;
  font-size: clamp(0.95rem, 2.4vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(5rem, 14vh, 9rem) clamp(1.5rem, 5vw, 2rem);
}

.section-title {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2.6rem;
}

.lead {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-bottom: 1.8rem;
}

.body {
  font-size: 1.02rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- Divider ---------- */
.divider {
  width: 1px;
  height: clamp(3rem, 8vh, 5rem);
  background: var(--line);
  margin: 0 auto;
}

/* ---------- Apps ---------- */
.apps { list-style: none; }

.app {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(1.4rem, 4vw, 2.4rem);
  padding: clamp(2.6rem, 6vw, 3.6rem) 0;
  border-top: 1px solid var(--line);
}
.app:last-child { border-bottom: 1px solid var(--line); }

/* Logo mark */
.app-logo {
  width: clamp(52px, 12vw, 68px);
  height: clamp(52px, 12vw, 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.app-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}
.app-mono {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.app-mono--empty {
  color: var(--ink-faint);
  border-style: dashed;
}

.app-body h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  line-height: 1.2;
}
.app-body p {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.app-status {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .app {
    grid-template-columns: auto 1fr;
    align-items: start;
  }
  .app-status { grid-column: 2; margin-top: 0.4rem; }
}

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact .body { margin: 0 auto 1.6rem; }

.mail {
  display: inline-block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.mail::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0.05em;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.mail:hover::after { transform: scaleX(1); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.4rem clamp(1.5rem, 5vw, 2rem) 3rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.site-footer .mark {
  font-size: 1.1rem;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hero reveals wait a touch for the enso */
.hero .reveal { transition-delay: 0.9s; }
.hero .tagline.reveal { transition-delay: 1.15s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .enso { opacity: 1; }
  .enso path { stroke-dashoffset: 0; }
}
