/* Kayen — newspaper portal. Brand tokens from the Kayen design system (teal, amber, night; IBM Plex). */
:root {
  --paper: #fbfaf7;
  --paper-2: #f1efe9;
  --ink: #14202b;
  --ink-2: #5c6a75;
  --night: #0e2a36;
  --kayen: #0b7c87;
  --kayen-bright: #19b3c2;
  --amber: #a5581a;
  --amber-bright: #e9a24a;
  --white: #ffffff;

  /* the rubric sets these two */
  --ground: var(--kayen-bright);
  --on: var(--night);

  --display: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: "IBM Plex Serif", Georgia, serif;
  --gutter: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

body[data-rubric="une"]     { --ground: #19b3c2; --on: #0e2a36; }
body[data-rubric="version"] { --ground: #0e2a36; --on: #fbfaf7; }
body[data-rubric="fiertes"] { --ground: #e9a24a; --on: #0e2a36; }
body[data-rubric="memoire"] { --ground: #e7e4dd; --on: #14202b; }
body[data-rubric="kifach"]  { --ground: #0b7c87; --on: #ffffff; }
body[data-rubric="culture"] { --ground: #bfe6e9; --on: #0e2a36; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 17px; line-height: 1.5; }
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--kayen-bright); outline-offset: 3px; }
::selection { background: var(--kayen-bright); color: var(--night); }

/* ───────── Masthead ───────── */
.mast {
  position: relative;
  background: var(--ground);
  color: var(--on);
  padding: 0 var(--gutter) 22px;
  transition: background-color .5s var(--ease), color .5s var(--ease);
  overflow: hidden;
}
.dateline {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 12px 0 10px;
  font-family: var(--display); font-weight: 500; font-size: 14px; letter-spacing: .01em;
}
.dateline__follow { justify-self: end; display: flex; align-items: center; gap: 8px; }
.dateline__label { font-weight: 600; text-transform: uppercase; letter-spacing: .03em; margin-right: 6px; }
.dateline .btn--small { font-size: 14px; padding: 13px 18px 12px; background: var(--on); color: var(--ground); min-height: 44px; }
.dateline .btn--small:hover { background: var(--night); color: var(--white); }
.dateline__motto { font-style: normal; }

.rubrics {
  position: relative;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px;
  padding: 14px 0;
}
/* double rules on each side of the seal, as on an old front page */
.rubrics::before, .rubrics::after {
  content: ""; position: absolute; left: 0; right: 0; height: 0;
  border-top: 3px solid currentColor; border-bottom: 1px solid currentColor; padding-top: 3px; /* taste-skill-ignore: the front-page double rule is the reference's (Batenka) signature */
}
.rubrics::before { top: 0; }
.rubrics::after { bottom: 0; }
.rubrics__side { display: flex; justify-content: space-around; gap: 12px; position: relative; z-index: 1; }
.rubrics a[data-go] {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: .015em; text-transform: uppercase;
  text-decoration: none; padding: 10px 2px;
}
.rubrics a[data-go]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.rubrics a[data-go]:hover::after, .rubrics a[data-go]:focus-visible::after { transform: scaleX(1); }
.mark {
  width: 0; height: 18px; border: 0 solid currentColor; border-radius: 5px; position: relative; flex: none;
  transition: width .25s var(--ease), border-width .25s var(--ease);
}
.mark::after {
  content: ""; position: absolute; right: 2px; bottom: 2px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--kayen-bright); opacity: 0; transition: opacity .2s;
}
body[data-rubric="une"] .mark::after, body[data-rubric="culture"] .mark::after { background: var(--night); }
a[aria-current="true"] .mark { width: 18px; border-width: 2.5px; }
a[aria-current="true"] .mark::after { opacity: 1; }

.seal { position: relative; z-index: 3; width: 168px; height: 168px; margin: -20px 0 -96px; display: block; border-radius: 50%; }
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal__disc { fill: var(--night); stroke: var(--ground); stroke-width: 6; transition: stroke .5s; }
.seal__line { fill: none; stroke: var(--paper); stroke-width: 1.4; }
.seal__text { fill: var(--paper); font-family: var(--display); font-weight: 600; font-size: 16.5px; letter-spacing: 2.6px; }
.seal__spin { transform-origin: 100px 100px; }
.seal__frame { fill: none; stroke: var(--paper); stroke-width: 8; }
.seal__dot { fill: var(--kayen-bright); }
.seal:hover .seal__dot { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

.stage { position: relative; height: clamp(300px, 46vh, 500px); margin-top: 18px; }
.engrave { position: absolute; bottom: 0; height: 100%; width: auto; pointer-events: none; }
.engrave--l { left: calc(var(--gutter) * -1); }
.engrave--r { right: calc(var(--gutter) * -1); }
.word {
  position: absolute; left: 50%; bottom: -0.06em; transform: translateX(-50%);
  font-family: var(--display); font-weight: 700; text-transform: uppercase; white-space: nowrap;
  width: max-content;
  font-size: 22vw; line-height: .8; letter-spacing: -.035em; margin: 0;
  z-index: 2;
}
.word .ch { display: inline-block; }
.word.in .ch { animation: rise .62s var(--ease) both; }
@keyframes rise { from { transform: translateY(.42em); opacity: 0; } to { transform: none; opacity: 1; } }

.tags {
  position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 30px;
  padding: 16px 0 14px; margin-top: 10px;
  font-family: var(--display); font-weight: 600; font-size: 19px; text-transform: uppercase; letter-spacing: .02em;
}
.tags::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid currentColor; border-bottom: 3px solid currentColor; padding-top: 3px; /* taste-skill-ignore: front-page double rule */
}
.tags li { transition: opacity .3s; }
.engrave-credit { font-family: var(--display); font-size: 14px; text-align: right; padding-top: 8px; opacity: .85; }

/* ───────── The paper: three newspaper columns ───────── */
.paper { padding: 64px var(--gutter) 150px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col { display: flex; flex-direction: column; gap: 76px; padding: 0 clamp(18px, 1.9vw, 28px); }
.col + .col { border-left: 1px solid var(--ink); } /* taste-skill-ignore: newspaper column rules, as in the reference */
.col:first-child { padding-left: 0; }
.col:last-child { padding-right: 0; }
.story { display: flex; flex-direction: column; gap: 14px; }
.story__title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(34px, 2.8vw, 40px); line-height: .96; letter-spacing: -.012em;
}
.story__title a { text-decoration: underline 3px transparent; text-underline-offset: 6px; transition: text-decoration-color .25s; }
.story:hover .story__title a, .story__title a:focus-visible { text-decoration-color: currentColor; }
.story__meta { font-style: italic; font-size: 17px; }
.story__dek { text-align: justify; hyphens: auto; -webkit-hyphens: auto; font-size: 17px; line-height: 1.52; }
.story__pic { position: relative; margin-top: 8px; overflow: hidden; background: var(--night); }
.story__pic img, .story__pic video { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.story__pic video { position: absolute; inset: 0; height: calc(100% - 0px); opacity: 0; transition: opacity .3s; }
.story__pic.playing video { opacity: 1; }
.story__pic figcaption {
  position: relative; background: var(--paper); padding-top: 8px;
  font-family: var(--display); font-size: 14px; color: var(--ink-2);
}
.story__pic { background: transparent; }
.story__pic img { transition: transform .9s var(--ease); }
.story:hover .story__pic img { transform: scale(1.04); }

.stamp {
  position: absolute; right: 18px; top: 18px; z-index: 2;
  font-family: var(--display); font-weight: 700; font-size: 46px; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  color: var(--kayen-bright); border: 4px solid var(--kayen-bright); border-radius: 6px; padding: 8px 14px 6px;
  background: rgba(14, 42, 54, .55);
  transform: rotate(-9deg) scale(1.15); opacity: 0; transition: opacity .12s, transform .22s var(--ease);
  pointer-events: none;
}
.story:hover .stamp, .story:focus-within .stamp { opacity: 1; transform: rotate(-9deg) scale(1); }
.story[data-rubric="fiertes"] .stamp { color: var(--amber-bright); border-color: var(--amber-bright); }

.story.dim { opacity: .38; transition: opacity .4s; }
.story.dim:hover { opacity: 1; }
.story.lead .story__title { color: var(--ink); }

/* ───────── Reel of the week ───────── */
.reel {
  background: var(--night); color: var(--white);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 110px); align-items: center;
  padding: 130px var(--gutter);
}
.reel__screen { justify-self: end; width: min(100%, 420px); }
.reel__screen video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.reel__text { max-width: 760px; display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.reel__title { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(56px, 5.8vw, 96px); line-height: .88; letter-spacing: -.025em; }
.reel__dek { font-size: 24px; line-height: 1.45; max-width: 34em; }
.reel__meta { font-family: var(--display); font-size: 19px; color: #a3b0ba; }

.btn {
  display: inline-block; font-family: var(--display); font-weight: 600; font-size: 19px; text-transform: uppercase; letter-spacing: .03em;
  text-decoration: none; padding: 16px 26px 15px; border-radius: 0; min-height: 44px;
  background: var(--kayen-bright); color: var(--night);
  transition: transform .18s var(--ease), background-color .2s;
}
.btn:hover { background: var(--white); }
.btn:active { transform: translateY(2px) scale(.98); }
.btn--ink { background: var(--night); color: var(--white); }
.btn--ink:hover { background: var(--ink); color: var(--kayen-bright); }
.btn--line { background: transparent; color: var(--night); border: 3px solid var(--night); padding: 13px 23px 12px; }
.btn--line:hover { background: var(--night); color: var(--white); }

/* ───────── Ours: Algerian sources first ───────── */
.ours {
  background: #e7e4dd; color: var(--ink);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 110px); align-items: center;
  padding: 140px var(--gutter);
}
.ours__pic { justify-self: end; width: min(100%, 470px); transform: rotate(-2.2deg); }
.ours__pic img { width: 100%; }
.ours__pic figcaption { font-family: var(--display); font-size: 14px; color: var(--ink-2); padding-top: 10px; transform: rotate(2.2deg); }
.ours__text { display: flex; flex-direction: column; gap: 30px; max-width: 780px; }
.ours__title { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(56px, 5.8vw, 96px); line-height: .9; letter-spacing: -.025em; }
.ours__lead { font-size: 24px; line-height: 1.4; max-width: 30em; }
.ours__names { display: flex; flex-wrap: wrap; gap: 8px 26px; font-family: var(--display); font-weight: 600; font-size: 19px; text-transform: uppercase; }

/* ───────── Footer ───────── */
.foot { background: var(--kayen-bright); color: var(--night); padding: 40px var(--gutter) 34px; overflow: hidden; }
.foot__word {
  font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: .78; letter-spacing: -.04em;
  font-size: 34vw; margin: 0 0 34px -0.04em; white-space: nowrap;
}
.foot__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.foot__motto { font-size: 24px; max-width: 30em; line-height: 1.4; }
.foot__links { display: flex; gap: 12px; flex-wrap: wrap; }
.foot__credits { margin-top: 44px; font-family: var(--display); font-size: 14px; }
.foot__credits summary { cursor: pointer; font-weight: 600; }
.foot__credits ul { padding-top: 10px; display: grid; gap: 4px; }
.foot__copy { margin-top: 18px; font-family: var(--display); font-size: 14px; }

/* ───────── Reveal ───────── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.on { opacity: 1; transform: none; }

/* ───────── Tablet ───────── */
@media (max-width: 1100px) {
  .rubrics a[data-go] { font-size: 17px; }
  .rubrics { gap: 14px; }
  .seal { width: 132px; height: 132px; margin: -14px 0 -76px; }
  .reel, .ours { grid-template-columns: minmax(0, 1fr); }
  .reel__screen, .ours__pic { justify-self: start; width: min(100%, 380px); }
}
@media (max-width: 1100px) and (min-width: 901px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .col { padding: 0; gap: 96px; }
  .story__pic { max-width: 560px; }
}

/* ───────── Phone: its own composition ───────── */
@media (max-width: 720px) {
  .dateline { grid-template-columns: 1fr auto; }
  .dateline__motto { display: none; }
  .dateline__label { display: none; }
  .dateline .btn--small { padding: 13px 14px 12px; }
  .rubrics { display: flex; flex-direction: column; gap: 10px; padding: 12px 0 14px; }
  .seal { order: -1; width: 108px; height: 108px; margin: 4px 0 2px; }
  .rubrics__side { justify-content: center; flex-wrap: wrap; gap: 0 18px; }
  .rubrics a[data-go] { font-size: 17px; }
  .stage { height: 46vw; min-height: 190px; margin-top: 6px; }
  .tags { font-size: 14px; gap: 4px 16px; }
  .paper { padding: 44px 16px 100px; }
  .story__title { font-size: 32px; }
  .reel__title, .ours__title { font-size: 44px; }
  .reel, .ours { padding: 84px 16px; }
  .reel__screen, .ours__pic { justify-self: center; width: min(100%, 330px); }
  .reel__dek, .ours__lead, .foot__motto { font-size: 19px; }
  .foot { padding: 28px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
