/* ============================================================
   Chikin Tech — editorial tech portfolio
   chikin-tech.com
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500;1,6..72,600&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --paper: #F7F3EC;
  --paper-2: #FCFAF4;
  --paper-3: #F1ECE2;
  --ink: #1E1B16;
  --ink-soft: #4C463B;
  --ink-mute: #8B8273;
  --ink-faint: #A9A091;
  --line: rgba(30, 27, 22, .11);
  --line-2: rgba(30, 27, 22, .07);
  --teal: #0E8E99;
  --teal-bright: #14B0BB;
  --teal-deep: #0A6E78;
  --teal-wash: rgba(20, 176, 187, .10);

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 64px);
  --sp-section: clamp(5.5rem, 11vw, 10rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--teal-wash); color: var(--teal-deep); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }

/* ---------- type primitives ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: .6em;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-bright);
  display: inline-block;
  flex-shrink: 0;
}
.serif { font-family: var(--serif); }
.it { font-style: italic; }

/* ============================================================
   HEADER
   ============================================================ */
.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gut);
  transition: background .4s ease, border-color .4s ease, padding .4s ease;
  border-bottom: 1px solid transparent;
}
.site-head.scrolled {
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.1) blur(14px);
  -webkit-backdrop-filter: saturate(1.1) blur(14px);
  border-bottom-color: var(--line-2);
  padding-top: 13px;
  padding-bottom: 13px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 30px; height: auto; filter: drop-shadow(0 1px 1px rgba(0,0,0,.05)); }
.brand .name { font-family: var(--serif); font-size: 1.32rem; font-weight: 500; letter-spacing: -.01em; }

/* nav */
.nav {
  display: flex;
  gap: clamp(13px, 1.9vw, 30px);
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav::-webkit-scrollbar { display: none; }
.navlink {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  position: relative;
  padding: 7px 0;
  transition: color .25s;
  white-space: nowrap;
}
.navlink:hover { color: var(--ink); }
.navlink.active { color: var(--ink); }
.navlink.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1.5px;
  background: var(--teal-bright);
}

@media (max-width: 680px) {
  .site-head { padding-left: 16px; padding-right: 16px; gap: 14px; }
  .navlink { font-size: .6rem; letter-spacing: .08em; }
  .brand .name { font-size: 1.08rem; }
  .brand img { width: 25px; }
}
@media (max-width: 380px) { .brand .name { display: none; } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 88svh;
  display: flex;
  align-items: center;
  padding: 118px 0 clamp(48px, 8vh, 86px);
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
  width: 100%;
}
.hero-text { min-width: 0; }
.hero .eyebrow { margin-bottom: 26px; }
.hero-tag {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 4.7vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: -.022em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.hero-tag .b { color: var(--teal-deep); }
.hero-tag .c { font-style: italic; }
.hero .lede {
  max-width: 40ch;
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 34px;
  text-wrap: pretty;
}
.hero-jump { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-jump a {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1.5px solid var(--teal-bright);
  padding-bottom: 5px;
  transition: color .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-jump a .ar { transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.hero-jump a:hover { color: var(--teal-deep); }
.hero-jump a:hover .ar { transform: translateX(4px); }

.hero-photo { margin: 0; position: relative; }
.hero-photo img {
  width: 100%;
  max-height: 76vh;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(30,27,22,.05), 0 34px 64px -30px rgba(30,27,22,.45);
}
.hero-photo figcaption {
  position: absolute;
  left: 14px;
  bottom: 13px;
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(255,255,255,.95);
  background: rgba(20,18,15,.38);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 5px 10px;
  border-radius: 100px;
}
@media (max-width: 820px) {
  .hero { min-height: 0; padding-top: 120px; padding-bottom: 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .hero-photo img { max-height: 54vh; }
}

/* ============================================================
   SECTION FRAME
   ============================================================ */
section { position: relative; }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head .frame {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.3;
  color: var(--ink);
  max-width: 24ch;
  letter-spacing: -.01em;
  margin: .7rem 0 0;
  text-wrap: balance;
}

/* ============================================================
   LAB
   ============================================================ */
.lab { padding-block: var(--sp-section); }
.lab-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}
.lab-head .count {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--ink-faint);
  text-transform: uppercase;
}

.product { padding-block: clamp(3.5rem, 7vw, 6.5rem); border-top: 1px solid var(--line); }
.product:first-of-type { border-top: 1px solid var(--ink); }
.product-grid {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.product.flip .product-grid { direction: rtl; }
.product.flip .product-copy, .product.flip .showcase { direction: ltr; }

/* copy column */
.product-meta { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.product-num { font-family: var(--mono); font-size: .8rem; color: var(--teal); font-weight: 600; letter-spacing: .05em; }
.product-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 2.95rem);
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0;
}
.product-name .jp { font-weight: 400; }
.product-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.url { font-family: var(--mono); font-size: .76rem; color: var(--ink-mute); letter-spacing: .02em; word-break: break-all; }
a.url { transition: color .2s; }
a.url:hover { color: var(--teal-deep); }
a.url .ext { margin-left: 4px; opacity: .5; transition: opacity .2s, transform .2s; display: inline-block; }
a.url:hover .ext { opacity: 1; transform: translate(1px, -1px); }
.badge {
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 100px;
  white-space: nowrap;
}
.badge.live { background: var(--teal-wash); color: var(--teal-deep); }
.badge.live::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal-bright);
  margin-right: 6px;
  vertical-align: 1px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.badge.dev { background: rgba(30,27,22,.06); color: var(--ink-mute); }
.badge.prod { background: rgba(30,27,22,.86); color: var(--paper); }
.badge.oss { background: transparent; color: var(--ink-mute); border: 1px solid var(--line); }

.hook {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.7vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 22px;
  text-wrap: pretty;
}
.hook .em { font-style: italic; color: var(--teal-deep); }
.desc { font-size: 1.0625rem; line-height: 1.62; color: var(--ink-soft); margin: 0; max-width: 46ch; text-wrap: pretty; }
.proof { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 30px; }
.proof .stat { display: flex; flex-direction: column; gap: 2px; }
.proof .n { font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--ink); font-weight: 500; }
.proof .l { font-family: var(--mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }

/* showcase / device frames */
.showcase { position: relative; }
.stage {
  position: relative;
  border-radius: 18px;
  padding: clamp(20px, 3vw, 42px);
  background: radial-gradient(120% 130% at 50% 0%, var(--paper-2), var(--paper-3));
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}
.shot {
  border-radius: 9px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(30,27,22,.04), 0 22px 50px -22px rgba(30,27,22,.30);
  overflow: hidden;
  background: var(--paper-2);
}
.shot.browser { position: relative; padding-top: 30px; }
.shot.browser::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: var(--paper-3);
  border-bottom: 1px solid var(--line-2);
}
.shot.browser::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #D8CFC0;
  box-shadow: 14px 0 0 #D8CFC0, 28px 0 0 #D8CFC0;
}

/* phone overlay */
.phone {
  position: absolute;
  width: clamp(108px, 17%, 170px);
  border-radius: 20px;
  border: 5px solid #16130F;
  background: #16130F;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(30,27,22,.5);
  right: -2%;
  bottom: -7%;
}
.phone img { border-radius: 14px; }
.product.flip .phone { right: auto; left: -2%; }

/* dual desktop stack (olive oil / hono) */
.stack { display: grid; gap: 18px; width: 100%; }
.stack-2 { grid-template-columns: 1.35fr .9fr; align-items: start; }
.stack .shot { width: 100%; }

/* ============================================================
   COLLECTIBLES
   ============================================================ */
.collect {
  padding-block: var(--sp-section);
  background: var(--ink);
  color: var(--paper);
  position: relative;
}
.collect .eyebrow { color: rgba(247,243,236,.55); }
.collect .eyebrow .dot { background: var(--teal-bright); }
.collect-intro { max-width: 34ch; }
.collect-intro .big {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.25;
  font-weight: 400;
  margin: .8rem 0 0;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.collect-intro .big .it { color: var(--teal-bright); }
.collect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2vw, 24px);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.plate {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0E0C0A;
  aspect-ratio: 4/3;
}
.plate.wide { grid-column: 1 / -1; aspect-ratio: 16/9; }
.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1);
}
.plate:hover img { transform: scale(1.045); }
.plate .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  background: linear-gradient(transparent, rgba(8,7,6,.78));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.plate .cap .t { font-family: var(--serif); font-style: italic; font-size: 1.18rem; color: var(--paper); }
.plate .cap .m {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(247,243,236,.6);
  text-align: right;
  white-space: nowrap;
}
.collect-foot {
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.collect-foot .eth { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; color: rgba(247,243,236,.5); }
.collect-foot .eth b { color: var(--teal-bright); font-weight: 600; }
@media (max-width: 760px) {
  .collect-grid { grid-template-columns: 1fr; }
  .plate.wide { aspect-ratio: 4/3; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { padding-block: clamp(3.6rem, 7vw, 6rem); }
.about-grid {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.about p {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  line-height: 1.4;
  font-weight: 400;
  margin: 0;
  color: var(--ink);
  letter-spacing: -.01em;
  text-wrap: pretty;
}
.about p .em { font-style: italic; color: var(--teal-deep); }
.about-side { display: flex; flex-direction: column; gap: 20px; }
.about-side .row { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line); padding-top: 14px; }
.about-side .k { font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.about-side .v { font-size: 1rem; color: var(--ink-soft); }
.about-side .v b { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { padding-block: clamp(3.4rem, 6vw, 5.5rem); border-top: 1px solid var(--line); }
.contact-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.email {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 6.5vw, 4.2rem);
  letter-spacing: -.025em;
  color: var(--ink);
  line-height: 1;
  border-bottom: 2px solid transparent;
  transition: border-color .25s, color .25s;
}
.email:hover { color: var(--teal-deep); border-bottom-color: var(--teal-bright); }
.contact-note { font-size: 1rem; color: var(--ink-mute); margin: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
footer.foot {
  padding: 34px var(--gut);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
footer.foot .b { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 1.05rem; }
footer.foot img { width: 22px; }
footer.foot .c { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--ink-faint); text-transform: uppercase; }

section[id] { scroll-margin-top: 74px; }

/* ============================================================
   MOTION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s cubic-bezier(.16, 1, .3, 1), transform 1s cubic-bezier(.16, 1, .3, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  body { font-size: 17px; }
  .product-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .product.flip .product-grid { direction: ltr; }
  .lab-head { align-items: flex-start; }
  .about-grid { grid-template-columns: 1fr; }
  .stack-2 { grid-template-columns: 1fr; gap: 12px; }

  /* Phone overlay: use vw so size is relative to screen, not to the now-full-width stage */
  .phone {
    width: clamp(90px, 22vw, 130px);
    bottom: -12px;
    right: 14px;
  }
  .product.flip .phone { right: auto; left: 14px; }

  /* Give showcase extra bottom room so the overhanging phone doesn't clip into the next section */
  .showcase { padding-bottom: 28px; }

  /* Stage: reduce min-height now that layout is stacked */
  .stage { min-height: 180px; }
}

/* Small phones: hide phone overlay entirely — screenshot alone is enough context */
@media (max-width: 560px) {
  .phone { display: none; }
  .showcase { padding-bottom: 0; }
  .stage { padding: 14px; min-height: 0; }
  .shot.browser { padding-top: 22px; }
  .shot.browser::before { height: 22px; }
  .shot.browser::after { top: 8px; }
  .proof { gap: 16px; }
  .proof .n { font-size: 1.25rem; }
  .hero-photo img { max-height: 50vh; }
}
