/* ==========================================================================
   Honu Lab — main.css
   Redesign 2026. Zero JavaScript. Shared by / , /zh/ , and /404.html
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  --deep: #033043;      /* 主色：nav/hero/footer 底 */
  --teal: #0a7273;      /* 次要 */
  --amber: #ffb901;     /* CTA 專用 */
  --aqua: #88d1d8;      /* 深底上的連結/eyebrow/強調 */
  --cream: #e9e3d5;     /* 區塊交替底 */
  --light: #f4f3f3;
  --ink: #16232b;       /* 淺底內文 */
  --ink-soft: #4a5a63;
  --radius-card: 12px;
  --radius-btn: 8px;
  --shadow-card: 0 4px 12px rgba(0,0,0,0.1);
  --font-en: "Inter", -apple-system, sans-serif;
  --font-zh: "M PLUS 1", "Inter", -apple-system, "PingFang TC", sans-serif;

  /* signature hexagon shape (point-up), shared by avatar / badges */
  --hex-shape: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* --------------------------------------------------------------------------
   0. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body, h1, h2, h3, p, ul, li, figure {
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  color: var(--ink);
  background: var(--light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body {
  font-family: var(--font-en);
}

html[lang="zh-Hant"] body {
  font-family: var(--font-zh);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2 {
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* semantic line breaks: phrases wrap as units at punctuation, not mid-word */
.phrase {
  display: inline-block;
}

/* narrow screens: size ZH hero so each phrase fits on one line */
@media (max-width: 480px) {
  html[lang="zh-Hant"] h1 {
    font-size: 1.65rem;
  }
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3 {
  font-weight: 800;
}

html[lang="zh-Hant"] h1,
html[lang="zh-Hant"] h2,
html[lang="zh-Hant"] h3 {
  font-weight: 700;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.1rem;
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 12px;
}

.eyebrow--dark {
  color: var(--aqua);
}

/* --------------------------------------------------------------------------
   Section rhythm
   -------------------------------------------------------------------------- */
.section {
  padding: 88px 0;
}

.section--cream {
  background: var(--cream);
}

.section--white {
  background: #fff;
}

.section-intro {
  color: var(--ink-soft);
  max-width: 640px;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .section {
    padding: 56px 0;
  }
}

/* --------------------------------------------------------------------------
   Hexagon texture (hero + footer background)
   -------------------------------------------------------------------------- */
.hex-bg {
  position: relative;
  overflow: hidden;
  background: var(--deep);
}

.hex-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='rgba(136,209,216,0.06)' stroke-width='1'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='rgba(136,209,216,0.06)' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 56px 100px;
  pointer-events: none;
  z-index: 0;
}

.hex-bg > .container {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius-btn);
  padding: 14px 28px;
  border: none;
  cursor: pointer;
}

html[lang="en"] .btn {
  text-transform: uppercase;
}

html[lang="zh-Hant"] .btn {
  text-transform: none;
}

.btn-primary {
  background: var(--amber);
  color: var(--deep);
}

.btn-primary:hover {
  filter: brightness(0.92);
}

/* secondary action on dark sections: text link, never an outlined button */
.link-aqua {
  color: var(--aqua);
}

.link-aqua:hover {
  text-decoration: underline;
}

/* secondary action / inline link on light sections */
.link-teal {
  color: var(--teal);
  font-weight: 600;
}

.link-teal:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
  transform: translateY(-2px);
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }

  .card:hover {
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deep);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #fff;
}

.brand img {
  height: 34px;
  width: auto;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}

.nav-links a {
  color: var(--aqua);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a:hover {
  text-decoration: underline;
}

.lang-switch {
  border-left: 1px solid rgba(255,255,255,0.25);
  padding-left: 22px;
}

@media (max-width: 480px) {
  .nav-links {
    gap: 8px 14px;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .lang-switch {
    padding-left: 14px;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding: 120px 0 88px;
}

.hero h1 {
  color: #fff;
}

.hero-sub {
  color: rgba(255,255,255,0.9);
  max-width: 640px;
  margin-top: 20px;
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 32px;
}

.proof-line {
  color: rgba(136,209,216,0.8);
  font-size: 0.9rem;
  margin-top: 28px;
}

@media (max-width: 640px) {
  .hero {
    padding: 88px 0 56px;
  }
}

/* --------------------------------------------------------------------------
   Hexagon badges (product cards) — 10px, brand color per product
   -------------------------------------------------------------------------- */
.hex-badge {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--badge-color, var(--teal));
  clip-path: var(--hex-shape);
}

.quote-card p {
  font-size: 0.98rem;
  line-height: 1.65;
}

.quote-card p + p:not(.quote-attr),
.case-quote p + p:not(.quote-attr) {
  margin-top: 12px;
}

.case-quote p {
  font-size: 0.98rem;
  line-height: 1.65;
}

/* client work: masonry columns so tall and short cards interleave naturally */
.case-masonry {
  columns: 2;
  column-gap: 24px;
  margin-top: 40px;
}

.case-card {
  break-inside: avoid;
  margin-bottom: 24px;
}

/* the flagship engagement spans both columns above the supporting cases */
.case-card--featured {
  column-span: all;
}

.case-card h3 .tag {
  vertical-align: middle;
}

.case-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-top: 8px;
}

.case-quote {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--light);
}

@media (max-width: 800px) {
  .case-masonry {
    columns: 1;
  }
}

.case-quote p:first-child::before,
.quote-card p:first-child::before {
  content: "\201C";
  color: var(--amber);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 0;
  margin-right: 4px;
  vertical-align: -0.35em;
}

.quote-attr {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.quote-attr strong {
  color: var(--ink);
}

.product-thumb {
  height: 170px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--light);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* portrait app screenshots: show the top of the screen */
.product-thumb--top img {
  object-position: top;
}

/* transparent illustrations: contain on merit's cream */
.product-thumb--contain {
  background: #f7f1e3;
}

.product-thumb--contain img {
  object-fit: contain;
  padding: 12px;
}

.product-name {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

html[lang="zh-Hant"] .product-name {
  font-weight: 700;
}

.tag {
  margin-left: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: var(--light);
  padding: 3px 9px;
  border-radius: 999px;
}

.product-desc {
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.card-link {
  color: var(--teal);
  font-weight: 700;
  display: inline-block;
}

.card-link + .card-link {
  margin-left: 16px;
}

.card-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Minimalist link cards (zh only)
   -------------------------------------------------------------------------- */
.link-card {
  display: block;
}

.link-card h3 {
  color: var(--ink);
  margin-bottom: 10px;
}

.link-card p {
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: center;
}

.avatar-hex {
  position: relative;
  width: 260px;
  height: 260px;
}

.avatar-hex::before {
  content: "";
  position: absolute;
  inset: -6px;
  background: var(--amber);
  clip-path: var(--hex-shape);
  z-index: 0;
}

.avatar-hex img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: var(--hex-shape);
}

.about-copy p {
  margin-top: 16px;
  color: var(--ink-soft);
}

.about-copy p:first-of-type {
  margin-top: 20px;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 24px;
}

@media (max-width: 700px) {
  .about-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 32px;
  }

  .link-row {
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Contact + footer
   -------------------------------------------------------------------------- */
.contact-cta {
  padding-top: 88px;
  padding-bottom: 56px;
  text-align: center;
}

.contact-cta h2 {
  color: #fff;
}

.contact-alt {
  margin-top: 18px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
}

.contact-cta p {
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  margin: 20px auto 32px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(136,209,216,0.75);
  font-size: 0.9rem;
}

.footer-left img {
  width: 24px;
  height: 24px;
}

.footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-right a {
  color: var(--aqua);
  font-size: 0.9rem;
}

.footer-right a:hover {
  text-decoration: underline;
}

.footer-copy {
  padding-bottom: 32px;
}

.footer-copy p {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .contact-cta {
    padding-top: 56px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   Prose (Sheet Mover content pages: FAQ, Privacy, Terms, Contact, Overview)
   -------------------------------------------------------------------------- */
.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-top: 12px;
  margin-bottom: 28px;
}

.prose h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal);
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose p {
  color: var(--ink-soft);
  margin-top: 16px;
}

.prose p:first-of-type {
  margin-top: 0;
}

.prose ul {
  margin-top: 16px;
  padding-left: 1.4em;
}

.prose ul li {
  list-style: disc;
  color: var(--ink-soft);
  margin-top: 8px;
}

.prose a {
  color: var(--teal);
  font-weight: 600;
}

.prose a:hover {
  text-decoration: underline;
}

.prose img {
  border-radius: var(--radius-card);
  margin: 8px 0 28px;
}

.prose-link-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 0;
}

.prose-link-list li {
  list-style: none;
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Simplified footer (Sheet Mover subpages)
   -------------------------------------------------------------------------- */
.footer-simple {
  padding: 40px 0;
  text-align: center;
}

.footer-simple p {
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
}

.footer-simple a {
  color: var(--aqua);
}

.footer-simple a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--deep);
}

.not-found .container {
  padding-top: 88px;
  padding-bottom: 88px;
}

.not-found h1 {
  color: var(--amber);
  font-size: clamp(4rem, 16vw, 8rem);
  font-weight: 800;
}

.not-found p {
  color: rgba(255,255,255,0.85);
  margin-top: 20px;
  font-size: 1.05rem;
}

.not-found-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin-top: 36px;
}

.not-found-links a {
  color: var(--aqua);
  font-weight: 600;
}

.not-found-links a:hover {
  text-decoration: underline;
}
