/* Auckland E-Waste Recycling — homepage styles.
   Loaded only on the homepage (linked from pages/home.php).
   All selectors are prefixed `.hp-` to avoid clashing with shared components. */

html { scroll-behavior: smooth; }

/* Material Symbols glyph helper (subset font linked in home.php) */
.msym {
    font-family: 'Material Symbols Outlined';
    font-weight: normal; font-style: normal; line-height: 1;
    letter-spacing: normal; text-transform: none; white-space: nowrap;
    direction: ltr; -webkit-font-smoothing: antialiased;
    display: inline-block; vertical-align: middle;
}

/* Offset anchored sections beneath the sticky header */
.hp-anchor { scroll-margin-top: 90px; }

/* ───────────── Hero ───────────── */
.hp-hero { background: linear-gradient(135deg, #f8f9ff 0%, #d9f3e6 100%); padding: clamp(2.5rem, 6vw, 5rem) 0; }
.hp-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hp-hero-copy h1 { font-size: clamp(2rem, 3.4vw + 1rem, 3.25rem); line-height: 1.08; letter-spacing: -.02em; margin: 1rem 0; color: var(--color-text); }
.hp-accent-text { color: var(--color-primary); }
.hp-hero-copy p { font-size: 1.125rem; color: var(--color-text-light); max-width: 34rem; margin-bottom: 1.75rem; }
.hp-hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.hp-badge { display: inline-block; padding: .4rem .9rem; background: #adedd3; color: #1c5440; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.hp-hero-media { position: relative; }
.hp-hero-media > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hp-hero-stat { position: absolute; left: -1rem; bottom: -1.25rem; background: #fff; border: 1px solid var(--color-border); border-radius: .9rem; box-shadow: var(--shadow-md); padding: .85rem 1.1rem; display: flex; align-items: center; gap: .75rem; }
.hp-hero-stat .msym { font-size: 1.9rem; color: var(--color-primary); background: #d7f5e7; border-radius: 999px; padding: .4rem; }
.hp-hero-stat strong { display: block; font-size: 1.35rem; color: var(--color-primary); line-height: 1; }
.hp-hero-stat small { font-size: .8rem; color: var(--color-text-muted); }

/* ───────────── Secure-data banner ───────────── */
.hp-secure { background: var(--color-bg-dark); color: #e7eef0; }
.hp-secure .container { display: flex; align-items: center; gap: 1.5rem; padding-block: 2.25rem; }
.hp-secure-icon { font-size: 3rem; color: #6ffbbe; flex-shrink: 0; }
.hp-secure-body { flex: 1; }
.hp-secure-body h3 { color: #fff; margin-bottom: .35rem; font-size: 1.25rem; }
.hp-secure-body p { color: #c2d0d2; font-size: .95rem; }
.hp-secure-imgs { display: flex; gap: .6rem; flex-shrink: 0; }
.hp-secure-img { width: 150px; height: 96px; object-fit: cover; border-radius: var(--radius-md); }

/* ───────────── Services ───────────── */
.hp-services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.hp-service { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.hp-service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-primary); }
.hp-service-media { position: relative; }
.hp-service-media img { width: 100%; height: 175px; object-fit: cover; display: block; }
.hp-service-media .msym { position: absolute; right: .85rem; bottom: -1.3rem; font-size: 1.7rem; color: var(--color-primary); background: #fff; border-radius: 999px; padding: .55rem; box-shadow: var(--shadow-md); }
.hp-service-body { padding: 1.9rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.hp-service-body h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.hp-service-lead { color: var(--color-text-light); margin-bottom: 1.25rem; flex: 1; }
.hp-feature-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .5rem; }
.hp-feature-list li { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--color-text); }
.hp-feature-list .msym { font-size: 1.15rem; color: var(--color-primary); }
.hp-service .btn { width: 100%; justify-content: center; }

/* ───────────── Gallery ───────────── */
.hp-gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; }
.hp-gallery-item { position: relative; margin: 0; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.hp-gallery-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform .4s ease; }
.hp-gallery-item:hover img { transform: scale(1.06); }
.hp-gallery-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(17,24,39,.62) 0%, rgba(17,24,39,.1) 45%, rgba(17,24,39,0) 65%); }
.hp-gallery-item figcaption { position: absolute; left: .65rem; right: .65rem; bottom: .55rem; z-index: 1; color: #fff; font-size: .82rem; font-weight: 600; line-height: 1.2; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.hp-gallery-more { text-align: center; margin-top: 1.75rem; }
.hp-gallery-more .btn .msym { font-size: 1.1rem; }

/* ───────────── 3-step process ───────────── */
.hp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; position: relative; }
.hp-steps::before { content: ''; position: absolute; top: 2rem; left: 12%; right: 12%; border-top: 2px dashed var(--color-border); z-index: 0; }
.hp-step { position: relative; z-index: 1; text-align: center; }
.hp-step-num { width: 4rem; height: 4rem; margin: 0 auto 1rem; border-radius: 999px; background: var(--color-primary); color: #fff; font-size: 1.4rem; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px #d9f3e6; }
.hp-step h4 { margin-bottom: .5rem; font-size: 1.1rem; }
.hp-step p { color: var(--color-text-light); font-size: .95rem; }

/* ───────────── Impact panel ───────────── */
.hp-impact-panel { position: relative; overflow: hidden; background: var(--color-primary); color: #fff; border-radius: 1.25rem; padding: clamp(2.5rem, 5vw, 4rem); }
.hp-impact-bg { position: absolute; right: -.5rem; top: -2rem; font-size: 17rem; opacity: .10; pointer-events: none; user-select: none; }
.hp-impact-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.hp-impact-grid strong { display: block; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1; margin-bottom: .35rem; }
.hp-impact-grid span { opacity: .92; font-size: 1.05rem; }
.hp-impact-note { position: relative; z-index: 1; text-align: center; margin-top: 2.5rem; }
.hp-impact-note .badge { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; background: #adedd3; color: #1c5440; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.hp-impact-note .msym { font-size: 1.1rem; }

/* ───────────── Responsive ───────────── */
@media (max-width: 860px) {
    .hp-hero-grid { grid-template-columns: 1fr; }
    .hp-hero-media { margin-top: .5rem; }
    .hp-hero-stat { left: 0; bottom: -1rem; }
}
@media (max-width: 768px) {
    .hp-steps { grid-template-columns: 1fr; gap: 2.25rem; }
    .hp-steps::before { display: none; }
    .hp-impact-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 700px) {
    .hp-gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .hp-secure .container { flex-direction: column; text-align: center; }
    .hp-secure-imgs { width: 100%; }
    .hp-secure-img { flex: 1; width: auto; height: 120px; min-width: 0; }
}
