/* tanso.tech — luxury carbon-fiber notebook */

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

:root {
  --carbon-black: #1a1a1e;
  --carbon-gray: #3a3a40;
  --triadic-blue: #4a7ae8;
  --triadic-orange: #e8874a;
  --triadic-green: #4ae87a;
  --fiber-silver: #b8b4b0;
  --white-bright: #e8e4e0;
}

html, body {
  background: var(--carbon-black);
  color: var(--fiber-silver);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

::selection {
  background: var(--triadic-blue);
  color: var(--carbon-black);
}

/* ---------- minimal nav ---------- */
.minimal-nav {
  position: fixed;
  top: 28px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 60px);
  z-index: 50;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fiber-silver);
  text-transform: uppercase;
  pointer-events: none;
}

.nav-mark {
  font-family: "Caveat", cursive;
  font-size: 22px;
  letter-spacing: 0;
  color: var(--white-bright);
  text-transform: none;
}

.nav-trail {
  flex: 1;
  height: 1px;
  margin: 0 28px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(184, 180, 176, 0.18) 30%,
    rgba(184, 180, 176, 0.18) 70%,
    transparent 100%);
}

.nav-domain { color: rgba(184, 180, 176, 0.62); }

/* ---------- carbon weave pattern ---------- */
.weave-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    linear-gradient(45deg, var(--white-bright) 25%, transparent 25%, transparent 75%, var(--white-bright) 75%),
    linear-gradient(45deg, var(--white-bright) 25%, transparent 25%, transparent 75%, var(--white-bright) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 7px 7px;
}

/* ---------- opening viewport ---------- */
.opening {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px clamp(20px, 5vw, 60px) 80px;
  overflow: hidden;
}

.opening-inner {
  position: relative;
  width: 100%;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.opening-lead {
  font-family: "Fira Code", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(184, 180, 176, 0.55);
  opacity: 0;
  transform: translateY(8px);
  animation: fade-up 700ms 200ms ease forwards;
}

.lead-mono::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--triadic-blue);
  vertical-align: middle;
  margin-right: 12px;
}

.opening-title {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(72px, 13vw, 168px);
  line-height: 0.95;
  color: var(--white-bright);
  letter-spacing: -0.005em;
  display: flex;
  align-items: baseline;
  gap: 0.06em;
  flex-wrap: wrap;
}

.title-line {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation: fade-up 900ms ease forwards;
}

.title-line.line-1 { animation-delay: 400ms; }
.title-line.line-2 { animation-delay: 750ms; }

.title-dot {
  display: inline-block;
  color: var(--triadic-orange);
  opacity: 0;
  animation: fade-up 600ms 650ms ease forwards;
}

.triadic-marks {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: -6px;
  opacity: 0;
  animation: fade-up 800ms 1100ms ease forwards;
}

.mark {
  display: inline-block;
  width: 28px;
  height: 2px;
  transform-origin: left center;
}

.mark-blue { background: var(--triadic-blue); width: 56px; }
.mark-orange { background: var(--triadic-orange); width: 32px; transform: translateY(-4px); }
.mark-green { background: var(--triadic-green); width: 18px; transform: translateY(2px); }

.opening-sub {
  max-width: 640px;
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.85;
  color: rgba(232, 228, 224, 0.78);
  opacity: 0;
  animation: fade-up 900ms 1300ms ease forwards;
}

.opening-sub em {
  font-style: italic;
  font-family: "Caveat", cursive;
  font-size: 1.18em;
  color: var(--white-bright);
  letter-spacing: 0.005em;
}

.opening-illustration {
  margin-top: 12px;
  opacity: 0;
  animation: fade-up 1000ms 1500ms ease forwards;
}

.line-illus { width: 100%; height: auto; max-width: 600px; display: block; }

.draw-path path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: draw-stroke 2400ms 1700ms ease-out forwards;
}

@keyframes draw-stroke {
  to { stroke-dashoffset: 0; }
}

.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: "Fira Code", monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(184, 180, 176, 0.5);
  opacity: 0;
  animation: fade-up 800ms 2100ms ease forwards;
}

.hint-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, transparent, var(--fiber-silver));
  animation: hint-pulse 2200ms infinite ease-in-out;
}

@keyframes hint-pulse {
  0%, 100% { opacity: 0.2; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ---------- content stream ---------- */
.stream {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px clamp(20px, 5vw, 40px) 160px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.entry {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 26px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.entry.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.entry-header {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(184, 180, 176, 0.6);
}

.entry-index {
  color: var(--triadic-blue);
}

.entry-stamp::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: rgba(184, 180, 176, 0.35);
  vertical-align: middle;
  margin-right: 10px;
}

.entry-title {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.05;
  color: var(--white-bright);
  letter-spacing: 0.002em;
  max-width: 22ch;
}

.entry-body {
  max-width: 56ch;
  color: rgba(232, 228, 224, 0.74);
}

.entry-illus {
  margin: 14px 0;
  padding: 18px 0;
  border-top: 1px solid rgba(184, 180, 176, 0.08);
  border-bottom: 1px solid rgba(184, 180, 176, 0.08);
}

.entry-illus svg { max-width: 720px; }

.hex-grid polygon,
.illus-weave path,
.illus-nanotube ellipse,
.illus-nanotube line {
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  transition: stroke-dashoffset 1400ms ease;
}

.entry.is-revealed .hex-grid polygon,
.entry.is-revealed .illus-weave path,
.entry.is-revealed .illus-nanotube ellipse,
.entry.is-revealed .illus-nanotube line {
  stroke-dashoffset: 0;
}

.entry-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 36px;
  font-family: "Fira Code", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fiber-silver);
  padding-top: 8px;
}

.spec-row {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.spec-key {
  color: rgba(184, 180, 176, 0.5);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
}

.spec-val {
  color: var(--white-bright);
}

.entry-aside {
  font-family: "Caveat", cursive;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.45;
  color: rgba(232, 228, 224, 0.85);
  padding: 4px 0 4px 26px;
  border-left: 1px solid var(--triadic-orange);
  max-width: 36ch;
}

.entry-aside em {
  display: block;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.14em;
  color: rgba(184, 180, 176, 0.5);
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ---------- angle divider ---------- */
.angle-divider {
  width: 100%;
  margin: 0 auto;
  opacity: 0.7;
}

.angle-divider svg { width: 100%; height: 36px; display: block; }

/* ---------- applications ---------- */
.apps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
  border-top: 1px solid rgba(184, 180, 176, 0.1);
}

.app-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 18px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(184, 180, 176, 0.1);
  position: relative;
  transition: padding-left 320ms ease, background 320ms ease;
}

.app-item:hover {
  padding-left: 18px;
  background: rgba(58, 58, 64, 0.18);
}

.app-num {
  grid-row: 1 / span 2;
  font-family: "Fira Code", monospace;
  font-size: 11px;
  color: rgba(184, 180, 176, 0.45);
  letter-spacing: 0.12em;
  align-self: start;
  padding-top: 4px;
}

.app-name {
  font-family: "Caveat", cursive;
  font-size: clamp(22px, 2.6vw, 28px);
  color: var(--white-bright);
  line-height: 1.1;
  letter-spacing: 0.005em;
}

.app-note {
  font-size: 14px;
  color: rgba(184, 180, 176, 0.7);
  line-height: 1.55;
  font-family: "Inter", sans-serif;
}

.app-item[data-color="blue"]::before { content: ""; position: absolute; left: -2px; top: 50%; transform: translateY(-50%) scaleX(0); transform-origin: left; width: 24px; height: 1px; background: var(--triadic-blue); transition: transform 320ms ease; }
.app-item[data-color="orange"]::before { content: ""; position: absolute; left: -2px; top: 50%; transform: translateY(-50%) scaleX(0); transform-origin: left; width: 24px; height: 1px; background: var(--triadic-orange); transition: transform 320ms ease; }
.app-item[data-color="green"]::before { content: ""; position: absolute; left: -2px; top: 50%; transform: translateY(-50%) scaleX(0); transform-origin: left; width: 24px; height: 1px; background: var(--triadic-green); transition: transform 320ms ease; }

.app-item:hover::before {
  transform: translateY(-50%) scaleX(1);
}

/* ---------- closing ---------- */
.entry-closing {
  align-items: center;
  text-align: center;
  gap: 24px;
  padding-top: 60px;
}

.closing-mark svg {
  width: 76px;
  height: 76px;
  animation: closing-rotate 18s linear infinite;
}

@keyframes closing-rotate {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

.closing-handwritten {
  font-family: "Caveat", cursive;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--white-bright);
  line-height: 1.2;
  max-width: 28ch;
}

.closing-fineprint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-family: "Fira Code", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(184, 180, 176, 0.5);
}

.closing-fineprint .dot { color: var(--triadic-orange); }

/* ---------- shared keyframes ---------- */
@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .opening { padding-top: 90px; }
  .opening-title { font-size: clamp(60px, 18vw, 110px); }
  .stream { padding: 60px 20px 100px; gap: 60px; }
  .entry-spec { flex-direction: column; gap: 10px; }
  .app-item { grid-template-columns: 38px 1fr; }
  .nav-trail { margin: 0 14px; }
}
