/* ──────────────────────────────────────────────────────────────────────
   homepage.css — public landing page (Apple-style hero + sections).
   Mirrors apple-client-area/portal-home.html.
   Loaded by core/pages/homepage/default/default.tpl
   ────────────────────────────────────────────────────────────────────── */

/* ─── Hero domain search ─── */
.ph-hero { padding: 48px 22px 56px; text-align: center; }
.ph-hero-inner { max-width: 760px; margin: 0 auto; }
.ph-hero h1 { font-size: var(--text-h1); font-weight: var(--fw-semibold); letter-spacing: -0.025em; margin: 0 0 12px; color: var(--color-text-primary); line-height: 1.08; }
.ph-hero p { font-size: var(--text-xl); color: var(--color-text-secondary); margin: 0 0 28px; }
.ph-hero .ph-domain-tabs {
    display: inline-flex; gap: 4px; padding: 4px;
    background: var(--color-surface-secondary);
    border-radius: 980px; margin-bottom: 16px;
}
.ph-hero .ph-domain-tabs button {
    padding: 8px 18px; border-radius: 980px;
    border: 0; background: transparent;
    font: inherit; font-size: var(--text-base); font-weight: var(--fw-medium);
    color: var(--color-text-secondary); cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.ph-hero .ph-domain-tabs button.active {
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: 0 1px 2px var(--color-border-card);
}

.ph-domain-form { max-width: 640px; margin: 0 auto; }
.ph-domain-box {
    position: relative; display: flex; align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 6px 6px 6px 18px;
    gap: 6px;
    box-shadow: 0 12px 32px var(--sidebar-item-active);
    transition: box-shadow 0.2s, border-color 0.2s;
}
.ph-domain-box:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.12), 0 12px 32px var(--sidebar-item-active);
}
.ph-domain-box svg.search-ico {
    width: 18px; height: 18px;
    color: var(--color-accent); flex-shrink: 0;
}
.ph-domain-box input {
    flex: 1; border: 0; outline: none;
    background: transparent;
    font: inherit; font-size: var(--text-xl);
    color: var(--color-text-primary);
    padding: 14px 0; min-width: 0;
}
.ph-domain-box input::placeholder { color: var(--color-text-tertiary); }
.ph-domain-box button {
    background: var(--color-accent); color: var(--color-surface);
    border: 0; border-radius: 12px;
    padding: 12px 24px;
    font: inherit; font-size: var(--text-md); font-weight: var(--fw-medium);
    cursor: pointer; transition: background 0.15s;
    white-space: nowrap;
}
.ph-domain-box button:hover { background: var(--color-accent-hover); }

.ph-domain-footer {
    margin-top: 12px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: var(--text-sm); color: var(--color-text-tertiary);
}
.ph-domain-footer a { color: var(--color-accent); text-decoration: none; }
.ph-domain-footer a:hover { text-decoration: underline; }

/* ── Product categories as rows ─────────────────────────────────────────
   Alternative to the .hp-pricing-grid card layout, chosen per-page in admin
   Pages -> Homepage -> "Categories as rows".

   Why rows exist: in the card grid a category with no priced product leaves
   half a card empty, and the 2-up/3-up grid gets awkward past four groups.
   A row absorbs a missing price in one cell and stays tidy at any count.

   1024px to match the marketing column used across the homepage and store
   pages — see the other hp-* sections in apple-theme.css. */
.hp-cat-rows {
    max-width: var(--w-prose);
    margin: 0 auto;
    display: grid;
    gap: 10px;
}
.hp-cat-row {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 18px 22px;
    display: grid;
    grid-template-columns: 44px 1fr auto auto;
    gap: 18px;
    align-items: center;
    text-decoration: none;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.hp-cat-row:hover {
    border-color: var(--color-accent);
    text-decoration: none;
}
.hp-cat-row:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Initial-on-a-tint, mirroring the theme's avatar treatment. WHMCS product
   groups carry no icon, so the group's own name is the only honest source. */
.hp-cat-row .cat-mark {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-surface-secondary);
    color: var(--color-accent);
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    line-height: 1;
}

.hp-cat-row .cat-text { text-align: left; min-width: 0; }
.hp-cat-row .cat-text strong {
    display: block;
    font-size: var(--text-xl);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.01em;
    color: var(--color-text-primary);
}
.hp-cat-row .cat-tagline {
    display: block;
    font-size: var(--text-md);
    color: var(--color-text-secondary);
    line-height: 1.45;
}

.hp-cat-row .cat-price { text-align: right; white-space: nowrap; }
.hp-cat-row .cat-price b {
    font-size: var(--text-h5);
    font-weight: var(--fw-semibold);
    letter-spacing: -0.02em;
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}
.hp-cat-row .cat-price em {
    display: block;
    font-style: normal;
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}
.hp-cat-row .cat-chev {
    color: var(--color-text-tertiary);
    font-size: var(--text-h5);
    line-height: 1;
}

@media (max-width: 560px) {
    /* Drop the chevron and tuck the price under the name — four columns will
       not fit a phone without truncating the tagline to uselessness. */
    .hp-cat-row { grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 18px; }
    .hp-cat-row .cat-mark { width: 40px; height: 40px; }
    .hp-cat-row .cat-price { grid-column: 2; text-align: left; }
    .hp-cat-row .cat-chev { display: none; }
}

/* TLD price strip — live register prices under the hero domain search.
   Compact inline row rather than cards: it sits inside the hero, so it has to
   read as a quiet supporting rail and not compete with the search box.
   Wraps on narrow viewports instead of scrolling, so no price is ever cut off. */
.hp-tld-strip {
    margin-top: 14px;
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px;
}
.hp-tld {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--color-surface-secondary);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: background var(--transition-fast);
}
.hp-tld:hover { background: var(--color-border-light); text-decoration: none; }
.hp-tld-ext   { font-weight: var(--fw-semibold); color: var(--color-text-primary); }
.hp-tld-price { color: var(--color-text-tertiary); }

@media (max-width: 560px) {
    /* Keep it to two tidy rows on a phone rather than a ragged six. */
    .hp-tld { padding: 4px 10px; font-size: var(--text-xs); }
}

/* Captcha — shown on the domain search when enabled for the domain checker */
.ph-captcha {
    max-width: 480px; margin: 16px auto 0;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ph-captcha .g-recaptcha,
.ph-captcha .h-captcha { display: inline-block; }
.ph-captcha img { border-radius: 10px; border: 0.5px solid var(--color-border); }
.ph-captcha input[type="text"] {
    height: 44px; padding: 0 16px; max-width: 240px; box-sizing: border-box;
    border: 1px solid var(--color-border); border-radius: 10px;
    font-size: var(--text-md); background: var(--color-surface); color: var(--color-text-primary);
    text-align: center; letter-spacing: 2px; text-transform: uppercase; font-family: inherit;
}
.ph-captcha input[type="text"]:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-light); }

/* ─── Body sections ─── */
.ph-section {
    max-width: 1100px; margin: 0 auto;
    padding: 48px 22px 16px;
}
.ph-section-head { text-align: center; margin-bottom: 28px; }
.ph-section-head .eyebrow {
    font-size: var(--text-sm); font-weight: var(--fw-semibold);
    letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 6px;
}
.ph-section-head h2 {
    font-size: var(--text-h3); font-weight: var(--fw-semibold);
    letter-spacing: -0.025em;
    margin: 0; color: var(--color-text-primary);
}

/* Product group cards */
.ph-pg-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 900px) { .ph-pg-grid { grid-template-columns: 1fr; } }
.ph-pg-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 32px 28px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.ph-pg-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px var(--sidebar-item-active);
}
.ph-pg-card .pg-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}
.ph-pg-card .pg-icon.blue   { background: rgba(0,113,227,0.10);  color: var(--color-accent); }
.ph-pg-card .pg-icon.green  { background: rgba(48,209,88,0.12);  color: var(--color-green); }
.ph-pg-card .pg-icon.purple { background: rgba(175,130,255,0.12); color: #af82ff; }
.ph-pg-card .pg-icon.orange { background: rgba(255,159,10,0.12);  color: var(--color-orange); }
.ph-pg-card h3 {
    font-size: var(--text-2xl); font-weight: var(--fw-semibold);
    margin: 0 0 8px;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}
.ph-pg-card p {
    font-size: var(--text-md); color: var(--color-text-secondary);
    margin: 0 0 20px; min-height: 42px; line-height: 1.5;
}
.ph-pg-card a.cta {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 980px;
    background: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    font-size: var(--text-base); font-weight: var(--fw-medium);
    text-decoration: none;
    transition: all 0.15s;
}
.ph-pg-card a.cta:hover {
    background: var(--color-accent); color: var(--color-surface);
    text-decoration: none;
}

/* Action tiles (help + account) */
.ph-action-grid {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
}
@media (max-width: 720px) { .ph-action-grid { grid-template-columns: repeat(2, 1fr); } }
.ph-action {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 22px 14px;
    text-align: center; text-decoration: none;
    color: var(--color-text-primary);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    transition: all 0.2s;
}
.ph-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px var(--sidebar-item-active);
    text-decoration: none;
    color: var(--color-text-primary);
}
.ph-action .ico {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.ph-action .ico.teal   { background: rgba(90,200,250,0.14);  color: #5ac8fa; }
.ph-action .ico.red    { background: var(--color-red-bg);   color: var(--color-red); }
.ph-action .ico.yellow { background: rgba(255,159,10,0.14);  color: var(--color-orange); }
.ph-action .ico.gray   { background: rgba(142,142,147,0.15); color: #8e8e93; }
.ph-action .ico.green  { background: rgba(48,209,88,0.14);   color: var(--color-green); }
.ph-action .ico.blue   { background: rgba(0,113,227,0.10);   color: var(--color-accent); }
.ph-action .ico.purple { background: rgba(175,130,255,0.14); color: #af82ff; }
.ph-action .ico.indigo { background: rgba(94,92,230,0.16);   color: #5e5ce6; }
.ph-action .lbl { font-size: var(--text-base); font-weight: var(--fw-medium); }
