/* Starsport - hand-written stylesheet. Light, product-first, fully responsive. */

:root {
  --orange:      #ff5a1f;
  --orange-dark: #e0430c;
  --orange-soft: #fff1ea;

  --ink:    #14161a;
  --ink-2:  #3d434d;
  --muted:  #6b7280;
  --line:   #e7e9ee;
  --line-2: #f1f3f6;
  --bg:     #ffffff;
  --surface:#f8f9fb;

  --wrap: 1180px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 26, .05);
  --shadow-md: 0 10px 30px -12px rgba(20, 22, 26, .18);
  --shadow-lg: 0 26px 60px -22px rgba(20, 22, 26, .28);

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;

  --step: clamp(1rem, .96rem + .18vw, 1.0625rem);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step);
  line-height: 1.85;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -.005em; margin: 0; font-weight: 700; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

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

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }

.wordmark { display: inline-flex; align-items: baseline; gap: .45rem; margin-right: auto; }
.wordmark strong {
  font-size: 1.32rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--ink);
}
.wordmark strong::first-letter { color: var(--orange); }
.wordmark span { font-size: .92rem; color: var(--muted); letter-spacing: .06em; }

.site-nav ul { list-style: none; display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; }
.site-nav > ul > li > a {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .55rem .8rem; border-radius: 999px;
  font-size: .95rem; font-weight: 600; color: var(--ink-2);
  transition: background .18s, color .18s;
}
.site-nav > ul > li > a:hover { background: var(--line-2); color: var(--ink); }
.site-nav > ul > li.is-active > a { color: var(--orange); }
.chev { width: .58em; flex: none; opacity: .55; }

.has-sub { position: relative; }
.sub {
  position: absolute; top: calc(100% + .35rem); left: 0;
  min-width: 13rem; padding: .4rem !important;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: block !important; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.sub li { width: 100%; }
.sub a {
  display: block; padding: .5rem .7rem; border-radius: 9px;
  font-size: .92rem; color: var(--ink-2); white-space: nowrap;
}
.sub a:hover { background: var(--orange-soft); color: var(--orange-dark); }
.sub a.is-active { color: var(--orange); font-weight: 600; }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 10px;
  background: none; border: 1px solid var(--line); border-radius: 11px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .22s, opacity .18s;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 68px 0 auto; max-height: calc(100dvh - 68px); overflow-y: auto;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .6rem clamp(1.1rem, 4vw, 2.5rem) 1.4rem;
    display: none; box-shadow: var(--shadow-md);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav > ul > li > a { padding: .85rem .25rem; font-size: 1.02rem; border-radius: 0; }
  .site-nav > ul > li + li { border-top: 1px solid var(--line-2); }
  .chev { display: none; }
  .sub {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; padding: 0 0 .5rem .25rem !important;
  }
  .sub a { padding: .5rem .25rem; color: var(--muted); }
}

/* ------------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--surface) 100%); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 46rem; height: 46rem;
  background: radial-gradient(circle, rgba(255, 90, 31, .16), transparent 62%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding-block: clamp(2.5rem, 7vw, 5.5rem);
}
.eyebrow {
  margin: 0 0 1rem; font-size: .82rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--orange);
}
.hero h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(2.1rem, 1.2rem + 4.2vw, 3.9rem);
  font-weight: 800; letter-spacing: -.025em; line-height: 1.18;
}
.hero h1 em { font-style: normal; color: var(--orange); }
.lede { margin: 0 0 1.9rem; max-width: 34rem; color: var(--ink-2); font-size: 1.05rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.hero-media { position: relative; }
.hero-media img {
  width: 100%; max-width: 33rem; margin-inline: auto;
  filter: drop-shadow(0 32px 40px rgba(20, 22, 26, .22));
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .78rem 1.6rem; border-radius: 999px;
  font-weight: 700; font-size: .97rem; border: 1.5px solid transparent;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }

/* ----------------------------------------------------------------- strip */
.strip { border-block: 1px solid var(--line); background: #fff; }
.strip-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.6rem, 3.5vw, 2.4rem);
}
.strip-grid > div { display: flex; flex-direction: column; gap: .2rem; }
.strip-grid strong { font-size: 1.02rem; }
.strip-grid strong::before {
  content: ""; display: block; width: 26px; height: 3px; border-radius: 2px;
  background: var(--orange); margin-bottom: .7rem;
}
.strip-grid span { font-size: .92rem; color: var(--muted); line-height: 1.75; }

/* ---------------------------------------------------------------- blocks */
.block { padding-block: clamp(2.6rem, 6vw, 4.75rem); }
.block-alt { background: var(--surface); border-top: 1px solid var(--line); }
.block-head { margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.block-head h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.1rem); letter-spacing: -.02em; }
.block-head p { margin: .5rem 0 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.2vw, 1.6rem); }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
/* the ratio lives on the image, not the box: a percentage height inside an
   auto-sized track cannot resolve, which let tall photos escape the frame */
.card-media { background: var(--surface); overflow: hidden; padding: 1.1rem; }
.card-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
  transition: transform .35s ease;
}
.card:hover .card-media img { transform: scale(1.045); }
/* text-only card: an orange rule stands in for the missing picture */
.card-plain { background: var(--surface); }
.card-plain .card-body { padding-top: 1.5rem; }
.card-plain h3::before {
  content: ""; display: block; width: 28px; height: 3px; border-radius: 2px;
  background: var(--orange); margin-bottom: .8rem;
}
.card-body { padding: 1.15rem 1.3rem 1.35rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card-body h3 { font-size: 1.06rem; }
.card-body p { margin: 0; font-size: .92rem; color: var(--muted); line-height: 1.7; }
.card-more {
  margin-top: auto; padding-top: .6rem;
  font-size: .88rem; font-weight: 700; color: var(--orange);
}
.card-more::after { content: " →"; }

/* ------------------------------------------------------------------ news */
.news-split { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-list li { border-bottom: 1px solid var(--line); }
.news-list a {
  display: flex; gap: 1.1rem; align-items: baseline; padding: .95rem .2rem;
  transition: padding-inline-start .2s, color .18s;
}
.news-list a:hover { padding-inline-start: .6rem; color: var(--orange); }
.news-list time { flex: none; font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.post-list li {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.post-list li:hover { border-color: transparent; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-list a { display: block; padding: 1.25rem 1.4rem; }
.post-list time { font-size: .84rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-list h2 { margin: .3rem 0 .35rem; font-size: 1.12rem; }
.post-list p { margin: 0; font-size: .93rem; color: var(--muted); }

/* ------------------------------------------------------------- page head */
.page-head {
  padding-block: clamp(1.8rem, 4.5vw, 3.2rem) clamp(1.2rem, 3vw, 2rem);
  background: linear-gradient(180deg, var(--orange-soft), #fff);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.7rem); letter-spacing: -.025em; }
.page-lede { margin: .7rem 0 0; color: var(--ink-2); max-width: 46rem; }
.post-date { display: block; margin-bottom: .4rem; font-size: .88rem; color: var(--muted); }

.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--orange); }
.crumbs > *:not(:last-child)::after { content: "/"; margin-inline-start: .45rem; opacity: .5; }
.crumbs span { color: var(--ink-2); }

.pills { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; }
.pills a {
  padding: .42rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: .89rem; font-weight: 600; color: var(--ink-2);
  transition: background .16s, color .16s, border-color .16s;
}
.pills a:hover { border-color: var(--orange); color: var(--orange); }
.pills a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ----------------------------------------------------------------- prose */
/* Text keeps a readable measure in column 1; galleries span the full width so
   product photos are not squeezed into the text column. */
.prose { display: grid; grid-template-columns: min(62ch, 100%) minmax(0, 1fr); }
.prose > * { grid-column: 1; }
.prose > .gallery { grid-column: 1 / -1; }
.prose p { margin: 0 0 1.15em; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--orange-dark); text-decoration: underline; text-underline-offset: .18em; }
.prose h2 { margin: 2em 0 .6em; font-size: 1.3rem; }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-inline-start: 1.4em; }
.prose li { margin-bottom: .3em; }

.gallery {
  max-width: none; margin: 1.8rem 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: clamp(.8rem, 2vw, 1.4rem);
}
.gallery figure {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: .9rem; background: #fff; }
.gallery figcaption {
  padding: .6rem .85rem .75rem; font-size: .86rem; color: var(--muted);
  border-top: 1px solid var(--line); text-align: center;
}
.gallery-single { grid-template-columns: minmax(0, 30rem); }

/* --------------------------------------------------------------- contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.4rem, 3.5vw, 2.6rem); align-items: start; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow-sm); }
.contact-card dl { margin: 0; display: grid; grid-template-columns: 5.2rem 1fr; gap: .55rem 1rem; align-items: baseline; }
.contact-card dt { font-size: .85rem; color: var(--muted); font-weight: 600; }
.contact-card dd { margin: 0; }
.contact-card dd.big { font-size: 1.28rem; font-weight: 700; letter-spacing: .01em; }
.contact-card small { color: var(--muted); }
.contact-card a { color: var(--orange-dark); text-decoration: underline; text-underline-offset: .18em; }
.contact-map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }

/* Click-to-load map: nothing reaches Google until the visitor asks for it,
   which is why the site needs no cookie notice. */
.map-embed { border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.prose > .map-embed { grid-column: 1 / -1; margin: 1.8rem 0; border: 1px solid var(--line); }
.map-ph {
  display: flex; flex-direction: column; align-items: flex-start; gap: .55rem;
  padding: clamp(1.3rem, 3vw, 2.1rem);
  min-height: clamp(15rem, 32vw, 20rem); justify-content: center;
  background:
    radial-gradient(circle at 22% 28%, var(--orange-soft), transparent 55%),
    var(--surface-2, var(--surface));
  background-color: var(--surface);
}
.map-addr { margin: 0; font-weight: 700; font-size: 1.05rem; }
.map-note { margin: 0 0 .5rem; font-size: .85rem; color: var(--muted); max-width: 30rem; line-height: 1.7; }
.map-ph .btn { align-self: flex-start; }
.map-alt { font-size: .86rem; color: var(--muted); text-decoration: underline; text-underline-offset: .18em; }
.map-alt:hover { color: var(--orange-dark); }
.map-embed iframe { display: block; width: 100%; height: clamp(20rem, 42vw, 27rem); border: 0; }
.note { margin: 1rem 0 0; font-size: .9rem; color: var(--muted); }

/* ----------------------------------------------------------------- pager */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pager a {
  display: flex; flex-direction: column; gap: .25rem; padding: 1rem 1.2rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  font-weight: 600; transition: border-color .18s, color .18s;
}
.pager a:hover { border-color: var(--orange); color: var(--orange); }
.pager span { font-size: .8rem; color: var(--muted); font-weight: 500; }
.pager-next { text-align: right; grid-column: 2; }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: auto; background: var(--ink); color: #cbd0d8; padding-block: clamp(2.2rem, 5vw, 3.4rem) 1.2rem; }
.site-footer .wordmark strong { color: #fff; }
.site-footer .wordmark span { color: #8b929e; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(1.6rem, 4vw, 3.5rem); }
.footer-tag { margin: .8rem 0 1.2rem; color: #8b929e; font-size: .92rem; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .93rem; }
.footer-contact .lbl { display: inline-block; width: 3.1rem; color: #7b828e; font-size: .84rem; }
.site-footer a { color: #cbd0d8; }
.site-footer a:hover { color: var(--orange); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.footer-cols h3 { font-size: .88rem; color: #fff; margin-bottom: .7rem; letter-spacing: .04em; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .38rem; }
.footer-cols a { font-size: .88rem; color: #979ea9; }
.footer-base { margin-top: 2.2rem; padding-top: 1.1rem; border-top: 1px solid #262a31; color: #6f7783; }

/* ----------------------------------------------------------- breakpoints */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .hero-media { order: 1; }
  .hero-media img { max-width: 22rem; }
  .lede { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .news-split { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .strip-grid { grid-template-columns: 1fr; gap: 1.3rem; }
  .cards { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; text-align: left; }
  .contact-card dl { grid-template-columns: 1fr; gap: .1rem 0; }
  .contact-card dt { margin-top: .7rem; }
  .news-list a { flex-direction: column; gap: .15rem; }
}
