/* ==========================================================================
   Catalog: product cards, category pages, product pages, spec sheets, compare
   ========================================================================== */

/* product card */
.pcard {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; color: var(--text);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease); min-width: 0; border: 1px solid transparent;
}
.pcard:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 10px 34px rgba(0,0,0,.12); }
.pcard__img { aspect-ratio: 6 / 5; background: linear-gradient(180deg, var(--paper), #f0f0f4); display: flex; align-items: center; justify-content: center; padding: 8px; overflow: hidden; }
.pcard__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ease); }
.pcard:hover .pcard__img img { transform: scale(1.04); }
.pcard__body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; }
.pcard__kind { font-size: 12px; color: var(--text-3); letter-spacing: 0; text-transform: uppercase; font-weight: 500; }
.pcard h3 { font-size: 19px; line-height: 1.2; letter-spacing: -.01em; margin-top: 2px; }
.pcard p { font-size: 14px; line-height: 1.35; color: var(--text-2); margin: 2px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__meta { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text); font-weight: 500; }
.pcard__meta span + span::before { content: "\00b7"; margin-right: 10px; color: var(--text-3); }
.pcard--photo .pcard__img { background: var(--paper-2); padding: 0; }
.pcard__img img.is-photo { object-fit: cover; }

/* horizontal scroller */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 290px); gap: 16px; overflow-x: auto; padding: 4px 4px 24px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.hscroll > * { scroll-snap-align: start; }

/* ---- category page ------------------------------------------------------- */
.cat-hero { background: var(--paper); text-align: center; padding: 64px 24px 0; overflow: hidden; }
.cat-hero__img { max-width: 780px; margin: 20px auto 0; }
.cat-hero__img img { margin: 0 auto; max-height: 420px; width: auto; max-width: 100%; object-fit: contain; filter: drop-shadow(0 28px 36px rgba(0,0,0,.14)); }
.cat-toolbar { position: sticky; top: calc(var(--nav-h) + 52px); z-index: 700; background: rgba(255,255,255,.88); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line-soft); padding: 12px 0; }
.cat-toolbar__inner { width: min(var(--wide), calc(100% - 48px)); margin: 0 auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 10px; padding: 2px; }
.seg button, .seg a { border: 0; background: transparent; padding: 6px 14px; font-size: 13px; font-weight: 500; border-radius: 8px; cursor: pointer; color: var(--text); white-space: nowrap; }
.seg .is-active { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.14); }
.seg a:hover { text-decoration: none; }
.cat-toolbar .input { max-width: 260px; padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.cat-toolbar .select { width: auto; padding: 7px 34px 7px 12px; font-size: 14px; border-radius: 10px; }
.cat-count { margin-left: auto; color: var(--text-3); font-size: 13px; }

.yearblock { margin-top: 56px; }
.yearblock:first-child { margin-top: 0; }
.yearblock__head { display: flex; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 24px; }
.yearblock__year { font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.yearblock__note { color: var(--text-3); font-size: 14px; }

.famblock { margin-bottom: 44px; }
.famblock h3 { font-size: 28px; letter-spacing: -.02em; margin-bottom: 4px; }
.famblock .muted { margin-bottom: 18px; font-size: 14px; }

/* history rail */
.rail { position: relative; padding-left: 36px; }
.rail::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(#d2d2d7, #d2d2d7); border-radius: 2px; }
.rail__item { position: relative; margin-bottom: 18px; }
.rail__dot { position: absolute; left: -35px; top: 22px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--btn); }
.rail__item.is-discontinued .rail__dot { border-color: #aeaeb2; }
.railcard { display: grid; grid-template-columns: 180px 1fr auto; gap: 20px; align-items: center; background: #fff; border-radius: var(--radius); padding: 14px 24px 14px 14px; color: var(--text); border: 1px solid var(--line-soft); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.railcard:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateX(3px); }
.railcard img { width: 180px; height: 130px; object-fit: contain; background: var(--paper-2); border-radius: 12px; padding: 4px; }
.railcard img.is-photo { object-fit: cover; padding: 0; }
.railcard h3 { font-size: 21px; letter-spacing: -.012em; }
.railcard p { margin: 4px 0 8px; color: var(--text-2); font-size: 15px; line-height: 1.35; }
.railcard__facts { display: flex; gap: 8px; flex-wrap: wrap; }
.railcard__date { text-align: right; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.railcard__date strong { display: block; color: var(--text); font-size: 15px; font-weight: 600; }
@media (max-width: 760px) { .railcard { grid-template-columns: 96px 1fr; padding: 10px; } .railcard img { width: 96px; height: 80px; } .railcard__date { display: none; } .rail { padding-left: 26px; } .rail__dot { left: -26px; width: 16px; height: 16px; } .rail::before { left: 6px; } }

/* sortable table view */
.tablewrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line-soft); background: #fff; }
table.dtable { width: 100%; border-collapse: collapse; font-size: 14px; letter-spacing: -.01em; }
.dtable th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); padding: 12px 14px; background: var(--paper); border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; }
.dtable th.is-sorted::after { content: " \2191"; }
.dtable th.is-sorted.desc::after { content: " \2193"; }
.dtable td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover { background: var(--paper); }
.dtable td.name { font-weight: 600; white-space: nowrap; }
.dtable td.name a { color: var(--text); }
.dtable td.name img { width: 44px; height: 36px; object-fit: contain; display: inline-block; vertical-align: middle; margin-right: 10px; }
.dtable td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dtable .check { width: 36px; }

/* ---- product page -------------------------------------------------------- */
.pp-hero { background: var(--paper); padding: 56px 0 24px; overflow: hidden; }
.pp-hero__grid { width: min(1100px, calc(100% - 48px)); margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.pp-hero__media { position: relative; }
.pp-hero__media img { width: 100%; max-height: 520px; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0,0,0,.14)); transition: opacity .3s; }
.pp-hero__media img.is-photo { border-radius: 24px; filter: none; box-shadow: 0 20px 60px rgba(0,0,0,.14); object-fit: cover; aspect-ratio: 4 / 3; }
.photo-credit { font-size: 11px; color: var(--text-3); margin-top: 10px; line-height: 1.35; }
.photo-credit a { color: var(--text-3); text-decoration: underline; }
.pp-hero__copy .eyebrow { margin-bottom: 8px; }
.pp-hero__copy h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.05; letter-spacing: -.02em; }
.pp-hero__tagline { font-size: clamp(19px, 2.2vw, 26px); line-height: 1.2; margin: 14px 0 18px; color: var(--text-2); font-weight: 500; }
.pp-hero__facts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.pp-price { font-size: 17px; margin-bottom: 18px; }
.pp-price strong { font-size: 28px; letter-spacing: -.02em; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); position: relative; }
.swatch::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; transition: border-color .2s; }
.swatch:hover::after { border-color: rgba(0,0,0,.2); }
.swatch.is-active::after { border-color: var(--btn); }
.swatch-name { font-size: 14px; color: var(--text-2); margin-bottom: 18px; min-height: 20px; }
.pp-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
@media (max-width: 860px) { .pp-hero__grid { grid-template-columns: 1fr; text-align: center; } .pp-hero__facts, .pp-actions, .swatches { justify-content: center; } }

.pp-section { padding: 72px 0; }
.pp-section h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.012em; margin-bottom: 24px; }
.pp-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .pp-two { grid-template-columns: 1fr; gap: 28px; } }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.highlights li { background: var(--bg-alt); border-radius: 14px; padding: 14px 16px 14px 46px; position: relative; font-size: 16px; line-height: 1.35; }
.highlights li::before { content: ""; position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; border-radius: 50%; background: var(--btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.significance { background: linear-gradient(135deg, var(--paper-2), #ececf1); border-radius: var(--radius); padding: 24px 26px; margin-top: 24px; }
.significance h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 8px; font-weight: 600; }
.significance p { margin: 0; font-size: 18px; line-height: 1.4; }

.factbox { background: var(--bg-alt); border-radius: var(--radius); padding: 8px 22px; }
.factbox dl { margin: 0; }
.factbox .fact { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.factbox .fact:last-child { border-bottom: 0; }
.factbox dt { color: var(--text-2); }
.factbox dd { margin: 0; font-weight: 500; text-align: right; }

/* spec sheet (like apple tech specs) */
.specs { margin-top: 8px; }
.specgroup { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 30px 0; border-top: 1px solid var(--line); }
.specgroup:first-child { border-top: 0; }
.specgroup h3 { font-size: 24px; letter-spacing: -.01em; }
.specgroup dl { margin: 0; display: grid; gap: 18px; }
.specgroup dt { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.specgroup dd { margin: 0; font-size: 17px; line-height: 1.4; }
@media (max-width: 760px) { .specgroup { grid-template-columns: 1fr; gap: 12px; } }

.nextprev { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nextprev a { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: var(--radius); padding: 14px 20px; color: var(--text); border: 1px solid var(--line-soft); }
.nextprev a:hover { text-decoration: none; box-shadow: var(--shadow); }
.nextprev a:last-child { justify-content: flex-end; text-align: right; }
.nextprev img { width: 84px; height: 64px; object-fit: contain; }
.nextprev small { display: block; color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.nextprev strong { font-size: 17px; }
@media (max-width: 640px) { .nextprev { grid-template-columns: 1fr; } }

/* ---- compare ------------------------------------------------------------- */
.cmp-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 860px) { .cmp-picker { grid-template-columns: repeat(2, 1fr); } }
.cmp-picker .select { font-size: 15px; padding: 11px 36px 11px 12px; border-radius: 12px; }
.cmp-wrap { overflow-x: auto; margin-top: 8px; }
table.cmp { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; table-layout: fixed; }
.cmp th, .cmp td { padding: 14px 16px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 15px; line-height: 1.4; }
.cmp thead th { position: sticky; top: calc(var(--nav-h) + 52px); background: rgba(255,255,255,.95); z-index: 5; text-align: center; padding-top: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cmp thead th img { width: 100%; max-width: 180px; height: 130px; object-fit: contain; margin: 0 auto 8px; }
.cmp thead th img.is-photo { object-fit: cover; border-radius: 12px; }
.cmp thead th a { color: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.cmp thead th .price { display: block; font-size: 14px; color: var(--text-2); font-weight: 400; margin-top: 2px; }
.cmp tbody th { width: 190px; font-size: 13px; color: var(--text-2); font-weight: 500; background: #fff; }
.cmp tr.grouprow th { background: var(--bg-alt); color: var(--text); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding: 10px 16px; }
.cmp td.is-diff { background: #f1f7ff; }
.cmp td.is-best { background: #eaf8ee; font-weight: 600; }
.cmp td .na { color: var(--text-3); }
.cmp-legend { display: flex; gap: 18px; font-size: 13px; color: var(--text-2); margin: 10px 0 0; flex-wrap: wrap; }
.cmp-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.cmp-remove { font-size: 12px; color: var(--text-3); background: none; border: 0; cursor: pointer; margin-top: 6px; }
.cmp-remove:hover { color: var(--red); }
.cmp-empty { text-align: center; padding: 60px 0; color: var(--text-2); }

/* compare bar (floating) */
.cmpbar { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); transition: transform .4s var(--ease); z-index: 700; background: rgba(29,29,31,.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: #fff; border-radius: 18px; padding: 10px 12px 10px 18px; display: flex; gap: 14px; align-items: center; box-shadow: 0 14px 50px rgba(0,0,0,.35); max-width: calc(100% - 24px); }
.cmpbar.is-open { transform: translate(-50%, 0); }
.cmpbar__items { display: flex; gap: 8px; align-items: center; overflow: auto; }
.cmpbar__item { display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,.12); padding: 4px 6px 4px 10px; border-radius: 980px; font-size: 13px; white-space: nowrap; }
.cmpbar__item button { background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.cmpbar .btn { white-space: nowrap; }

/* hub */
.hubgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .hubgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hubgrid { grid-template-columns: 1fr; } }
.hubcard { background: #fff; border-radius: var(--radius); padding: 24px; text-align: center; color: var(--text); border: 1px solid var(--line-soft); }
.hubcard:hover { text-decoration: none; box-shadow: var(--shadow); }
.hubcard img { height: 130px; margin: 0 auto 12px; object-fit: contain; }
.hubcard h3 { font-size: 22px; }
.hubcard p { color: var(--text-2); font-size: 14px; margin: 4px 0 0; }

/* ---- home page bits ------------------------------------------------------ */
.home-hero { padding-top: 88px; }
.home-hero__lineup { display: flex; justify-content: center; align-items: flex-end; gap: clamp(0px, 1vw, 12px); margin: 44px auto 0; width: min(1180px, 100%); padding: 0 12px; }
.home-hero__lineup img { flex: 1 1 0; min-width: 0; max-width: 200px; max-height: 180px; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0,0,0,.45)); opacity: 0; animation: lineup-in .9s var(--ease) forwards; animation-delay: calc(var(--i) * .08s + .15s); }
@keyframes lineup-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .home-hero__lineup img:nth-child(n+5) { display: none; } }
.topstories { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.topstories__side { display: grid; gap: 20px; }
@media (max-width: 900px) { .topstories { grid-template-columns: 1fr; } }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud a:hover { background: #e6dccb; text-decoration: none; }
.peoplestrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 24px; }
.pperson { text-align: center; color: var(--text-inv); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.pperson:hover { text-decoration: none; }
.pperson img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; transition: transform .4s var(--ease); background: #222; }
.pperson:hover img { transform: scale(1.06); }
.pperson strong { font-size: 16px; }
.pperson span { font-size: 13px; color: #a1a1a6; line-height: 1.3; }
.statsbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; text-align: center; }
.statsbar strong { display: block; font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.statsbar span { color: var(--text-2); font-size: 15px; }
@media (max-width: 640px) { .statsbar { grid-template-columns: repeat(2, 1fr); row-gap: 28px; } }

/* leadership + timeline pages */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.personcard { background: #fff; border-radius: var(--radius); overflow: hidden; color: var(--text); display: flex; flex-direction: column; border: 1px solid var(--line-soft); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.personcard:hover { text-decoration: none; transform: translateY(-4px); box-shadow: 0 10px 34px rgba(0,0,0,.12); }
.personcard img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper-2); }
.personcard__body { padding: 16px 18px 20px; }
.personcard h3 { font-size: 19px; letter-spacing: -.01em; }
.personcard .role { font-size: 13px; color: var(--text-2); margin: 3px 0 8px; line-height: 1.3; }
.personcard .sum { font-size: 14px; color: var(--text-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.person-hero { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center; width: min(1000px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 24px; }
.person-hero img { width: 280px; height: 280px; border-radius: 50%; object-fit: cover; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.person-hero h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.05; letter-spacing: -.02em; }
.person-hero .role { font-size: 22px; color: var(--text-2); margin: 10px 0 14px; }
.quote { font-size: clamp(22px, 3vw, 32px); line-height: 1.25; font-weight: 600; letter-spacing: -.015em; position: relative; padding-left: 0; }
.quote::before { content: "\201C"; display: block; font-size: 72px; line-height: .6; color: #c7c7cc; margin-bottom: 8px; }
@media (max-width: 760px) { .person-hero { grid-template-columns: 1fr; text-align: center; gap: 24px; } .person-hero img { margin: 0 auto; width: 200px; height: 200px; } }

.tl-filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 36px; }
.tl-filters button { border: 0; background: var(--paper-2); padding: 8px 16px; border-radius: 980px; cursor: pointer; font-size: 14px; font-weight: 500; }
.tl-filters button.is-active { background: var(--text); color: #fff; }
.tl-decade { margin: 56px 0 8px; font-size: 56px; font-weight: 700; letter-spacing: -.04em; color: #d2d2d7; line-height: 1; }
.tl-item { display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line-soft); }
.tl-item time { font-size: 15px; font-weight: 600; color: var(--text-2); padding-top: 4px; }
.tl-item h3 { font-size: 21px; letter-spacing: -.01em; margin-bottom: 4px; }
.tl-item p { margin: 0; color: var(--text-2); font-size: 16px; }
.tl-item .badge { margin-left: 8px; vertical-align: 2px; }
@media (max-width: 640px) { .tl-item { grid-template-columns: 1fr; gap: 4px; } }
