/* ianrebuilt.com shared styles (home, /challenge/, /shop/, /about/). Header styles live in nav.css. */

:root {
  --bg: #FFFCF7;
  --bg-soft: #FFF4E1;
  --ink: #14110C;
  --ink-2: #4B443A;
  --muted: #857C6E;
  --line: #EDE4D4;
  --orange: #F5A21B;
  --orange-deep: #D9860A;
  --orange-ink: #1B1304;
  --card: #FFFFFF;
  --yt: #FF0000;
  --radius: 20px;
  --max: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.6;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: "Inter Tight", "Inter", system-ui, sans-serif;
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin: 0;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--orange); }

/* Header */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 252, 247, .86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: "Inter Tight", sans-serif; font-weight: 900; font-size: 22px; letter-spacing: -0.03em;
}
.brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--orange); }
nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
nav li a { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--ink-2); }
nav li a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  padding: 13px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-yt { background: var(--yt); color: #fff; }
.btn-yt:hover { background: #d90000; }
.btn-orange { background: var(--orange); color: var(--orange-ink); box-shadow: 0 6px 20px rgba(245,162,27,.28); }
.btn-orange:hover { background: #ffb437; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a251d; }
.btn-ghost { border-color: var(--line); background: var(--card); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 64px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
radial-gradient(ellipse 70% 60% at 85% 15%, rgba(245,162,27,.28), transparent 60%),
radial-gradient(ellipse 50% 50% at 10% 90%, rgba(245,162,27,.14), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero { padding: 48px 0; } }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-soft); border: 1px solid #F7DCAE; color: #8A5300;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(245,162,27,.25); }
.hero h1 { font-size: clamp(40px, 5.4vw, 66px); font-weight: 900; }
.hero h1 .line { display: block; }
.hero p.lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 32em; margin: 24px 0 32px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stats { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.stat b { display: block; font-family: "Inter Tight", sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

.player {
  position: relative; border-radius: 22px; overflow: hidden; background: #000;
  box-shadow: 0 30px 60px -20px rgba(20,17,12,.45), 0 0 0 1px rgba(20,17,12,.08);
  aspect-ratio: 16 / 9;
}
.player iframe, .player img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player .play {
  position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; border: 0; background: transparent; padding: 0;
}
.player .play span {
  width: 76px; height: 76px; border-radius: 50%; background: var(--yt); display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.4); transition: transform .15s ease;
}
.player .play:hover span { transform: scale(1.06); }
.player .play svg { width: 30px; height: 30px; margin-left: 4px; }
.player-caption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.player-caption b { color: var(--ink); font-weight: 600; }

/* Sections */
section { padding: 80px 0; }
section + section { border-top: 1px solid var(--line); }
.head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.head h2 { font-size: clamp(30px, 4vw, 46px); }
.head p { margin: 8px 0 0; color: var(--ink-2); max-width: 40em; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-deep); margin-bottom: 12px; }

/* Challenge */
.challenge { background: var(--ink); color: #fff; border-radius: 28px; padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .challenge { grid-template-columns: 1fr; padding: 28px; } }
.challenge .kicker { color: var(--orange); }
.challenge h2 { font-size: clamp(30px, 4vw, 48px); }
.challenge p { color: #CFC6B8; margin: 14px 0 24px; }
.daycount { font-family: "Inter Tight", sans-serif; font-weight: 900; font-size: clamp(64px, 9vw, 112px); line-height: .95; letter-spacing: -0.05em; }
.daycount small { font-size: .32em; font-weight: 700; color: #CFC6B8; letter-spacing: -0.01em; margin-left: 8px; }
.track { height: 14px; background: #2A251D; border-radius: 999px; overflow: hidden; margin: 22px 0 10px; }
.track > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange-deep), var(--orange)); border-radius: 999px; transition: width 1.2s cubic-bezier(.2,.7,.2,1); }
.track-meta { display: flex; justify-content: space-between; font-size: 13px; color: #A69D8E; font-weight: 600; }
.sold { margin-top: 26px; padding-top: 22px; border-top: 1px solid #2A251D; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sold b { display: block; font-family: "Inter Tight", sans-serif; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; color: var(--orange); line-height: 1; }
.sold span { font-size: 13px; color: #A69D8E; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 420px; overflow: auto; padding-right: 6px; }
.log li a {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center;
  background: #1F1B15; border: 1px solid #2A251D; border-radius: 12px; padding: 10px 12px; text-decoration: none;
  transition: background .15s ease;
}
.log li a:hover { background: #2A251D; }
.log .d { font-family: "Inter Tight", sans-serif; font-weight: 800; color: var(--orange); font-size: 15px; }
.log .t { font-size: 14px; color: #F3EEE4; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .v { font-size: 12px; color: #A69D8E; }
.log-empty { color: #A69D8E; font-size: 14px; }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .videos { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .videos { grid-template-columns: 1fr; } }
.video { text-decoration: none; display: block; }
.thumb { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: var(--bg-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.video:hover .thumb img { transform: scale(1.04); }
.thumb .badge { position: absolute; left: 10px; top: 10px; background: var(--orange); color: var(--orange-ink); font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 6px; letter-spacing: .04em; }
.video h3 { font-family: "Inter", sans-serif; font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.35; margin: 12px 0 4px; }
.video .meta { font-size: 13px; color: var(--muted); }
.skeleton .thumb { animation: pulse 1.4s ease-in-out infinite; }
.skeleton .bar { height: 14px; border-radius: 6px; background: var(--bg-soft); margin-top: 12px; width: 80%; }
@keyframes pulse { 50% { opacity: .5; } }
.videos-empty { color: var(--muted); }

/* Shop */
.shop { background: var(--bg-soft); border-radius: 28px; padding: 44px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .shop { grid-template-columns: 1fr; padding: 28px; } }
.shop h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 14px; }
.shop p { color: var(--ink-2); margin: 0 0 24px; }
.shop-note { background: var(--card); border: 1px solid #F0D7A6; border-radius: 18px; padding: 24px; }
.shop-note b { display: block; font-family: "Inter Tight", sans-serif; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.shop-note p { margin: 0; font-size: 15px; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-decoration: none; display: flex; flex-direction: column; gap: 10px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.pillar:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px rgba(20,17,12,.3); border-color: #F7DCAE; }
.pillar .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--bg-soft); display: grid; place-items: center; color: var(--orange-deep); }
.pillar .icon svg { width: 24px; height: 24px; }
.pillar h3 { font-size: 20px; }
.pillar p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1; }
.pillar .more { font-size: 14px; font-weight: 700; color: var(--orange-deep); }

/* Blog */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1000px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .posts { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-decoration: none; display: flex; flex-direction: column; gap: 10px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px rgba(20,17,12,.3); border-color: #F7DCAE; }
.card h3 { font-size: 21px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; flex: 1; }
.card .meta { font-size: 13px; color: var(--muted); font-weight: 600; }
.card .meta b { color: var(--orange-deep); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 12px; }
.card .more { font-size: 14px; font-weight: 700; color: var(--orange-deep); }

/* Story */
.story { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; } }
.story h2 { font-size: clamp(30px, 4vw, 46px); }
.story .body p { margin: 0 0 18px; color: var(--ink-2); font-size: 18px; }
.story .body p:first-child { font-size: 22px; color: var(--ink); font-weight: 500; }

/* Newsletter */
.newsletter { background: var(--bg-soft); border-radius: 28px; padding: 56px 32px; text-align: center; }
.newsletter h2 { font-size: clamp(30px, 4vw, 46px); }
.newsletter p { color: var(--ink-2); max-width: 34em; margin: 14px auto 28px; }
.newsletter form { display: flex; gap: 10px; max-width: 540px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter input[type="email"] { flex: 1 1 260px; padding: 14px 18px; border-radius: 999px; font: inherit; font-size: 16px; border: 1.5px solid #F0D7A6; background: #fff; color: var(--ink); }
.newsletter input:focus { outline: 3px solid rgba(245,162,27,.4); border-color: var(--orange); }
.newsletter .fine { font-size: 13px; color: var(--muted); margin: 16px auto 0; }
.signup-msg { font-size: 14px; font-weight: 600; color: var(--orange-deep); margin: 12px 0 0; min-height: 1.3em; }
.signup-msg.err { color: #C0392B; }
.cta .signup-msg { color: var(--orange); }

footer { padding: 40px 0 56px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .social { display: flex; gap: 10px; }
footer .social a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; color: var(--ink); padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; }
footer .social a:hover { border-color: var(--ink); }
footer .social svg { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track > span, .btn, .thumb img, .pillar, .card { transition: none; }
  .skeleton .thumb { animation: none; }
}
  
/* Sub-page header */
.page-head { position: relative; overflow: hidden; padding: 64px 0 24px; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 70% 60% at 85% 15%, rgba(245,162,27,.26), transparent 60%); }
.page-head h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 900; max-width: 16ch; }
.page-head p { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 36em; margin: 20px 0 0; }
.page-head .actions { margin-top: 28px; }
main > section:first-of-type { border-top: 0; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; font-weight: 600; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
.next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .next { grid-template-columns: 1fr; } }
.next a { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.next a:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -20px rgba(20,17,12,.3); border-color: #F7DCAE; }
.next b { font-family: "Inter Tight", sans-serif; font-size: 19px; letter-spacing: -0.02em; }
.next span { color: var(--ink-2); font-size: 15px; }
.next .more { color: var(--orange-deep); font-weight: 700; font-size: 14px; margin-top: 4px; }
