/* The service and platform pages, brought onto the system the home page and
   /ssl/ now set: one ground, one ink, one flat action colour, surfaces
   separated by a tone step instead of a border, a shadow, or a blur.
   This is a restyle — the layout and the content stay as they are. */

.p-page {
    --p-bg:     #070b14;
    --p-tile:   #0d1420;
    --p-tile-2: #121b2b;
    --p-ink:    #ffffff;
    --p-muted:  #8b9bb4;
    --p-accent: #00f2fe;
    --p-accent-ink: #04121a;

    --p-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
    --p-body:  clamp(1rem, 0.97rem + 0.18vw, 1.0625rem);
    --p-lead:  clamp(1.125rem, 1.03rem + 0.45vw, 1.375rem);
    --p-head:  clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
    --p-disp:  clamp(2.25rem, 1.2rem + 4.2vw, 4rem);

    --p-frame: clamp(16px, 2.2vw, 32px);
    background: var(--p-bg);
    color: var(--p-ink);
}

/* --- the kit comes off --- */

.p-page .glass-panel,
.p-page .service-card,
.p-page .price-card,
.p-page .price-includes,
.p-page .faq-item,
.p-page .article-card,
.p-page .stat-item,
.p-page .contact-card,
.p-page .info-item,
.p-page .prose {
    background: var(--p-tile);
    border: 0;
    box-shadow: none;  /* taste-skill-ignore: removing the kit's shadow */
    backdrop-filter: none;  /* taste-skill-ignore: removing the kit's glass */
    -webkit-backdrop-filter: none;
    border-radius: 6px;
}

.p-page .btn-primary {
    background: var(--p-accent);
    color: var(--p-accent-ink);
    box-shadow: none;  /* taste-skill-ignore: removing the kit's glow */
    border: 0;
    border-radius: 2px;
}
.p-page .btn-primary:hover { background: #5ef7ff; }
.p-page .btn-secondary,
.p-page .btn-outline {
    background: var(--p-tile-2);
    color: var(--p-ink);
    border: 0;
    border-radius: 2px;
}
.p-page .btn-secondary:hover,
.p-page .btn-outline:hover { background: #162033; }

.p-page .text-gradient {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    color: var(--p-accent);
}

.p-page .tech-circle { display: none; }
.p-page .article-card-tag {
    background: none; border: 0; padding: 0;
    color: var(--p-accent); font-size: var(--p-small);
}
.p-page footer,
.p-page .footer-bottom,
.p-page .contact-info { border-top: 0; border-right: 0; }
.p-page .footer-bottom { padding-top: 28px; }

/* --- the frame: one pair of margins, headings on the page's left edge --- */

.p-page .section-header { text-align: left; max-width: 58ch; margin-inline: 0; }
.p-page .page-hero-content { background: transparent; padding-inline: 0; }

/* --- the first screen gets something to lead with --- */

.p-page .page-hero { padding-block: clamp(72px, 9vw, 150px) clamp(48px, 6vw, 96px); }
.p-page .page-hero h1 {
    font-size: var(--p-disp);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.1;
    max-width: 18ch;
}
.p-page .page-hero-subtitle {
    font-size: var(--p-lead);
    line-height: 1.45;
    color: var(--p-accent);
    max-width: 46ch;
}
.p-page .page-hero-content > p:not(.page-hero-subtitle) {
    font-size: var(--p-body);
    line-height: 1.7;
    color: var(--p-muted);
    max-width: 60ch;
}

/* --- five steps, not eleven --- */

.p-page h2 { font-size: var(--p-head); font-weight: 500; letter-spacing: -0.03em; }
.p-page h3 { font-size: var(--p-lead); font-weight: 500; }
.p-page p,
.p-page li,
.p-page .btn { font-size: var(--p-body); }
.p-page .section-header p { font-size: var(--p-body); color: var(--p-muted); }
.p-page .prose p { max-width: 68ch; line-height: 1.75; }

/* --- four cards in a row leave an orphan; two by two does not --- */

@media (min-width: 760px) {
    .p-page .services-grid:has(> :nth-child(4):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- a picture band, where a page carries one --- */

.p-band { margin: 0; background: var(--p-tile); }
.p-band img {
    display: block; width: 100%;
    height: clamp(240px, 38svh, 420px);
    object-fit: cover;
}
.p-band figcaption {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding: 24px 2rem 0;
    box-sizing: border-box;
    font-size: var(--p-body);
    line-height: 1.6;
    color: var(--p-muted);
}
.p-page .credits { font-size: var(--p-small); color: var(--p-muted); line-height: 1.6; margin: 0 0 12px; }
.p-page .credits a { color: var(--p-muted); }

/* --- entrances --- */

.p-page .p-enter {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 580ms cubic-bezier(.2,.7,.3,1), transform 580ms cubic-bezier(.2,.7,.3,1);
}
.p-page .p-enter.p-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
    .p-page .page-hero h1,
    .p-page .page-hero-subtitle,
    .p-page .page-hero-content > p,
    .p-page .hero-actions {
        animation: p-rise 740ms cubic-bezier(.16,.84,.32,1) both;
    }
    .p-page .page-hero-subtitle { animation-delay: 90ms; }
    .p-page .page-hero-content > p { animation-delay: 160ms; }
    .p-page .hero-actions { animation-delay: 240ms; }
}
@keyframes p-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .p-page .p-enter { opacity: 1; transform: none; transition: none; }
}

/* The first screen needs one dominant thing. The hero picture is it. */
.p-page .page-hero .container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(32px, 4vw, 56px);
}

/* .btn 是 white-space: nowrap。行動版 hero 只有一欄，英文的
   "Book a Cloud Architecture Consultation" 要 364px，比 350px 的欄還寬，
   整欄就被撐出畫面，標題和內文一起被切掉右邊。單欄的時候讓它換行。 */
@media (max-width: 899px) {
    .p-page .hero-actions .btn { white-space: normal; }
}
@media (min-width: 900px) {
    /* minmax(0, …) 而不是裸的 fr：fr 的自動下限是 min-content，英文那兩顆
       按鈕（"Request a Hosting Quote"）會把文字欄從 405px 撐到 571px，圖片
       跟著縮到不滿視窗三分之一，首屏就沒有主導元素了。中文按鈕短，所以
       同一個版面只在英文版壞掉。 */
    .p-page .page-hero .container:has(> :nth-child(2)) {
        grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
        align-items: center;
    }
}

/* 欄寬固定之後，按鈕要能換行，不然會頂出欄位。 */
.p-page .hero-actions { flex-wrap: wrap; }
.p-hero-pic { margin: 0; border-radius: 6px; overflow: hidden; }
.p-hero-pic img {
    display: block; width: 100%;
    height: clamp(320px, 72svh, 760px);
    object-fit: cover;
}

/* The last band's caption sat directly above the next section's heading and
   read as a label over it. */
.p-band { padding-bottom: clamp(32px, 4vw, 64px); }
.p-band + .section { padding-top: clamp(48px, 6vw, 96px); }

/* The caption carries a measure of its own inside the container's width. */
.p-band figcaption > * { max-width: 62ch; }

/* The "延伸閱讀" cards carry a small label above each title. That is an
   eyebrow; the card's own position already says what the link is. */
.p-page .related-kicker { display: none; }

/* FAQ 的答案跨滿整個面板：786px 在 17px 下是一行 46 個漢字、92 個拉丁
   字元，兩種語言都太長。 */
.p-page .faq-item p { max-width: 68ch; }

/* 首屏那段說明文字原本 17px。它的工作是用白話講清楚這是什麼，
   skill 的建議是 18px 以上，差這一個像素它就不算數。 */
.p-page .page-hero-content > p:not(.page-hero-subtitle) {
    font-size: clamp(1.125rem, 1.07rem + 0.2vw, 1.1875rem);
}

/* ==========================================================================
   Three sections that were three identical card grids
   ========================================================================== */

/* The meter called it "4 rows of identical boxed cards" and it was right:
   scrolling a service page went grid, grid, grid. Each section now takes the
   shape of what it holds. */

/* 適用場景 — a situation and what it gets. A two-column list reads as that;
   a card grid reads as four products. */
.p-page .p-defs { margin: 0; display: grid; gap: 4px; }
.p-page .p-def {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: clamp(20px, 2.4vw, 28px) clamp(18px, 2vw, 26px);
    border-radius: 6px;
}
.p-page .p-def:nth-child(odd) { background: var(--p-tile); }
.p-page .p-def dt { font-size: var(--p-lead); line-height: 1.3; color: var(--p-ink); }
.p-page .p-def dd { margin: 0; font-size: var(--p-body); line-height: 1.7; color: var(--p-muted); max-width: 62ch; }
@media (min-width: 860px) {
    .p-page .p-def { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 0 clamp(28px, 3vw, 56px); align-items: baseline; }
}

/* 為什麼選擇 — the section with the most to say, so the heading takes one
   column and the reasons take the other. */
.p-page .p-why { display: grid; gap: clamp(28px, 3vw, 56px); }
@media (min-width: 900px) {
    .p-page .p-why { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); align-items: start; }
    .p-page .p-why-head { position: sticky; top: 112px; }
}
.p-page .p-why-head h2 { font-size: var(--p-head); line-height: 1.2; margin: 0 0 14px; }
.p-page .p-why-head p { font-size: var(--p-body); line-height: 1.7; color: var(--p-muted); margin: 0; max-width: 42ch; }
.p-page .p-why-list { display: grid; gap: 4px; }
.p-page .p-why-item {
    padding: clamp(20px, 2.4vw, 28px) clamp(18px, 2vw, 26px);
    border-radius: 6px;
}
.p-page .p-why-item:nth-child(even) { background: var(--p-tile); }
.p-page .p-why-item h3 { font-size: var(--p-lead); line-height: 1.3; margin: 0 0 8px; color: var(--p-ink); }
.p-page .p-why-item p { font-size: var(--p-body); line-height: 1.7; color: var(--p-muted); margin: 0; max-width: 56ch; }

/* 適合的客戶類型 — four names read across, no boxes. */
/* Four across needs real width: at 768px each column was 170px, which is a
   few characters per line in Chinese. Two there, four from 980px.
   The bottom padding keeps the last line clear of the next heading — within
   72px of one it reads as a label over it. */
.p-page .p-who {
    list-style: none; margin: 0;
    padding: 0 0 clamp(16px, 2vw, 32px);
    display: grid; gap: clamp(28px, 3vw, 44px);
}
@media (min-width: 560px) { .p-page .p-who { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .p-page .p-who { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.p-page .p-who h3 { font-size: var(--p-lead); line-height: 1.25; margin: 0 0 10px; color: var(--p-ink); }
.p-page .p-who p { font-size: var(--p-small); line-height: 1.7; color: var(--p-muted); margin: 0; }
