/* ------------------------------------------------------------------
   Aragon Energy — standalone case-study pages.

   These pages reuse the tokens, typefaces and spacing rhythm of the
   published Framer site so they read as part of the same brand:

     ink      #1C1E21    paper   #ffffff
     warm     #F7F4F0    line    #F1EAE2
     muted    #6E7178    body    #4A4D52
     lime     #F77F00    amber   #F2A93B

     Hedvig Letters Serif → display headings (same as the Framer site)
     Geist             → body copy
     Geist Mono        → labels, eyebrows, metadata

   Images are pre-rendered halftone artwork, matching the monochrome
   halftone treatment used by the site's own illustrations.
------------------------------------------------------------------- */

:root {
  --ink: #1C1E21;
  --paper: #ffffff;
  --warm: #F7F4F0;
  --line: #F1EAE2;
  --muted: #6E7178;
  --body: #4A4D52;
  --lime: #F77F00;
  --amber: #F2A93B;

  --serif: "Hedvig Letters Serif", "Times New Roman", serif;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", "SFMono-Regular", Consolas, monospace;

  --gutter: 100px;
  --max: 1040px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

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

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 88px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 108px;
  height: 72px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--body);
  font-size: 14px;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Type ---------- */

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
}

.display {
  margin: 0;
  max-width: 15ch;
  font-family: var(--serif);
  font-size: clamp(42px, 5.4vw, 68px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}

.display--wide {
  max-width: 22ch;
}

.lede {
  margin: 22px 0 0;
  max-width: 58ch;
  color: var(--body);
  font-size: 17px;
  line-height: 1.65;
  text-wrap: pretty;
}

.prose p {
  margin: 0 0 16px;
  max-width: 66ch;
  color: var(--body);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.prose p:last-child {
  margin-bottom: 0;
}

h2.section-title {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

/* ---------- Hero ---------- */

.hero {
  padding: 84px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.hero-meta div {
  min-width: 150px;
}

.hero-meta dt {
  margin: 0 0 5px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Case list ---------- */

.case-list {
  padding: 56px 0 84px;
}

.case-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

.case-row:first-of-type {
  padding-top: 0;
}

.case-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.case-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
}

.case-media img {
  display: block;
  width: 100%;
  height: auto;
}

.case-media--crop img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center 42%;
}

.case-index {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.case-row h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(27px, 2.8vw, 36px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
}

.case-row p {
  margin: 0 0 14px;
  max-width: 52ch;
  color: var(--body);
  font-size: 15px;
  line-height: 1.68;
  text-wrap: pretty;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.tag-row li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 40px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: gap 180ms ease, border-color 180ms ease;
}

.link-arrow:hover,
.link-arrow:focus-visible {
  gap: 13px;
  border-color: var(--muted);
}

/* ---------- Case detail ---------- */

.detail-hero {
  padding: 64px 0 44px;
  border-bottom: 1px solid var(--line);
}

.detail-hero .display {
  max-width: 20ch;
}

.detail-hero .lede {
  margin-top: 18px;
}

.detail {
  padding: 48px 0 0;
}

/* The figure uses the same 8px inner frame as the case index block. */
.detail-figure {
  margin: 0;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

.detail-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 45%;
}

.detail-facts {
  display: grid;
  margin: 0;
  padding: 0;
}

.detail-facts > div {
  padding: 18px;
}

.detail-facts > div + div {
  border-top: 1px solid var(--line);
}

@media (min-width: 810px) {
  .detail-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-facts > div {
    padding: 20px 24px;
  }

  .detail-facts > div + div {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.detail-facts dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

/* Numbered rows: mono label column beside the content. */
.detail-body {
  margin-top: 24px;
}

.detail-row {
  display: grid;
  gap: 14px;
  padding: 26px 18px;
}

.detail-row + .detail-row {
  border-top: 1px solid var(--line);
}

@media (min-width: 810px) {
  .detail-row {
    grid-template-columns: minmax(0, 232px) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    padding: 38px 24px;
  }
}

.detail-row h2 {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.13em;
  line-height: 1.6;
  text-transform: uppercase;
}

.detail-num {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 62ch;
}

.bullet-list li {
  position: relative;
  padding: 0 0 12px 22px;
  color: var(--body);
  font-size: 15.5px;
  line-height: 1.65;
}

.bullet-list li:last-child {
  padding-bottom: 0;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.callout {
  margin: 24px 0 0;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  background: var(--warm);
}

.callout p {
  margin: 0;
  max-width: 62ch;
  color: var(--body);
  font-size: 14px;
  line-height: 1.65;
}

.callout strong {
  color: var(--ink);
  font-weight: 500;
}

.cta-band {
  margin-top: 56px;
  padding: 40px 0 64px;
  border-top: 1px solid var(--line);
}

.cta-band p {
  margin: 0 0 20px;
  max-width: 52ch;
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 40px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  background: #1C1E21;
  transform: translateY(-1px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--ink);
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #F1EAE2;
}

.site-footer .hands {
  position: absolute;
  inset: auto 0 -6% 0;
  width: 100%;
  height: auto;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
}

.site-footer .wrap {
  position: relative;
  z-index: 1;
  padding-top: 64px;
  padding-bottom: 48px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(241, 234, 226, 0.16);
}

.footer-top h2 {
  margin: 0;
  max-width: 18ch;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-wrap: balance;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 32px;
}

.footer-nav a {
  color: rgba(241, 234, 226, 0.72);
  font-size: 13.5px;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #fff;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
  color: rgba(241, 234, 226, 0.5);
  font-size: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199.98px) {
  :root {
    --gutter: 64px;
  }
}

@media (max-width: 809.98px) {
  :root {
    --gutter: 20px;
  }

  .site-header .wrap {
    min-height: 72px;
    gap: 12px;
  }

  .brand img {
    width: 88px;
    height: 58px;
  }

  .site-nav {
    gap: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    font-size: 12.5px;
    white-space: nowrap;
  }

  .hero,
  .detail-hero {
    padding-top: 48px;
  }

  .case-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 34px 0;
  }

  .detail-grid,
  .detail-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 28px 0;
  }

  .detail .prose p,
  .case-row p,
  .lede {
    font-size: 15px;
  }

  .cta-band {
    margin-top: 36px;
    padding-bottom: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Mobile header: let the navigation wrap instead of clipping. */
@media (max-width: 809.98px) {
  .site-header .wrap {
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 8px 16px;
    width: 100%;
    overflow: visible;
  }

  .site-nav a {
    font-size: 12.5px;
    white-space: normal;
  }
}

/* ------------------------------------------------------------------
   Case-study index — bordered editorial block adapted from the
   supplied React/Tailwind case-study component:
   featured case on the left with a framed image on the right, then a
   two-up bordered row with decorative dot gutters. Rebuilt in the
   site's own tokens so it matches the Framer brand rather than a
   generic shadcn theme.
------------------------------------------------------------------- */

.cs-section {
  padding: 64px 0 96px;
}

.cs-block {
  border: 1px solid var(--line);
  background: var(--paper);
}

.cs-feature:focus-visible,
.cs-minor:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -3px;
}

.cs-feature {
  display: grid;
  gap: 16px;
  padding: 0 24px;
  color: inherit;
  text-decoration: none;
  transition: background-color 500ms ease-out;
}

@media (min-width: 1024px) {
  .cs-feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (min-width: 1200px) {
  .cs-feature {
    padding: 0 112px;
  }
}

.cs-feature:hover,
.cs-feature:focus-visible {
  background: var(--warm);
}

.cs-feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding-top: 32px;
}

@media (min-width: 768px) {
  .cs-feature-copy {
    padding-top: 64px;
  }
}

@media (min-width: 1024px) {
  .cs-feature-copy {
    min-height: 424px;
    padding-bottom: 64px;
  }
}

.cs-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .cs-brand {
    font-size: 22px;
  }
}

.cs-brand b {
  font-weight: 500;
}

.cs-brand span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cs-tags {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.11em;
  line-height: 1.7;
  text-transform: uppercase;
}

.cs-title {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(25px, 2.6vw, 33px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.14;
  text-wrap: balance;
}

.cs-title .cs-sub {
  display: block;
  margin-top: 12px;
  color: rgba(28, 30, 33, 0.5);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.55;
  text-wrap: pretty;
}

.cs-read {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.cs-read svg {
  flex: none;
  transition: transform 500ms ease-out;
}

.cs-feature:hover .cs-read svg,
.cs-feature:focus-visible .cs-read svg,
.cs-minor:hover .cs-read svg,
.cs-minor:focus-visible .cs-read svg {
  transform: translateX(4px);
}

.cs-feature-media {
  padding: 40px 0;
}

@media (min-width: 1024px) {
  .cs-feature-media {
    padding: 64px 0;
  }
}

.cs-frame {
  height: 100%;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.cs-frame > div {
  height: 100%;
  overflow: hidden;
}

.cs-frame img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 14 / 9;
  object-fit: cover;
  transition: transform 500ms ease-out;
}

.cs-feature:hover .cs-frame img,
.cs-feature:focus-visible .cs-frame img {
  transform: scale(1.04);
}

.cs-row {
  display: flex;
  border-top: 1px solid var(--line);
}

.cs-dots {
  display: none;
  flex: none;
  width: 112px;
  background-image: radial-gradient(var(--muted) 1px, transparent 1px);
  background-size: 10px 10px;
  opacity: 0.16;
}

@media (min-width: 1280px) {
  .cs-dots {
    display: block;
  }
}

.cs-grid2 {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 1024px) {
  .cs-grid2 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.cs-minor {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 24px;
  color: inherit;
  text-decoration: none;
  transition: background-color 500ms ease-out;
}

@media (min-width: 768px) {
  .cs-minor {
    gap: 36px;
    padding: 48px 24px;
  }
}

@media (min-width: 1024px) {
  .cs-minor {
    min-height: 328px;
    padding: 48px 32px;
  }
}

@media (min-width: 1280px) {
  .cs-minor {
    min-height: 348px;
    padding-left: 48px;
    padding-right: 48px;
  }
}

.cs-minor:hover,
.cs-minor:focus-visible {
  background: var(--warm);
}

.cs-minor + .cs-minor {
  border-top: 1px solid var(--line);
}

@media (min-width: 1024px) {
  .cs-minor + .cs-minor {
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

@media (min-width: 1280px) {
  .cs-minor:last-child {
    border-right: 1px solid var(--line);
  }
}

/* Mobile refinements: stacked block, tighter framing, no hover-only affordances. */
@media (max-width: 809.98px) {
  .cs-section {
    padding-top: 40px;
  }

  .cs-feature {
    padding: 0 16px;
  }

  .cs-feature-media {
    padding-top: 8px;
    padding-bottom: 24px;
  }

  .cs-feature-copy {
    gap: 22px;
    padding-top: 24px;
  }

  .cs-brand {
    font-size: 18px;
  }

  .cs-brand span {
    flex: 1 0 100%;
    padding-top: 4px;
  }

  .cs-title {
    font-size: 24px;
    line-height: 1.2;
  }

  .cs-frame {
    padding: 6px;
  }

  .cs-minor {
    padding: 26px 16px 30px;
    gap: 24px;
  }

  .cs-title .cs-sub {
    margin-top: 9px;
    font-size: 14px;
    line-height: 1.5;
  }

  .cs-read {
    min-height: 46px;
  }
}

@media (hover: none) {
  .cs-feature:hover,
  .cs-minor:hover {
    background: transparent;
  }

  .cs-feature:hover .cs-frame img {
    transform: none;
  }

  .cs-read svg {
    transform: none !important;
  }
}
