@layer reset, base, layout, parts, responsive, motion;

@font-face { font-family: "LH Title"; src: url(/fonts/title.woff2?h=0f9f593d) format("woff2"); font-display: swap; }

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ol, ul, dl, dd, figure, table { margin: 0; }
  ol, ul { padding: 0; list-style: none; }
  img, picture { display: block; max-width: 100%; }
  img { height: auto; }
  button { font: inherit; color: inherit; cursor: pointer; }
  [hidden] { display: none !important; }
}

@layer base {
  :root {
    --ink: #0d2b3e;
    --ink-2: #4a6678;
    --deep: #0b5c86;
    --aqua: #3ec6dc;
    --tile: #f4fbfd;
    --grout: #d3ebf2;
    --buoy: #e8413c;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
    --title: "LH Title", "PingFang SC", "Microsoft YaHei", sans-serif;
    scroll-padding-top: 72px;
  }
  body { font: 16px/1.75 var(--sans); color: var(--ink); background: var(--tile); -webkit-font-smoothing: antialiased; text-wrap: pretty; }
  h1, h2, h3 { line-height: 1.2; text-wrap: balance; }
  .t { font-family: var(--title); font-weight: 400; letter-spacing: .03em; }
  a { color: inherit; }
  :focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; border-radius: 4px; }
  .skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; background: var(--buoy); color: #fff; border-radius: 6px; }
  .skip:focus { left: 12px; }
}

@layer layout {
  .wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
  main > section { padding-block: clamp(64px, 8vw, 110px); }
  main > .hero { padding: 0; }
  h2.t { font-size: clamp(36px, 4.6vw, 54px); color: var(--deep); }
  .sub { margin-top: 10px; color: var(--ink-2); }
  /* 泳池墙面: 白瓷砖 + 浅蓝灰缝 */
  .hero, .setup { background-color: var(--tile);
    background-image: linear-gradient(var(--grout) 2px, transparent 2px), linear-gradient(90deg, var(--grout) 2px, transparent 2px);
    background-size: 44px 44px; }
  /* 泳道浮绳: 红白两段交替, 两头蓝 */
  .rope { height: 14px; background: repeating-linear-gradient(90deg, var(--buoy) 0 26px, #fff 26px 52px); border-block: 3px solid var(--deep);
    box-shadow: 0 2px 0 rgb(13 43 62 / .12); }
}

@layer parts {
  .bar { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; gap: 26px; height: 60px; padding-inline: max(24px, (100% - 1120px) / 2);
    background: rgb(244 251 253 / .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--grout); }
  .brand { font-size: 24px; color: var(--deep); text-decoration: none; }
  .bar nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
  .bar nav a { text-decoration: none; color: var(--ink-2); }
  .bar nav a:hover { color: var(--deep); }
  .pill { border: 0; border-radius: 999px; padding: 7px 16px; font-size: 14px; font-weight: 700; background: var(--buoy); color: #fff; }

  /* 首屏 */
  .hero { position: relative; overflow: hidden; padding: 120px 0 0; }
  .hero-in { width: min(1120px, 100% - 48px); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center;
    position: relative; z-index: 1; padding-bottom: 130px; }
  .tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--deep); color: #fff; font-size: 14px; }
  .hero h1 { font-size: clamp(52px, 7.2vw, 100px); white-space: nowrap; color: var(--deep); line-height: 1; margin: 18px 0 6px; text-shadow: 4px 4px 0 var(--aqua); }
  .en { color: var(--ink-2); letter-spacing: .06em; }
  .lead { margin-top: 20px; font-size: 18px; max-width: 25em; }
  .cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
  .dl-btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 14px 34px; font-size: 17px; font-weight: 700;
    letter-spacing: .06em; background: var(--buoy); color: #fff; text-decoration: none; box-shadow: 0 6px 0 #b52f2b; translate: 0 -3px; }
  .dl-btn:hover { background: #f0524d; }
  .dl-btn:active { translate: 0 0; box-shadow: 0 3px 0 #b52f2b; }
  .ghost { display: inline-flex; align-items: center; border: 2px solid var(--deep); border-radius: 999px; padding: 11px 22px; font-size: 15px; font-weight: 600;
    color: var(--deep); text-decoration: none; background: #fff; }
  .ghost:hover { background: var(--tile); }
  .wall { position: relative; display: grid; justify-items: center; gap: 0; }
  .poster { width: min(460px, 100%); padding: 10px; background: #fff; border-radius: 6px; box-shadow: 0 18px 40px rgb(13 43 62 / .18); rotate: 2deg; }
  .poster img { border-radius: 3px; width: 100%; }
  .buoy { position: absolute; top: -34px; right: max(0px, calc(50% - 270px)); width: 96px; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, transparent 34%, #fff 35%, #fff 36%, transparent 37%),
                conic-gradient(var(--buoy) 0 45deg, #fff 45deg 90deg, var(--buoy) 90deg 135deg, #fff 135deg 180deg, var(--buoy) 180deg 225deg, #fff 225deg 270deg, var(--buoy) 270deg 315deg, #fff 315deg);
    -webkit-mask: radial-gradient(circle, transparent 33%, #000 34%); mask: radial-gradient(circle, transparent 33%, #000 34%);
    filter: drop-shadow(0 6px 10px rgb(13 43 62 / .25)); }
  .rules { width: min(380px, 92%); margin-top: -18px; rotate: -1.5deg; padding: 16px 20px 14px; background: var(--deep); color: #eaf7fb; border-radius: 10px;
    border: 3px solid #fff; box-shadow: 0 14px 30px rgb(13 43 62 / .25); }
  .rules-h { font-weight: 800; letter-spacing: .3em; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px dashed rgb(255 255 255 / .4); }
  .rules dl div { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 5px 0; font-size: 15px; }
  .rules dt { color: rgb(234 247 251 / .7); }
  .rules dd { font-weight: 700; }
  .water { position: absolute; inset: auto 0 0 0; height: 110px; z-index: 0;
    background: linear-gradient(180deg, rgb(62 198 220 / .0), rgb(62 198 220 / .55) 30%, var(--aqua) 60%, #29a9c3);
    -webkit-mask: radial-gradient(60px 18px at 50% 0, transparent 98%, #000) 0 0 / 120px 100% repeat-x;
            mask: radial-gradient(60px 18px at 50% 0, transparent 98%, #000) 0 0 / 120px 100% repeat-x; }

  /* 故事 */
  .story-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 22px; font-size: 17px; }
  .credit { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 30px; font-size: 14px; color: var(--ink-2); }
  .credit div { display: flex; gap: 10px; }
  .credit dd { color: var(--ink); font-weight: 600; }

  /* 经营: 一条条泳道 */
  .pool { background: linear-gradient(180deg, #2bb2cb, var(--deep)); color: #eaf7fb; }
  .pool h2.t { color: #fff; }
  .pool .sub { color: rgb(234 247 251 / .8); }
  .lanes { display: grid; gap: 16px; margin-top: 34px; }
  .lane { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: center; padding: 22px 24px; border-radius: 14px;
    background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .22); }
  .lane:not(:has(.lane-pic)) { grid-template-columns: 56px minmax(0, 1fr); }
  .lane-no { width: 48px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--deep); font: 800 22px/1 var(--sans); }
  .lane h3 { font-size: 21px; margin-bottom: 6px; color: #fff; }
  .lane p { color: rgb(234 247 251 / .88); }
  .lane-pic { border-radius: 10px; overflow: hidden; box-shadow: 0 12px 28px rgb(0 0 0 / .25); }

  /* 人物 */
  .people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
  .people li { padding: 20px; border-radius: 14px; background: #fff; border: 2px solid var(--grout); border-top: 6px solid var(--aqua); }
  .people li:first-child { border-top-color: var(--buoy); }
  .people h3 { font-size: 26px; color: var(--deep); margin-bottom: 6px; }
  .people p { color: var(--ink-2); font-size: 15px; }
  .note { margin-top: 16px; color: var(--ink-2); }

  /* 画面 */
  .shots { background: #e6f5f9; }
  .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 28px; }
  .shot { display: block; width: 100%; border: 0; padding: 0; background: none; text-align: left; }
  .shot picture { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #cfe9f1; box-shadow: 0 10px 26px rgb(13 43 62 / .14); }
  .shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
  .shot:hover img { transform: scale(1.03); }
  .cap { display: block; margin-top: 10px; font-size: 14px; color: var(--ink-2); }

  /* 配置 */
  .spec { width: 100%; margin-top: 24px; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; border: 2px solid var(--grout); font-size: 15px; }
  .spec th, .spec td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--grout); }
  .spec thead th { background: var(--deep); color: #fff; font-size: 14px; letter-spacing: .2em; }
  .spec tbody th { width: 110px; color: var(--ink-2); font-weight: 500; }
  .spec tbody tr:last-child > * { border-bottom: 0; }

  /* 安装 */
  .setup-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: start; }
  .steps { counter-reset: s; display: grid; gap: 14px; margin-top: 24px; }
  .steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 10px; }
  .steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--buoy); color: #fff; }
  .file { padding: 24px; border-radius: 14px; background: #fff; border: 2px solid var(--grout); box-shadow: 0 14px 30px rgb(13 43 62 / .1); }
  .file h3 { font-size: 19px; margin-bottom: 8px; }
  .file dl div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--grout); font-size: 14px; }
  .file dt { color: var(--ink-2); }
  .file dd { font-weight: 600; overflow-wrap: anywhere; }
  .file code { font: 500 13px/1.6 ui-monospace, Menlo, Consolas, monospace; }
  .file-act { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
  .fine { margin-top: 12px; font-size: 13px; color: var(--ink-2); }

  /* 问答 */
  .qa { display: grid; margin-top: 22px; max-width: 820px; border-top: 2px solid var(--grout); }
  .qa details { border-bottom: 2px solid var(--grout); }
  .qa summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; position: relative; font-weight: 700; }
  .qa summary::-webkit-details-marker { display: none; }
  .qa summary::after { content: "+"; position: absolute; right: 6px; top: 50%; translate: 0 -50%; font-size: 24px; color: var(--buoy); transition: rotate .25s; }
  .qa details[open] summary::after { rotate: 45deg; }
  .qa p { padding: 0 0 18px; color: var(--ink-2); }

  /* 页脚 */
  .foot { background: var(--deep); color: rgb(234 247 251 / .8); font-size: 14px; }
  .foot .wrap { padding: 44px 0 64px; }
  .foot-title { font-size: 30px; color: #fff; margin-bottom: 8px; }
  .links { display: flex; gap: 20px; margin-top: 8px; }

  /* 弹窗 */
  dialog { border: 0; padding: 0; }
  dialog::backdrop { background: rgb(11 92 134 / .55); backdrop-filter: blur(4px); }
  .x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgb(13 43 62 / .07); font-size: 22px; line-height: 1; }
  .dlg { width: min(440px, 100% - 32px); padding: 30px 28px 28px; border-radius: 18px; background: #fff; color: var(--ink); text-align: center; border-top: 8px solid var(--buoy); }
  .dlg h2 { font-size: 34px; color: var(--deep); }
  .dlg-file { margin: 6px 0 18px; color: var(--ink-2); font-size: 14px; }
  #ts-box { min-height: 70px; display: grid; place-items: center; }
  #dl-status { margin-top: 14px; font-size: 15px; }
  #dl-link { margin-top: 16px; }
  .lb { width: min(1280px, 100% - 24px); max-height: calc(100svh - 24px); padding: 0; background: transparent; overflow: visible; color: #fff; }
  .lb picture img { width: 100%; height: auto; max-height: calc(100svh - 120px); object-fit: contain; border-radius: 10px; background: #000; }
  #lb-cap { margin-top: 12px; text-align: center; }
  .lb-nav { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 10px; color: rgb(255 255 255 / .8); }
  .lb-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .3); background: rgb(255 255 255 / .12); color: #fff; font-size: 22px; }
  .lb .x { top: -46px; right: 0; background: rgb(255 255 255 / .15); color: #fff; }

  /* 隐私 / 条款 / 404 */
  .doc { max-width: 720px; padding-block: 96px 80px; }
  .doc h1 { font-size: clamp(36px, 6vw, 52px); color: var(--deep); margin: 18px 0 26px; }
  .doc h2 { font-size: 20px; margin: 30px 0 8px; }
  .doc p { margin-top: 10px; color: var(--ink-2); }
  .doc .dl-btn { margin-top: 18px; }
  .doc .date { margin-top: 36px; font-size: 14px; }
  .back { color: var(--ink-2); text-decoration: none; }
}

@layer responsive {
  @media (max-width: 1000px) {
    .bar nav { display: none; }
    .bar .pill { margin-left: auto; }
    .hero-in { grid-template-columns: 1fr; }
    .people { grid-template-columns: 1fr 1fr; }
  }
  @media (max-width: 760px) {
    .story-cols, .setup-grid, .grid { grid-template-columns: 1fr; }
    .lane, .lane:not(:has(.lane-pic)) { grid-template-columns: 1fr; gap: 14px; }
    .lane-no { width: 40px; }
    .spec { font-size: 14px; }
    .spec th, .spec td { padding: 11px 10px; }
    .spec tbody th { width: 64px; }
  }
  @media (max-width: 520px) {
    .wrap, .hero-in { width: calc(100% - 36px); }
    .hero { padding-top: 92px; }
    .hero-in { padding-bottom: 110px; gap: 36px; }
    .lead { font-size: 16px; }
    .dl-btn { flex: 1; }
    .buoy { width: 70px; top: -24px; right: 4px; }
    .people { grid-template-columns: 1fr; }
  }
}

@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    .water { animation: sway 6s ease-in-out infinite alternate; }
    @keyframes sway { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: 120px 0; mask-position: 120px 0; } }
    .buoy { animation: bob 3.6s ease-in-out infinite alternate; }
    @keyframes bob { from { translate: 0 0; rotate: -6deg; } to { translate: 0 6px; rotate: 6deg; } }
    .qa details::details-content { block-size: 0; overflow: hidden; transition: block-size .3s, content-visibility .3s allow-discrete; }
    .qa details[open]::details-content { block-size: auto; }
    :root { interpolate-size: allow-keywords; }
    dialog[open] { animation: pop .25s ease-out; }
    @keyframes pop { from { opacity: 0; scale: .97; } }
  }
}
