/* wallhacking.sg site styles */

.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    line-height: 1;
    user-select: none;
}

/* Long-form content styling for admin-entered HTML */
.prose-wh {
    color: #334155;
    font-size: 17px;
    line-height: 1.75;
}
.prose-wh > * + * { margin-top: 1.15em; }
.prose-wh h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-top: 2.25em;
    margin-bottom: 0.6em;
}
.prose-wh h3 {
    font-size: 1.28rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-top: 1.8em;
    margin-bottom: 0.5em;
}
.prose-wh h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 1.5em;
    margin-bottom: 0.4em;
}
.prose-wh p { margin-bottom: 1.15em; }
.prose-wh a {
    color: #0f766e;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.prose-wh a:hover { color: #115e59; }
.prose-wh strong { color: #0f172a; font-weight: 650; }
.prose-wh ul, .prose-wh ol { padding-left: 1.5em; margin: 1.15em 0; }
.prose-wh ul { list-style: disc; }
.prose-wh ol { list-style: decimal; }
.prose-wh li { margin: 0.45em 0; padding-left: 0.25em; }
.prose-wh li::marker { color: #14b8a6; }
.prose-wh blockquote {
    border-left: 3px solid #14b8a6;
    padding: 0.25em 0 0.25em 1.25em;
    margin: 1.5em 0;
    color: #475569;
    font-style: italic;
}
.prose-wh img {
    border-radius: 0.75rem;
    margin: 1.75em 0;
    max-width: 100%;
    height: auto;
}
.prose-wh figure { margin: 1.75em 0; }
.prose-wh figcaption {
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
    margin-top: 0.6em;
}
.prose-wh hr { border-color: #e2e8f0; margin: 2.5em 0; }
.prose-wh code {
    background: #f1f5f9;
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

/* Tables scroll inside their own container rather than the page body */
.prose-wh .table-wrap,
.prose-wh table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
}
.prose-wh table {
    border-collapse: collapse;
    margin: 1.75em 0;
    font-size: 0.95rem;
    white-space: nowrap;
}
.prose-wh th, .prose-wh td {
    border: 1px solid #e2e8f0;
    padding: 0.7em 1em;
    text-align: left;
}
.prose-wh th {
    background: #f8fafc;
    font-weight: 650;
    color: #0f172a;
}

/* Remove the default disclosure marker on FAQ accordions */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* Header height token used by sticky offsets */
.h-18 { height: 4.5rem; }

/* Hero headings sit over photographs, so they carry their own shadow
   rather than relying on a heavy overlay to darken the whole image */
.hero-heading {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* ------------------------------------------------------------------
   Hero slider

   The track owns the height so the section never resizes between
   slides. Slides stack on top of each other and cross-fade, which
   also means no layout shift when the slide changes.
   ------------------------------------------------------------------ */
.hero-track {
    height: 30rem;
}

@media (min-width: 768px) {
    .hero-track { height: 34rem; }
}

@media (min-width: 1024px) {
    .hero-track { height: 38rem; }
}

/* On short landscape screens, cap the hero so it never eats the
   whole viewport and push the content below out of sight */
@media (max-height: 34rem) and (orientation: landscape) {
    .hero-track { height: 80vh; }
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 600ms ease-in-out, visibility 0s linear 600ms;
    pointer-events: none;
    /* Clips the scaled photo so it cannot widen the page */
    overflow: hidden;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 600ms ease-in-out, visibility 0s linear 0s;
    pointer-events: auto;
    /* Sits above the outgoing slide during the fade */
    z-index: 1;
}

/* A slower, gentler lift on the active slide's photo. Purely decorative,
   so it is dropped entirely under reduced motion below. */
.hero-slide img {
    transform: scale(1.04);
    transition: transform 7s ease-out;
}

.hero-slide.is-active img {
    transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-slide.is-active {
        transition: opacity 1ms linear, visibility 0s linear;
    }
    .hero-slide img,
    .hero-slide.is-active img {
        transform: none;
        transition: none;
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

html { scroll-behavior: smooth; }

/* Focus visibility for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

/* ------------------------------------------------------------------
   Section background artwork

   All of this is CSS gradients and SVG data URIs, so it adds no HTTP
   requests and no image weight. Everything sits behind the content at
   low opacity and is decorative only, so nothing here carries meaning
   that a screen reader would need.

   The motifs reference the trade rather than being generic shapes:
   a blueprint grid, a brick bond, and a measured rule.
   ------------------------------------------------------------------ */

/* Blueprint grid. Fine lines with a heavier line every fifth square,
   the way a drawing sheet is ruled. */
.bg-blueprint {
    position: relative;
    background-color: #f8fafc;
}
.bg-blueprint::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, rgba(15, 118, 110, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 118, 110, 0.07) 1px, transparent 1px),
        linear-gradient(to right, rgba(15, 118, 110, 0.13) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 118, 110, 0.13) 1px, transparent 1px);
    background-size: 28px 28px, 28px 28px, 140px 140px, 140px 140px;
    /* Fades out towards the edges so it does not fight the content */
    -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 50%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 75% 60% at 50% 50%, #000 40%, transparent 100%);
}

/* Brick bond. Offset courses, the pattern you are looking at on any
   wall that is about to come down. */
.bg-brick {
    position: relative;
    background-color: #f8fafc;
}
.bg-brick::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cg fill='none' stroke='%230f766e' stroke-opacity='0.07' stroke-width='1'%3E%3Cpath d='M0 0h120M0 30h120M0 60h120'/%3E%3Cpath d='M60 0v30M0 30v30M120 30v30'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 60px;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 60%, transparent 95%);
    mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 60%, transparent 95%);
}

/* A soft teal wash in one corner. Used where a full pattern would be
   too much but flat white is too plain. */
.bg-wash {
    position: relative;
    background-color: #ffffff;
}
.bg-wash::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(60rem 30rem at 85% -10%, rgba(15, 118, 110, 0.07), transparent 60%),
        radial-gradient(45rem 25rem at 5% 110%, rgba(20, 184, 166, 0.06), transparent 60%);
}

/* Measured rule along the top edge, like a tape measure. Marks the
   start of a section without needing a heading to do it. */
.bg-ruled {
    position: relative;
}
.bg-ruled::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 14px;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        to right,
        rgba(15, 118, 110, 0.28) 0 1px,
        transparent 1px 16px
    );
    -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}

/* Keeps content above whatever the ::before is painting */
.bg-blueprint > *,
.bg-brick > *,
.bg-wash > *,
.bg-ruled > * {
    position: relative;
    z-index: 1;
}

/* The patterns are decoration. Under reduced-motion they stay, since
   they do not move, but under forced-colors they are dropped so they
   cannot interfere with a user's own contrast settings. */
@media (forced-colors: active) {
    .bg-blueprint::before,
    .bg-brick::before,
    .bg-wash::before,
    .bg-ruled::before {
        display: none;
    }
}

/* Service cards carry a teal top edge that draws in on hover, so a card
   reads as interactive before the cursor reaches it. */
.service-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, #0f766e, #14b8a6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 250ms ease-out;
}
.service-card:hover::after,
.service-card:focus-visible::after {
    transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
    .service-card { transition: none !important; }
    .service-card:hover { transform: none !important; }
    .service-card::after { transition: none; }
}

/* The decorative corner glyph only makes sense once the icon font has
   loaded. Until then it would show the raw ligature text, so it stays
   hidden and fades in with the font. */
.ghost-icon { opacity: 0; transition: opacity 300ms ease-in; }
html.fonts-ready .ghost-icon { opacity: 1; }
