/* ==========================================================================
   TYCherry.com — static rebuild
   Single shared stylesheet for all pages.
   ========================================================================== */

:root {
  --gold:        #EDA900;
  --gold-deep:   #C08600;
  --gold-soft:   #FFF6DF;
  --ink:         #1A1F2B;
  --body:        #46505F;
  --muted:       #7B8794;
  --white:       #FFFFFF;
  --bg-alt:      #F6F7F9;
  --bg-deep:     #14181F;
  --line:        #E4E7EC;

  --shadow-sm:   0 1px 3px rgba(20,24,31,.08);
  --shadow:      0 6px 24px rgba(20,24,31,.10);
  --shadow-lg:   0 18px 60px rgba(20,24,31,.22);

  --radius:      10px;
  --radius-lg:   16px;

  --max-w:       1280px;
  --read-w:      680px;
  --header-h:    78px;

  --font-ui:     'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:   'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* --- reset ---------------------------------------------------------------- */

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .6em;
  font-weight: 700;
}

p { margin: 0 0 1.15em; }

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

.wrap { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--radius) var(--radius); transition: top .2s;
}
.skip-link:focus { top: 0; }

/* --- header --------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.logo { display: flex; align-items: center; }
.logo img { height: 46px; width: auto; }

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: 10px; border-radius: var(--radius);
  color: var(--ink);
}
.nav-toggle:hover { background: var(--bg-alt); }
.nav-toggle svg { display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 8px;
}

.nav a {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink);
  padding: 10px 16px; border-radius: var(--radius);
  transition: background .18s, color .18s;
}
.nav a:hover { background: var(--gold-soft); color: var(--gold-deep); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--gold-deep); background: var(--gold-soft); }

/* --- carousel ------------------------------------------------------------- */

.carousel {
  position: relative;
  background: var(--bg-deep);
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  height: clamp(420px, 80vh, 760px);
  position: relative;
  overflow: hidden;
}

/* An out-of-focus, enlarged copy of the same photo fills the space either side
   of it, so a portrait shot sits in a wash of its own colours instead of dead
   navy. The url comes from a --shot custom property set on each slide.
   inset + scale push the blurred edges out of view.
   NOTE: the --shot url is written relative to THIS stylesheet (../images/...),
   not to the page, because a url() inside a custom property resolves against
   the sheet that uses the var(). */
.carousel-slide::before {
  content: "";
  position: absolute; inset: -8%;
  background-image: var(--shot);
  background-size: cover;
  background-position: center;
  filter: blur(34px) saturate(1.3) brightness(.8);
  transform: scale(1.14);
  z-index: 0;
}

/* contain, not cover: the whole photo shows at its own proportions and is
   never scaled past native size. */
.carousel-slide img {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: contain; object-position: center;
}

.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.88); color: var(--ink);
  border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: var(--shadow);
  transition: background .18s, transform .18s;
}
.carousel-btn:hover { background: #fff; transform: translateY(-50%) scale(1.07); }
.carousel-btn.prev { left: 18px; }
.carousel-btn.next { right: 18px; }

.carousel-dots {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3;
  display: flex; justify-content: center; gap: 9px;
}
.carousel-dots button {
  width: 10px; height: 10px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.5);
  transition: background .2s, transform .2s;
}
.carousel-dots button:hover { background: rgba(255,255,255,.8); }
.carousel-dots button[aria-current="true"] { background: var(--gold); transform: scale(1.35); }

/* --- page sections -------------------------------------------------------- */

.section { padding: 72px 0; }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 10px;
}

.section-title {
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.rule {
  width: 56px; height: 3px; border: 0; border-radius: 2px;
  background: var(--gold); margin: 0 0 26px;
}

/* --- home: three-column layout -------------------------------------------- */

.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  align-items: start;
}

@media (min-width: 1080px) {
  .home-grid {
    grid-template-columns: minmax(200px, 1fr) minmax(0, 2.3fr) minmax(200px, 1fr);
    gap: 56px;
  }
}

.rail .section-title { font-size: 1.25rem; }
.rail > p { color: var(--muted); font-size: 15.5px; }

.photo-list { display: grid; gap: 26px; margin-top: 26px; }

.photo {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.photo img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  transition: transform .4s ease;
}
.photo:hover img { transform: scale(1.03); }
.photo figcaption {
  padding: 12px 14px 14px;
  font-size: 14.5px; line-height: 1.5;
  color: var(--muted);
}

/* on mobile the rails read better as a horizontal-ish grid */
@media (max-width: 1079px) {
  .photo-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* --- essay ---------------------------------------------------------------- */

.essay { max-width: var(--read-w); margin: 0 auto; }
.essay .section-title { text-align: center; }
.essay .rule { margin: 0 auto 32px; }
.essay p { font-size: 17.5px; }

.essay-lead {
  font-size: 19px;
  color: var(--ink);
}

.essay h3 {
  font-size: 1.05rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold-deep);
  margin: 44px 0 14px;
}

.namecard {
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 22px;
  margin: 0 0 32px;
  font-family: var(--font-ui);
  font-size: 17px; font-weight: 600;
  color: var(--ink);
}

.pullquote {
  margin: 34px 0;
  padding: 22px 26px;
  border-left: 4px solid var(--gold);
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-ui);
  font-size: 19px; font-style: italic; font-weight: 500;
  line-height: 1.55; color: var(--ink);
}
.pullquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--muted); }

.traits {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 30px 0;
}
.trait {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; background: var(--white);
}
.trait h4 {
  font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-deep); margin: 0 0 8px;
}
.trait p { margin: 0; font-size: 16px; }

.signoff {
  margin-top: 36px; padding-top: 26px;
  border-top: 1px solid var(--line);
  font-family: var(--font-ui);
  font-size: 18px; font-weight: 600; color: var(--ink);
}

/* --- more me gallery ------------------------------------------------------ */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.gallery img {
  width: 100%; aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition: transform .35s ease, box-shadow .35s ease;
}
.gallery img:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* --- lightbox ------------------------------------------------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(12,14,18,.94);
  display: none;
  align-items: center; justify-content: center;
  padding: 40px 20px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 82vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.lightbox-cap {
  margin-top: 16px; text-align: center;
  color: #D6DBE2; font-size: 15px; max-width: 640px;
}
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.lightbox-close {
  position: absolute; top: 18px; right: 20px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff;
  border: 0; border-radius: 50%; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.24); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; display: grid; place-items: center;
  background: rgba(255,255,255,.12); color: #fff;
  border: 0; border-radius: 50%; cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255,255,255,.24); }
.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

/* --- blog ----------------------------------------------------------------- */

.page-head {
  padding: 62px 0 44px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.page-head h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); letter-spacing: .03em; text-transform: uppercase; }
.page-head p { margin: 0; color: var(--muted); }

.post-grid {
  display: grid; gap: 30px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.post-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--bg-alt); }
.post-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-meta {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.post-card h2 { font-size: 1.2rem; letter-spacing: .02em; text-transform: uppercase; margin-bottom: .5em; }
.post-card h2 a { color: var(--ink); }
.post-card h2 a:hover { color: var(--gold-deep); text-decoration: none; }
.post-card p { font-size: 16px; color: var(--body); }
.post-card .more {
  margin-top: auto; padding-top: 12px;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}

/* --- single post ---------------------------------------------------------- */

.post {
  max-width: 760px; margin: 0 auto;
  padding: 56px 0 72px;
}
.post-hero {
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius-lg); margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
}
.post h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  letter-spacing: .02em; text-transform: uppercase;
  margin-bottom: .35em;
}
.post-byline {
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 26px; margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.post-body p { font-size: 17.5px; }
.post-body p:first-of-type { font-size: 19px; color: var(--ink); }

.post-foot {
  margin-top: 46px; padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-family: var(--font-ui); font-size: 14px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}

/* --- footer --------------------------------------------------------------- */

.site-footer {
  background: var(--bg-deep);
  color: #A9B2BF;
  padding: 56px 0 30px;
  font-size: 15px;
}
.footer-grid {
  display: grid; gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.site-footer h4 {
  color: var(--gold);
  font-size: 12.5px; letter-spacing: .2em; text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: #D2D8E0; }
.site-footer a:hover { color: var(--gold); }
.site-footer .rights { color: #737E8C; font-size: 14px; line-height: 1.6; }

.social { display: flex; gap: 12px; }
.social a {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); border-radius: 50%;
  color: #D2D8E0; transition: background .2s, color .2s;
}
.social a:hover { background: var(--gold); color: var(--bg-deep); }

.colophon {
  padding-top: 24px; text-align: center;
  color: #6C7684; font-size: 13.5px;
}

/* --- back to top ---------------------------------------------------------- */

.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s, background .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--gold-deep); }

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 780px) {
  :root { --header-h: 68px; }
  body { font-size: 16.5px; }
  .section { padding: 52px 0; }
  .logo img { height: 38px; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 12px 24px 20px;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav a { padding: 14px 12px; }

  .carousel-btn { width: 40px; height: 40px; }
  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }

  .photo-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }

  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
}

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

@media print {
  .site-header, .carousel, .site-footer, .to-top, .lightbox { display: none !important; }
  body { font-size: 12pt; color: #000; }
}
