/* BerdisDev — case studies, journal, article, legal, thank you, 404 */

/* ---------- case studies ---------- */
.cs-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: end; padding-top: 32px; }
.cs-hero h1 { font-size: clamp(44px, 8vw, 104px); line-height: .95; letter-spacing: -0.05em; margin-top: 24px; }
.facts { border-bottom: 1px solid var(--line); }
.fact { display: flex; justify-content: space-between; gap: 24px; padding: 15px 0; border-top: 1px solid var(--line); font-size: 15px; }
.fact span:first-child { color: var(--faint); }
.showcase { position: relative; height: clamp(320px, 46vw, 700px); margin-top: clamp(32px, 5vw, 64px); border-radius: clamp(24px, 3vw, 40px); overflow: hidden; background: var(--tint-a); }
.showcase .browser { position: absolute; left: 50%; top: 8%; width: min(880px, 76%); transform: translateX(-58%); }
.showcase .phone-pos { position: absolute; right: 6%; top: 18%; width: clamp(130px, 17vw, 240px); }
.chipfloat { display: flex; align-items: center; gap: 10px; padding: 11px 15px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-soft); font-size: 14px; font-weight: 600; }
.showcase .chipfloat { position: absolute; }
.story-row { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(24px, 4vw, 64px); padding: clamp(22px, 2.4vw, 34px) 0; border-top: 1px solid var(--line); }
.story-row .num { display: flex; align-items: baseline; gap: 16px; }
.story-row h2 { font-family: var(--display); font-weight: 300; font-size: clamp(28px, 4vw, 52px); letter-spacing: -0.04em; line-height: 1; }
.story-row p { font-family: var(--display); font-weight: 300; font-size: clamp(20px, 2.6vw, 30px); line-height: 1.35; letter-spacing: -0.02em; }
.design-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(28px, 4vw, 56px); border-radius: 36px; color: #f5f5f5; overflow: hidden; }
.design-band h2 { color: #f5f5f5; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.swatch { display: flex; flex-direction: column; gap: 8px; }
.swatch i { display: block; width: clamp(64px, 9vw, 96px); aspect-ratio: 1; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .14); }
.swatch span { font-size: 12px; color: rgba(245, 245, 245, .6); }
.phones-row { display: flex; justify-content: center; gap: clamp(12px, 2vw, 22px); }
.phones-row > div:nth-child(1) { margin-top: 40px; }
.phones-row > div:nth-child(3) { margin-top: 70px; }
.next-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px); align-items: center; padding: clamp(24px, 3vw, 48px); border-radius: 36px; background: var(--glass); border: 1px solid var(--line); }
.next-card h2 { font-size: clamp(34px, 6vw, 76px); }

/* ---------- journal ---------- */
.post { display: flex; flex-direction: column; padding: 10px 10px 18px; border-radius: 26px; background: var(--glass); border: 1px solid var(--line); }
.post .cover { height: 112px; border-radius: 18px; display: flex; align-items: flex-end; padding: 14px; }
.post .txt { display: flex; flex-direction: column; gap: 8px; padding: 14px 10px 0; flex: 1; }
.post .txt p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post .meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; font-size: 14px; color: var(--faint); }
.featured-post { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: center; padding: clamp(20px, 3vw, 40px); border-radius: 36px; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); }
.featured-post .stage { border-radius: 26px; background: var(--tint-a); padding: clamp(18px, 3vw, 30px); }

/* ---------- article ---------- */
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 6vw, 80px); align-items: start; }
.article-body { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.article-body p { font-size: 18px; line-height: 1.65; color: var(--soft); }
.article-body h2 { font-family: var(--display); font-weight: 300; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.035em; margin-top: 20px; color: var(--ink); }
.article-body .intro { font-family: var(--display); font-weight: 300; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.45; letter-spacing: -0.02em; color: var(--ink); }
.article-body ul { display: flex; flex-direction: column; gap: 12px; font-size: 17px; }
.article-body ul li { display: flex; gap: 10px; }
.article-body ul li svg { flex-shrink: 0; margin-top: 3px; }
.pull { display: flex; flex-direction: column; gap: 14px; margin: 12px 0; padding: clamp(24px, 4vw, 36px); border-radius: 28px; background: var(--tint-a); }
.pull p { font-family: var(--display); font-weight: 300; font-size: clamp(22px, 3vw, 32px); line-height: 1.25; letter-spacing: -0.02em; color: var(--ink); }
.tip { display: flex; gap: 18px; padding: 26px 28px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); }
.tip .ic { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 14px; background: var(--tint-b); flex-shrink: 0; }
.aside { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 24px; }
.toc { display: flex; flex-direction: column; gap: 2px; padding: 24px 22px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); }
.toc a { display: flex; gap: 12px; padding: 9px 0; font-size: 15px; color: var(--soft); }
.toc a:first-of-type { color: var(--ink); font-weight: 500; }
figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
figcaption { font-size: 14px; color: var(--faint); padding-left: 4px; }

/* ---------- legal ---------- */
.legal-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.legal-nav { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 2px; padding: 24px 22px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); }
.legal-nav a { display: flex; gap: 12px; padding: 8px 0; font-size: 15px; color: var(--soft); }
.legal-block { display: flex; flex-direction: column; gap: 14px; padding: 32px 0; border-top: 1px solid var(--line); }
.legal-block h2 { font-family: var(--display); font-weight: 300; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; letter-spacing: -0.035em; }
.legal-block .body { display: flex; flex-direction: column; gap: 14px; padding-left: clamp(0px, 4vw, 40px); max-width: 720px; }
.legal-block .body p { font-size: 17px; line-height: 1.65; color: var(--soft); }
.legal-block .body ul { display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.legal-block .body ul li { display: flex; gap: 10px; }

/* ---------- thank you and 404 ---------- */
.tick { position: relative; display: flex; align-items: center; justify-content: center; width: 104px; height: 104px; border-radius: 50%; background: var(--ink); color: var(--on-ink); box-shadow: var(--shadow); }
.tick .ring { position: absolute; inset: -16px; border-radius: 50%; border: 1px dashed var(--line); animation: spin 30s linear infinite; }
.tick svg path { stroke-dasharray: 30; animation: draw 1.6s cubic-bezier(.6, 0, .2, 1) .3s both; }
@keyframes draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }
.tl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.big404 { font-family: var(--display); font-weight: 300; font-size: clamp(120px, 30vw, 340px); line-height: .82; letter-spacing: -0.07em; }
.lost { position: absolute; right: 2%; top: 6%; width: min(300px, 32vw); transform: rotate(6deg); }
.link-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.link-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 24px; background: var(--glass); border: 1px solid var(--line); }
.link-card.dark { background: var(--ink); color: var(--on-ink); border-color: transparent; }
.link-card .top { display: flex; align-items: center; justify-content: space-between; }
.link-card .ic { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 16px; background: var(--tint-a); animation: bob 4s ease-in-out infinite; }
.link-card.dark .ic { background: rgba(255, 255, 255, .1); }

@media (max-width: 1080px) {
  .cs-hero, .story-row, .design-band, .next-card, .featured-post, .article-grid, .legal-grid { grid-template-columns: 1fr; }
  .aside, .legal-nav { position: static; }
  .showcase .browser { transform: translateX(-50%); width: 84%; }
  .showcase .phone-pos { display: none; }
  .link-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-cards { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
  .phones-row > div:nth-child(3) { display: none; }
  .lost { display: none; }
  .post .cover { height: 140px; }
  .link-cards { grid-template-columns: 1fr; }
}

/* HALA is an Arabic and English site, so its card rotates two words, not three */
.bd-rot-track.bd-rot2 { animation: bd-words2 8s cubic-bezier(.75, 0, .2, 1) infinite; }
@keyframes bd-words2 { 0%, 42% { transform: translateY(0); } 50%, 92% { transform: translateY(-1.1em); } 100% { transform: translateY(-2.2em); } }
