/* CaelbertChae.com — Homepage responsive layout
   The desktop composition remains the baseline; mobile rules are isolated below. */

:root {
  --bg-a: #fff;
  --bg-b: #fbfbfd;
  --glow: rgba(180, 190, 205, .10);
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft: #86868b;
  --brand-text: #8e8e93;
  --line: rgba(29, 29, 31, .11);
  --panel: rgba(255, 255, 255, .90);
}

html[data-period="morning"] { --bg-a:#fffaf2; --bg-b:#f8f3ea; --glow:rgba(231,184,112,.17); }
html[data-period="day"] { --bg-a:#fff; --bg-b:#fbfbfd; --glow:rgba(180,190,205,.10); }
html[data-period="evening"] { --bg-a:#faedd8; --bg-b:#e9cb94; --glow:rgba(202,139,54,.20); }

html[data-period="night"] {
  color-scheme: dark;
  --bg-a:#000;
  --bg-b:#1c1c1e;
  --glow:rgba(255,255,255,.04);
  --ink:#f5f5f7;
  --muted:#a1a1a6;
  --soft:#86868b;
  --brand-text:#86868b;
  --line:rgba(245,245,247,.14);
  --panel:rgba(28,28,30,.88);
}

* { box-sizing: border-box; }

html,
body {
  min-width: 1200px;
  min-height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 17% 24%, var(--glow), transparent 37%),
    linear-gradient(135deg, var(--bg-a), var(--bg-b));
  transition: background .45s ease, color .45s ease;
}

a,
button,
input { font: inherit; color: inherit; }

a { text-decoration: none; }
button { border: 0; }

.shell {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 48px;
}

.page {
  min-height: 100vh;
}

/* Hero */
.hero {
  max-width: 1152px;
  min-height: calc(100vh - 38px);
  padding-top: 20px;
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.logo-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo {
  width: 224px;
  height: 224px;
  transition: transform .7s ease;
}

.hero-logo:hover { transform: scale(1.04); }

.quote-stage { min-width: 0; }

.quote {
  position: relative;
  padding-inline: 4px;
  font-family: Georgia, "Times New Roman", "Songti SC", "STSong", serif;
}

.quote-mark {
  position: absolute;
  left: -40px;
  top: -54px;
  color: var(--line);
  font-size: 104px;
  line-height: 1;
  user-select: none;
}

.quote p { margin: 0; color: var(--muted); }

.quote .one {
  font-size: 38px;
  line-height: 1.45;
  letter-spacing: .01em;
}

.quote .focus {
  margin: 11px 0 26px;
  color: var(--ink);
  font-size: 52px;
  line-height: 1.2;
  font-style: italic;
}

.quote .close {
  font-size: 30px;
  line-height: 1.75;
}

.quote-zh {
  padding: 38px 42px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 48%, transparent);
}

.quote-zh .one { font-size:18px; letter-spacing:.32em; }
.quote-zh .focus { font-size:48px; letter-spacing:.1em; font-style:normal; }
.quote-zh .close { font-size:27px; line-height:1.9; letter-spacing:.15em; }


/* Screen 2 — Personal coordinate */
.coordinate-screen {
  min-height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.coordinate-inner {
  width: 100%;
  max-width: 1280px;
  padding-top: 74px;
  padding-bottom: 86px;
}

.coordinate-canvas {
  position: relative;
  width: 100%;
  height: 660px;
}

.coordinate-art {
  position: absolute;
  inset: 12px 10px 18px;
  width: calc(100% - 20px);
  height: calc(100% - 30px);
  color: #0354FC;
  overflow: visible;
}

.coordinate-guides path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.coordinate-flow path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flow-soft {
  stroke-width: 1.35;
  opacity: .16;
}

.flow-main {
  stroke-width: 3.2;
  opacity: .98;
}

.flow-accent {
  stroke-width: 1.6;
  opacity: .34;
}

.coordinate-label {
  position: absolute;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .18em;
  font-weight: 600;
}

.coordinate-think {
  top: 66px;
  left: 48.4%;
}

.coordinate-build {
  top: 205px;
  right: 45px;
}

.coordinate-live {
  left: 42px;
  bottom: 132px;
}

.coordinate-caption {
  position: absolute;
  right: 44px;
  bottom: 42px;
  margin: 0;
  color: var(--soft);
  font-family: Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: .01em;
}

.coordinate-screen:hover .flow-main {
  stroke-width: 3.6;
}

.coordinate-screen:hover .coordinate-art {
  transform: translateY(-2px);
}

.coordinate-art,
.flow-main {
  transition: transform .8s ease, stroke-width .8s ease;
}

/* Screen 3 — One thought */
.thought-screen {
  min-height: 92vh;
  display: grid;
  align-items: center;
}

.thought-screen-inner {
  width: 100%;
  max-width: 1152px;
  padding-top: 96px;
  padding-bottom: 112px;
}

.thought {
  max-width: 980px;
}

.thought p {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  font-size: 58px;
  line-height: 1.22;
  letter-spacing: -.025em;
  font-weight: 400;
}

.thought time {
  display: block;
  margin-top: 34px;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .045em;
}

.thought-zh p {
  font-size: 54px;
  line-height: 1.42;
  letter-spacing: .025em;
}



[hidden] { display: none !important; }

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

/* Handheld and compact tablet layout */
@media (max-width: 900px) {
  html,
  body {
    min-width: 0;
    overflow-x: clip;
  }

  .shell {
    max-width: none;
    padding-inline: clamp(20px, 6vw, 32px);
  }

  .hero {
    min-height: calc(100svh - 52px - env(safe-area-inset-top));
    padding-top: clamp(34px, 7vh, 64px);
    padding-bottom: clamp(52px, 9vh, 84px);
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    align-items: center;
    gap: clamp(34px, 7vh, 58px);
  }

  .hero-logo {
    width: clamp(112px, 31vw, 148px);
    height: clamp(112px, 31vw, 148px);
  }

  .hero-logo:hover { transform: none; }

  .quote-stage {
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
  }

  .quote {
    padding-inline: 0;
  }

  .quote-mark {
    left: -13px;
    top: -37px;
    font-size: 72px;
  }

  .quote .one {
    font-size: clamp(21px, 6vw, 29px);
    line-height: 1.38;
  }

  .quote .focus {
    margin: 8px 0 18px;
    font-size: clamp(34px, 9.5vw, 44px);
    line-height: 1.14;
  }

  .quote .close {
    font-size: clamp(18px, 5vw, 23px);
    line-height: 1.62;
  }

  .quote-zh {
    padding: clamp(24px, 7vw, 34px) clamp(20px, 6vw, 30px);
  }

  .quote-zh .one {
    font-size: 15px;
    line-height: 1.7;
    letter-spacing: .2em;
  }

  .quote-zh .focus {
    margin-block: 14px 18px;
    font-size: clamp(31px, 9vw, 40px);
    line-height: 1.3;
    letter-spacing: .07em;
  }

  .quote-zh .close {
    font-size: clamp(19px, 5.5vw, 24px);
    line-height: 1.75;
    letter-spacing: .1em;
  }

  .coordinate-screen {
    min-height: 100svh;
  }

  .coordinate-inner {
    padding-top: clamp(68px, 10vh, 96px);
    padding-bottom: clamp(72px, 11vh, 104px);
  }

  .coordinate-canvas {
    height: clamp(440px, 66vh, 560px);
  }

  .coordinate-art {
    inset: 28px auto auto 50%;
    width: clamp(680px, 185vw, 820px);
    height: auto;
    aspect-ratio: 1120 / 620;
    transform: translateX(-50%);
  }

  .coordinate-screen:hover .coordinate-art {
    transform: translateX(-50%);
  }

  .coordinate-screen:hover .flow-main {
    stroke-width: 3.2;
  }

  .coordinate-label {
    font-size: 10px;
  }

  .coordinate-think {
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
  }

  .coordinate-build {
    top: 45%;
    right: 4px;
  }

  .coordinate-live {
    left: 4px;
    bottom: 24%;
  }

  .coordinate-caption {
    right: 4px;
    bottom: 18px;
    max-width: 230px;
    font-size: 14px;
    text-align: right;
  }

  .thought-screen {
    min-height: 86svh;
  }

  .thought-screen-inner {
    padding-top: clamp(80px, 13vh, 120px);
    padding-bottom: clamp(96px, 15vh, 140px);
  }

  .thought p,
  .thought-zh p {
    font-size: clamp(34px, 9.5vw, 48px);
    line-height: 1.27;
    letter-spacing: -.025em;
  }

  .thought-zh p {
    line-height: 1.5;
    letter-spacing: .02em;
  }

  .thought time {
    margin-top: 26px;
  }
}

@media (max-width: 370px) {

  .quote-mark { left: -8px; }
}

@media (max-width: 900px) and (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: 48px;
    padding-bottom: 64px;
    grid-template-columns: .7fr 1.3fr;
    gap: 36px;
  }

  .hero-logo {
    width: 108px;
    height: 108px;
  }

  .quote .one { font-size: 20px; }
  .quote .focus { font-size: 32px; }
  .quote .close { font-size: 18px; line-height: 1.5; }

  .coordinate-screen,
  .thought-screen {
    min-height: 620px;
  }
}
