/* ──────────────────────────────────────────────────────────────
   禮記殯儀 — static rebuild of the existing site design.
   Palette, type, organic corner radii and the wave divider path
   are taken from the live Elementor stylesheet so the page keeps
   its established identity.
   ────────────────────────────────────────────────────────────── */

:root{
  --violet:#AA6DB8;
  --violet-dk:#9356A3;
  --violet-lt:#C79BD3;
  --slate:#3D4459;
  --grey:#54595F;
  --grey-lt:#8A8A8A;
  --line:#E5E5E5;
  --white:#FFFFFF;

  --latin:"Montserrat";
  --round:"Varela Round";
  --work:"Work Sans";
  --han:"PingFang TC","PingFang HK","Microsoft JhengHei","Noto Sans TC","Heiti TC";

  /* Neither Latin family carries CJK glyphs, so Chinese resolves to the
     system face at whatever weight is set - same as the original build. */
  --ui:var(--latin),var(--han),-apple-system,"Segoe UI",sans-serif;
  --display:var(--round),var(--han),-apple-system,sans-serif;
  --num:var(--work),var(--han),sans-serif;

  /* Type scale lifted verbatim from the live Elementor stylesheet.
     Desktop values are exact; the clamp lower bounds are for narrow screens. */
  --fs-display:clamp(30px,4.4vw,45px);   /* all h2 + hero headline */
  --fs-eyebrow:clamp(16px,1.6vw,20px);   /* section kickers        */
  --fs-body:16px;                         /* body copy              */
  --fs-ui:15px;                           /* buttons, card links    */

  /* the two signature shapes from the original build */
  --r-card:15px 15px 15px 70px;
  --r-shot:300px 100px 100px 100px;

  --wrap:1140px;
}

*,*::before,*::after{box-sizing:border-box}

html{
  -webkit-text-size-adjust:100%;
  scroll-behavior:smooth;
  scroll-padding-top:1.5rem;
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition-duration:.01ms !important;animation-duration:.01ms !important}
}

body{
  margin:0;
  background:var(--white);
  color:var(--slate);
  font-family:var(--ui);
  font-size:var(--fs-body);
  font-weight:400;
  line-height:1.4;
  overflow-x:hidden;
}

img{max-width:100%;height:auto;display:block}
a{color:inherit}

:focus-visible{
  outline:2px solid var(--violet);
  outline-offset:3px;
  border-radius:2px;
}

.skip{
  position:absolute;left:-9999px;top:0;z-index:100;
  background:var(--violet);color:#FFF;
  padding:.75rem 1.25rem;text-decoration:none;
}
.skip:focus{left:.5rem;top:.5rem}

.wrap{
  max-width:var(--wrap);
  margin-inline:auto;
  padding-inline:clamp(1.25rem,5vw,2rem);
}

/* ── shared type ─────────────────────────────────────────── */

/* kicker above each section heading - 20px/300 in the original, which is
   much larger than a conventional eyebrow and is part of the look */
.eyebrow{
  margin:0 0 .5rem;
  font-family:var(--ui);
  font-size:var(--fs-eyebrow);
  font-weight:300;
  line-height:1.4;
  color:var(--slate);
}
.sec--parlours .eyebrow{color:var(--violet)}

.h2{
  margin:0 0 1.4rem;
  font-family:var(--display);
  font-weight:300;
  font-size:var(--fs-display);
  line-height:1.2;
}
.h2--violet{color:var(--violet)}
.h2--slate{color:var(--slate)}
.h2--lilac{color:var(--violet-lt)}

.body{
  margin:0 0 1.5rem;
  max-width:34em;
  font-weight:200;
  line-height:1.4;
}
.sec--services .body{color:#000}

.fine{
  margin:-.4rem 0 1.1rem;
  font-size:12px;
  color:var(--grey-lt);
}

.rule{
  border:0;
  border-top:1px solid var(--line);
  max-width:calc(var(--wrap) - 4rem);
  margin:0 auto;
}

/* ── pill buttons ────────────────────────────────────────── */

.pill{
  display:inline-flex;align-items:center;gap:.55rem;
  background:var(--violet);
  color:#FFF;
  text-decoration:none;
  font-family:var(--ui);
  font-size:var(--fs-ui);
  font-weight:500;
  line-height:1.4;
  padding:.7rem 1.6rem;
  border-radius:999px;
  border:1px solid var(--violet);
  transition:background-color .2s,border-color .2s,color .2s;
}
.pill:hover{background:var(--violet-dk);border-color:var(--violet-dk)}
.pill--lg{padding:.8rem 1.9rem}
.pill--onviolet{
  background:rgba(255,255,255,.14);
  border-color:rgba(255,255,255,.65);
}
.pill--onviolet:hover{background:#FFF;color:var(--violet);border-color:#FFF}

/* chevron drawn in CSS so no icon font is needed */
.pill__i{
  width:.42em;height:.42em;
  border-right:1.6px solid currentColor;
  border-bottom:1.6px solid currentColor;
  transform:rotate(-45deg);
  margin-left:.1em;
}
.pill__i--down{transform:rotate(45deg);margin-bottom:.18em}

/* ── hero ────────────────────────────────────────────────── */

.hero{
  position:relative;
  min-height:clamp(420px,56vh,560px);
  display:flex;align-items:center;
  overflow:hidden;
  background:#8E8E92;
}
.hero__media,
.hero__veil{position:absolute;inset:0}
.hero__media{
  background:url("assets/hero.jpg") 34% 40%/cover no-repeat;
}
/* The photo's own bokeh already sits mid-grey behind the headline, so this
   is only a light lift for contrast - heavier and the hero loses its air. */
.hero__veil{
  background:linear-gradient(90deg,
    rgba(70,64,82,0) 38%,
    rgba(70,64,82,.14) 52%,
    rgba(70,64,82,.30) 74%,
    rgba(70,64,82,.34) 100%);
}
.hero__in{
  position:relative;z-index:2;
  width:100%;
  max-width:var(--wrap);
  margin-inline:auto;
  padding:clamp(3rem,8vh,5rem) clamp(1.25rem,5vw,2rem) clamp(5rem,11vh,7rem);
}
.hero__eyebrow{
  margin:0 0 1rem;
  font-family:var(--ui);
  font-size:var(--fs-eyebrow);
  font-weight:900;
  line-height:1.4;
  color:#FFF;
  text-shadow:0 1px 8px rgba(52,46,62,.5);
}
.hero__title{
  display:grid;
  margin:0;
  font-family:var(--display);
  font-weight:500;
  font-size:var(--fs-display);
  line-height:1.2;
  color:#FFF;
  text-shadow:0 1px 10px rgba(52,46,62,.45),0 0 26px rgba(52,46,62,.25);
}
.hero__sub{
  margin:1.1rem 0 1.9rem;
  font-family:var(--ui);
  font-size:var(--fs-body);
  font-weight:700;
  line-height:1.4;
  color:#FFF;
  text-shadow:0 1px 8px rgba(52,46,62,.5);
}

/* Text sits right of centre on wide screens, as in the original.
   This offset MUST be a margin on the inner block, not padding on
   .hero__in: percentage padding resolves against the containing block
   (the full-bleed .hero), so on a wide monitor it would exceed
   .hero__in's own max-width and crush the text to zero width - which
   stacks every CJK glyph onto its own line. A margin here resolves
   against .hero__in, which is capped at --wrap. */
.hero__text{max-width:34rem}
@media (min-width:860px){
  .hero__text{margin-left:48%}
}

/* Narrow screens stack the text over the left of the photo, which is the
   brightest part - the horizontal gradient does nothing there, so swap it
   for a vertical scrim and pan the crop toward the quieter bokeh. */
@media (max-width:859px){
  .hero__media{background-position:62% 45%}
  .hero__veil{
    background:linear-gradient(180deg,
      rgba(62,56,74,.52) 0%,
      rgba(62,56,74,.42) 50%,
      rgba(62,56,74,.22) 100%);
  }
}

/* ── wave dividers ───────────────────────────────────────── */

.wave{
  position:absolute;
  left:0;width:100%;
  height:clamp(42px,6vw,88px);
  display:block;
  z-index:3;
  pointer-events:none;
}
.wave path{fill:#FFF}
/* The path fills the UPPER half of its viewBox. At the foot of the hero the
   white must land underneath, so that one is flipped; at the top of the
   footer the white already sits correctly above the purple. */
.wave--hero{bottom:-1px;transform:rotate(180deg)}
.wave--foot{top:-1px}

/* ── section rhythm ──────────────────────────────────────── */

.sec{position:relative;padding:clamp(3.5rem,8vw,5.5rem) 0}
.sec--parlours{padding-top:clamp(3rem,7vw,4.5rem)}

/* Soft out-of-focus lavender washes, as in the original build. Purely
   decorative, kept behind content and clipped to the page width. */
body{overflow-x:hidden}

.sec--parlours::before,
.sec--parlours::after,
.sec--charity::before{
  content:"";
  position:absolute;
  z-index:-2;
  pointer-events:none;
  border-radius:50%;
  filter:blur(40px);
}
.sec--parlours::before{
  right:-14vw;top:4%;
  width:46vw;height:62%;
  background:radial-gradient(circle at 50% 50%,rgba(170,109,184,.22),rgba(170,109,184,0) 68%);
}
.sec--parlours::after{
  left:-18vw;bottom:2%;
  width:42vw;height:48%;
  background:radial-gradient(circle at 50% 50%,rgba(199,155,211,.20),rgba(199,155,211,0) 68%);
}
.sec--charity::before{
  right:-12vw;top:12%;
  width:38vw;height:60%;
  background:radial-gradient(circle at 50% 50%,rgba(244,198,255,.34),rgba(244,198,255,0) 70%);
}

.duo{display:grid;gap:clamp(2rem,5vw,3.5rem)}
@media (min-width:880px){
  .duo{grid-template-columns:1fr 1fr;gap:clamp(3rem,6vw,5rem)}
  .duo--mid{align-items:center}
}

/* ── organic photo shapes ────────────────────────────────── */

.shot{margin:0}
.shot img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:cover;
  border-radius:var(--r-shot);
}

/* ── toggles (中式殯儀服務 / 身後安排) ───────────────────── */

.toggles{border-top:1px solid var(--line)}

.tg{border-bottom:1px solid var(--line)}
.tg summary{
  cursor:pointer;
  list-style:none;
  display:flex;align-items:center;gap:1rem;
  padding:1rem .25rem;
  font-family:var(--display);
  font-size:var(--fs-body);
  font-weight:400;
  line-height:1.5;
  color:var(--grey-lt);
  transition:color .18s;
}
.tg summary::-webkit-details-marker{display:none}
.tg summary>span{flex:1}
.tg summary:hover{color:var(--violet)}

/* caret, matching the original's right-pointing marker */
.tg summary::after{
  content:"";
  flex:0 0 auto;
  width:0;height:0;
  border-top:5px solid transparent;
  border-bottom:5px solid transparent;
  border-left:6px solid var(--violet);
  transition:transform .2s;
}
.tg[open] summary::after{transform:rotate(90deg)}

.tg__b{
  padding:.1rem .25rem 1.5rem;
  font-size:var(--fs-body);
  font-weight:200;
  line-height:1.75;
  color:var(--slate);
}
.tg__b>p{margin:0 0 1rem}
.tg__b>p:last-child{margin-bottom:0}
.tg__note{
  color:var(--violet);
  font-size:13px;
}
.tg__note em{font-style:normal;font-weight:600;text-decoration:underline}
.tg__note a{color:var(--violet);font-weight:600}

.ol{margin:0 0 1rem;padding-left:1.4rem}
.ol li{margin-bottom:.15rem}
@media (min-width:36rem){
  .ol--2{columns:2;column-gap:1.75rem}
}

.ul{margin:0;padding-left:1.15rem}
.ul li{margin-bottom:.4rem}
.ul a{color:var(--violet);font-weight:600}

/* ── fee tables ──────────────────────────────────────────── */

.fees{
  width:100%;
  border-collapse:collapse;
  margin:0 0 .9rem;
  font-size:13px;
  text-align:left;
}
.fees th,.fees td{
  padding:.5rem .7rem;
  border-bottom:1px solid var(--line);
}
.fees thead th{
  background:rgba(170,109,184,.08);
  color:var(--violet);
  font-weight:600;
  font-size:12px;
  letter-spacing:.05em;
}
.fees tbody th{font-weight:500;color:var(--slate)}
.fees td{font-variant-numeric:tabular-nums;white-space:nowrap}

/* ── 殯儀館 cards ────────────────────────────────────────── */

.headrow{
  display:flex;flex-wrap:wrap;
  align-items:flex-end;justify-content:space-between;
  gap:1.5rem;
  margin-bottom:clamp(2rem,4vw,2.75rem);
}
.headrow .h2{margin-bottom:0;max-width:18em}

.cards{
  list-style:none;margin:0;padding:0;
  display:grid;gap:clamp(1.1rem,2.2vw,1.6rem);
  grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr));
}

.card{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  border-radius:var(--r-card);
  background:#FAF8FB;
  padding:1.6rem 1.5rem 1.4rem;
  min-height:230px;
  display:flex;flex-direction:column;
}
/* the building photo sits far back, as on the original */
.card::before{
  content:"";
  position:absolute;inset:0;z-index:-1;
  background:var(--shot) center/cover no-repeat;
  opacity:.62;
}
/* lighter behind the heading, stronger behind the body copy, so the
   building stays readable without the text losing contrast */
.card::after{
  content:"";
  position:absolute;inset:0;z-index:-1;
  background:linear-gradient(180deg,
    rgba(255,255,255,.58) 0%,
    rgba(255,255,255,.72) 38%,
    rgba(255,255,255,.78) 100%);
}
.card h3{
  margin:0 0 .7rem;
  font-family:var(--display);
  font-weight:700;
  font-size:20px;
  line-height:1.4;
  color:var(--slate);
}
.card p{
  margin:0 0 1.1rem;
  font-family:var(--ui);
  font-size:var(--fs-body);
  font-weight:400;
  line-height:1.4;
  color:var(--slate);
}
.card__a{
  margin-top:auto;
  align-self:flex-start;
  font-family:var(--ui);
  font-size:var(--fs-ui);
  font-weight:500;
  color:var(--grey);
  text-decoration:none;
  border-bottom:1px solid var(--violet);
  padding-bottom:1px;
}
.card__a:hover{color:var(--violet)}

/* ── footer ──────────────────────────────────────────────── */

.foot{
  position:relative;
  margin-top:clamp(3rem,7vw,5rem);
  padding:clamp(5rem,10vw,7rem) 0 2rem;
  background:var(--violet);
  color:#FFF;
}
/* the original carries a 130deg purple-to-white wash across this band */
.foot::before{
  content:"";
  position:absolute;inset:0;
  pointer-events:none;
  background:linear-gradient(130deg,rgba(255,255,255,0) 32%,rgba(255,255,255,.22) 89%);
}
/* scoped to the content blocks only - a blanket `.foot > *` would also match
   .wave--foot and override its position:absolute, dropping the divider into
   normal flow */
.foot__in,
.foot__copy{position:relative;z-index:1}
.foot__in{
  display:grid;gap:2.5rem;
  align-items:center;
}
@media (min-width:860px){
  .foot__in{grid-template-columns:1.25fr .75fr;gap:4rem}
}
.foot__h{
  margin:0 0 1rem;
  font-family:var(--display);
  font-weight:300;
  font-size:var(--fs-display);
  line-height:1.2;
}
.foot__lead{
  margin:0 0 1.5rem;
  font-family:var(--ui);
  font-size:var(--fs-eyebrow);
  font-weight:400;
  line-height:1.4;
  color:#FFF;
}

.foot__dl{
  margin:0 0 1.9rem;
  font-family:var(--display);
  font-size:var(--fs-body);
  font-weight:400;
  line-height:1.2;
}
.foot__dl>div{display:flex;gap:.6rem;margin-bottom:.2rem}
.foot__dl dt{flex:0 0 auto;color:rgba(255,255,255,.8)}
.foot__dl dd{margin:0}
.foot__dl a{text-decoration:none;border-bottom:1px solid rgba(255,255,255,.5)}
.foot__dl a:hover{border-bottom-color:#FFF}

/* #FFFFFF2E in the original - a light panel carrying dark text */
.foot__card{
  background:rgba(255,255,255,.18);
  border-radius:18px;
  padding:2.1rem 1.6rem;
  text-align:center;
}
.foot__card-t{
  margin:0 0 .8rem;
  font-family:var(--display);
  font-size:22px;
  font-weight:700;
  line-height:1;
  letter-spacing:-0.81px;
  color:#3C3C3C;
}
.foot__card-n{
  margin:0;
  font-family:var(--display);
  font-size:var(--fs-body);
  font-weight:300;
  line-height:1.3;
  letter-spacing:-0.45px;
  color:#000;
}
.foot__card-n a{
  font-family:var(--num);
  font-size:18px;
  font-weight:400;
  color:#000;
  text-decoration:none;
  border-bottom:1px solid rgba(0,0,0,.35);
}
.foot__card-n a:hover{border-bottom-color:#000}

.foot__copy{
  max-width:var(--wrap);
  margin:clamp(2.5rem,5vw,3.5rem) auto 0;
  padding:1.3rem clamp(1.25rem,5vw,2rem) 0;
  border-top:1px solid rgba(255,255,255,.22);
  font-size:12px;
  color:rgba(255,255,255,.72);
}

/* ── phone call bar ──────────────────────────────────────── */

.callbar{
  position:fixed;left:0;right:0;bottom:0;z-index:50;
  display:grid;grid-template-columns:1.3fr 1fr;
  box-shadow:0 -2px 14px rgba(61,68,89,.22);
}
.callbar__a{
  padding:.95rem .5rem;
  text-align:center;text-decoration:none;
  font-size:14px;font-weight:600;letter-spacing:.06em;
}
.callbar__a--tel{background:var(--violet);color:#FFF}
.callbar__a--wa{background:var(--slate);color:#FFF}

@media (min-width:860px){
  .callbar{display:none}
}
@media (max-width:859px){
  .foot__copy{padding-bottom:4.2rem}
}

/* ── print ───────────────────────────────────────────────── */

@media print{
  .callbar,.wave,.pill,.hero__media,.hero__veil{display:none !important}
  .hero,.foot{background:#FFF !important;color:#000 !important}
  .hero__title,.hero__eyebrow,.hero__sub,.foot__h,.foot__lead,
  .foot__dl,.foot__card-t,.foot__card-n{color:#000 !important}
  .hero{min-height:auto}
  .hero__in{padding:1.5rem 0}
  body{font-size:11pt}
}
