/* =========================================================================
   oCIS Field Guide - ownCloud brand system
   Source Sans 3 · navy #041E42 / orange #E56F35 / bright-blue #4E85C8
   Dark/light panel split · circle motif · orange accent bars · flat (no gradients)
   ========================================================================= */

:root {
  --oc-navy:     #041E42;
  --oc-navy-2:   #0a3170;   /* hover/elevated navy */
  --oc-orange:   #e56f35;
  --oc-blue:     #4e85c8;
  --oc-white:    #ffffff;
  --oc-gray:     #55606c;
  --oc-gray-2:   #7b8794;
  --oc-light-bg: #f4f6f9;
  --oc-border:   rgba(4, 30, 66, 0.12);
  --oc-border-2: rgba(4, 30, 66, 0.07);

  --circle-dark:  rgba(78, 133, 200, 0.10);
  --circle-light: rgba(78, 133, 200, 0.07);

  --font: "Source Sans 3", "Noto Sans JP", "Source Sans Pro", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; /* code/kbd only */

  --xs: 4px; --sm: 8px; --md: 16px; --lg: 24px; --xl: 40px; --xxl: 64px;
  --radius: 6px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--oc-gray);
  background: var(--oc-light-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--oc-navy); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; margin: 0; }
a { color: var(--oc-blue); }
img { display: block; max-width: 100%; }

/* orange highlight = brand-approved emphasis (navy text stays AA on the tint) */
mark { background: rgba(229,111,53,.20); color: var(--oc-navy); padding: 0 .2em; border-radius: 3px; font-weight: 600; }
code { font-family: var(--font-mono); font-size: .86em; background: #e7ebf1; color: var(--oc-navy); padding: .08em .38em; border-radius: 4px; }
kbd { font-family: var(--font-mono); font-size: .82em; background: var(--oc-navy); color: #fff; border-radius: 5px; padding: .1em .45em; }
strong { color: var(--oc-navy); font-weight: 700; }
em { font-style: normal; }

:focus-visible { outline: 2px solid var(--oc-orange); outline-offset: 2px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--oc-orange); color: #fff; padding: .6rem 1rem; z-index: 100; font-weight: 700; }
.skip:focus { left: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.1rem, 4vw, 3rem); }

/* ---------- app bar (dark panel, sticky) ---------- */
.appbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem clamp(1.1rem, 4vw, 3rem);
  background: var(--oc-navy);
  border-bottom: 4px solid var(--oc-orange);   /* orange accent anchoring the dark bar */
  position: sticky; top: 0; z-index: 40;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
/* official ownCloud logo, rendered white = the approved reversed treatment on navy */
.brand__logo { height: 42px; width: auto; display: block; filter: brightness(0) invert(1); }
.brand__div { width: 1px; height: 24px; background: rgba(255,255,255,.28); margin: 0 .15rem; }
.brand__guide { font-weight: 600; font-size: 1rem; color: var(--oc-blue); letter-spacing: .01em; white-space: nowrap; }

.appbar__right { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.6rem); }

.lang { display: inline-flex; align-items: center; gap: .4rem; color: rgba(255,255,255,.7); }
.lang__globe { display: inline-flex; }
.lang select {
  appearance: none; -webkit-appearance: none;
  background-color: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius); padding: .34rem 1.7rem .34rem .55rem; font-family: var(--font);
  font-size: .82rem; font-weight: 600; cursor: pointer; line-height: 1.2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .5rem center;
}
.lang select:hover { border-color: rgba(255,255,255,.5); }
.lang select option { color: var(--oc-navy); background: #fff; }

.appbar__meta {
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: rgba(255,255,255,.62); text-align: right; line-height: 1.5;
}
.appbar__meta b { color: var(--oc-white); }
.appbar__meta .sep { color: var(--oc-orange); margin: 0 .15rem; }

/* On phones the version badge crowds the brand + language switcher (they collide on
   ~390px screens) and the badge wraps to a tall block. The same version/date is already
   shown in the hero strip and the step meta, so hide it here and let the switcher sit at
   the right edge, clear of the wordmark. */
@media (max-width: 640px) {
  .appbar__meta { display: none; }
  .appbar { gap: .75rem; }
  .brand__guide { font-size: .95rem; }
}

/* =========================================================================
   HERO - dark navy panel with circle motif + bottom orange bar
   ========================================================================= */
.hero {
  position: relative; overflow: hidden;
  background: var(--oc-navy); color: var(--oc-white);
  border-bottom: 8px solid var(--oc-orange);
}
/* two cropped bright-blue circles (logo DNA) */
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; background: var(--circle-dark); }
.hero::before { width: 620px; height: 620px; top: -260px; right: -160px; }
.hero::after  { width: 380px; height: 380px; bottom: -220px; left: -120px; }
/* padding-block sets only the vertical padding so the horizontal padding from .wrap
   survives on small screens (a plain `padding` shorthand here would zero it -> flush text). */
.hero__inner { position: relative; z-index: 1; padding-block: clamp(3.2rem, 9vw, 6.5rem) clamp(2.6rem, 6vw, 4rem); }

.kicker {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .18em;
  display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1.5rem; color: #b9d0ec;
}
.kicker::before { content: ""; width: 28px; height: 3px; background: var(--oc-orange); display: inline-block; }

.hero h1 {
  color: var(--oc-white); font-weight: 700; font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.08; max-width: 17ch; letter-spacing: -.02em;
}
.hero h1 .u { box-shadow: inset 0 -.14em 0 var(--oc-orange); } /* orange underline accent */
.hero__lede { margin: 1.5rem 0 0; max-width: 56ch; font-size: clamp(1.05rem, 2vw, 1.25rem); color: #cdd9e6; }
.hero__short {
  margin: 1.7rem 0 0; font-size: 1.05rem; font-weight: 700; color: var(--oc-white); letter-spacing: .01em;
}
.hero__short b { color: var(--oc-orange); }
.hero__strip {
  margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.16);
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem;
  font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #93a7bf;
}
.hero__strip b { color: var(--oc-white); }
.hero__strip span { display: inline-flex; align-items: center; gap: .5rem; }
.hero__strip .live { width: 8px; height: 8px; border-radius: 50%; background: var(--oc-orange); animation: pulse 2.6s var(--ease) infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(229,111,53,.5);} 70%{box-shadow:0 0 0 8px rgba(229,111,53,0);} 100%{box-shadow:0 0 0 0 rgba(229,111,53,0);} }

/* =========================================================================
   CATALOG (light panel)
   ========================================================================= */
.catalog { position: relative; padding: clamp(2.6rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.catalog::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: var(--circle-light); right: -200px; bottom: -240px; pointer-events: none; }

.section-label {
  position: relative; z-index: 1;
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--oc-navy);
  margin: 0 0 1.4rem; padding-left: .8rem; border-left: 4px solid var(--oc-orange);
  display: flex; align-items: center; gap: 1rem;
}

/* catalog filters: search box + category list */
.catalog__layout { position: relative; z-index: 1; display: grid; grid-template-columns: 230px 1fr; gap: var(--xl); align-items: start; }
.catalog__side { position: sticky; top: 1.4rem; display: flex; flex-direction: column; gap: var(--md); }
.search input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: .95rem;
  padding: .6rem .85rem; border: 1px solid var(--oc-border); border-radius: var(--radius);
  background: var(--oc-white); color: var(--oc-navy);
}
.search input::placeholder { color: var(--oc-gray); }
.search input:focus { outline: none; border-color: var(--oc-blue); box-shadow: 0 0 0 3px rgba(78, 133, 200, 0.18); }
.cats { display: flex; flex-direction: column; gap: 2px; }
.cat {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%;
  text-align: left; font: inherit; font-size: .92rem; color: var(--oc-navy);
  background: transparent; border: 0; border-radius: var(--radius); padding: .45rem .65rem; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.cat:hover { background: var(--oc-light-bg); }
.cat.active { background: var(--oc-navy); color: var(--oc-white); }
.cat__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat__n { flex: none; font-size: .78rem; color: var(--oc-gray); font-variant-numeric: tabular-nums; }
.cat.active .cat__n { color: rgba(255, 255, 255, 0.72); }
.no-results { color: var(--oc-gray); padding: 2rem 0; }
@media (max-width: 860px) {
  .catalog__layout { grid-template-columns: 1fr; gap: var(--lg); }
  .catalog__side { position: static; }
  .cats { flex-direction: row; flex-wrap: wrap; }
  .cat { width: auto; }
}

.grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--lg); }

.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--oc-white); border: 1px solid var(--oc-border); border-radius: var(--radius);
  overflow: hidden; position: relative; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card::before { /* orange active accent on hover (brand "active item" pattern) */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--oc-orange);
  transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease); z-index: 2;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -26px rgba(4,30,66,.5); border-color: var(--oc-border); }
.card:hover::before { transform: scaleY(1); }
.card__thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--oc-navy); border-bottom: 1px solid var(--oc-border); }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s var(--ease); }
.card:hover .card__thumb img { transform: scale(1.04); }
.card__body { padding: var(--lg); display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__title { font-size: 1.4rem; }
.card__summary { color: var(--oc-gray); font-size: .98rem; margin: 0; }
.card__foot {
  margin-top: auto; padding-top: var(--md); display: flex; align-items: center; justify-content: space-between;
  font-size: .85rem; font-weight: 600; color: var(--oc-gray-2);
}
.card__cta { color: var(--oc-blue); font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; transition: gap .3s var(--ease); }
.card:hover .card__cta { gap: .65rem; }

/* badge / chip - pill, navy on light tint or navy on white */
.tag {
  align-self: flex-start; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--oc-navy); background: rgba(78,133,200,.16); padding: .3rem .65rem; border-radius: 100px;
}

.card--ghost { border-style: dashed; background: transparent; }
.card--ghost:hover { transform: none; box-shadow: none; }
.card--ghost::before { display: none; }
.card--ghost .ghost__inner { padding: var(--lg); display: flex; flex-direction: column; gap: .55rem; min-height: 150px; justify-content: center; opacity: .7; }
.card--ghost .card__title { font-size: 1.2rem; }
.ghost__soon { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--oc-gray-2); }

/* =========================================================================
   WALKTHROUGH (light)
   ========================================================================= */
.tut-head { padding-block: clamp(2.4rem, 6vw, 4rem) clamp(1.6rem, 4vw, 2.6rem); }
.back { font-size: .85rem; font-weight: 600; color: var(--oc-gray); text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.8rem; transition: gap .3s var(--ease), color .3s; }
.back:hover { color: var(--oc-orange); gap: .75rem; }
.tut-head .kicker { color: var(--oc-navy); }
.tut-head h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); max-width: 18ch; margin: .5rem 0 0; }
.tut-head__summary { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--oc-gray); max-width: 58ch; margin: 1.2rem 0 0; }
.tut-head__meta {
  margin-top: 1.7rem; padding-top: 1.2rem; border-top: 1px solid var(--oc-border);
  font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--oc-gray-2);
  display: flex; flex-wrap: wrap; gap: .5rem 1.6rem;
}
.tut-head__meta b { color: var(--oc-navy); }

.tut-body { display: grid; grid-template-columns: 1fr; gap: 0; padding-bottom: var(--xl); }
.rail { display: none; }
@media (min-width: 940px) {
  .tut-body { grid-template-columns: 210px 1fr; gap: 3rem; align-items: start; }
  .rail { position: sticky; top: 104px; display: block; }
}
.rail ol { list-style: none; margin: 0; padding: 0; }
.rail li { border-left: 2px solid var(--oc-border); }
.rail li.active { border-left-color: var(--oc-orange); }
.rail a { display: flex; align-items: center; gap: .7rem; padding: .55rem 0 .55rem 1rem; text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--oc-gray-2); transition: color .3s; }
.rail a .num { width: 24px; height: 24px; flex: none; border: 1px solid var(--oc-border); border-radius: 50%; display: grid; place-items: center; font-size: .72rem; background: var(--oc-white); transition: all .3s var(--ease); }
.rail a:hover { color: var(--oc-navy); }
.rail li.active a { color: var(--oc-navy); }
.rail li.active a .num { background: var(--oc-orange); color: #fff; border-color: var(--oc-orange); }
.rail a .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.steps { display: flex; flex-direction: column; gap: clamp(3.2rem, 7vw, 5.5rem); }
.step { scroll-margin-top: 96px; }
.step__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.step__num {
  font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--oc-orange);
  flex: none; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: .02em;
}
.step__title { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.step__caption { color: var(--oc-gray); max-width: 62ch; margin: 0 0 1.5rem; font-size: 1.05rem; }
.step__caption code { background: #e7ebf1; }

/* faux-browser frame - navy chrome (on brand), screenshot inside */
.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--oc-border); background: var(--oc-navy); box-shadow: 0 20px 48px -30px rgba(4,30,66,.55); }
.frame__bar { display: flex; align-items: center; gap: .8rem; padding: .7rem .95rem; background: var(--oc-navy); }
.frame__dots { display: flex; gap: .42rem; }
.frame__dots i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.frame__dots i:nth-child(1){ background:#ff5f57; } .frame__dots i:nth-child(2){ background:#febc2e; } .frame__dots i:nth-child(3){ background:#28c840; }
.frame__url { flex: 1; font-size: .82rem; color: #b9d0ec; background: rgba(255,255,255,.08); border-radius: 6px; padding: .3rem .8rem; display: flex; align-items: center; gap: .5rem; max-width: 430px; }
.frame__url svg { flex: none; opacity: .7; }
.frame img { width: 100%; height: auto; background: #fff; }

/* motion */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.load { opacity: 0; transform: translateY(14px); animation: rise .8s var(--ease) forwards; }
.load.d1{animation-delay:.05s;} .load.d2{animation-delay:.14s;} .load.d3{animation-delay:.24s;} .load.d4{animation-delay:.34s;} .load.d5{animation-delay:.44s;}
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal, .load { opacity: 1; transform: none; transition: none; animation: none; } }

.tut-foot { margin-top: var(--lg); padding-block: var(--xl); border-top: 1px solid var(--oc-border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.tut-foot__src { font-size: .92rem; color: var(--oc-gray); max-width: 60ch; }
.tut-foot__src b { color: var(--oc-navy); font-weight: 700; }
.tut-foot__release { margin: 0; }
.release-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--oc-navy); background: rgba(78, 133, 200, .16);
  padding: .32rem .72rem; border-radius: 100px; text-decoration: none;
  border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.release-badge:hover { background: rgba(78, 133, 200, .28); border-color: #4e85c8; }
.btn { /* secondary button: navy border + text, 6px radius, no shadow */
  font-size: .92rem; font-weight: 700; text-decoration: none; color: var(--oc-navy);
  background: transparent; border: 1.5px solid var(--oc-navy); border-radius: var(--radius);
  padding: .65rem 1.2rem; display: inline-flex; align-items: center; gap: .5rem; transition: background .25s, color .25s, gap .3s var(--ease);
}
.btn:hover { background: var(--oc-navy); color: #fff; gap: .75rem; }

/* =========================================================================
   FOOTER - dark navy panel, orange top bar, circle, brand lockup
   ========================================================================= */
.footer { position: relative; overflow: hidden; background: var(--oc-navy); color: #cdd9e6; border-top: 8px solid var(--oc-orange); margin-top: var(--xl); }
.footer::after { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: var(--circle-dark); left: -180px; top: -200px; pointer-events: none; }
.footer__inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: clamp(2.6rem,5vw,3.6rem) clamp(1.1rem,4vw,3rem); }
.footer__lede { font-size: clamp(1.15rem, 2.2vw, 1.55rem); line-height: 1.4; color: #fff; max-width: 34ch; margin: 0; font-weight: 600; }
.footer__brand { margin: 2rem 0 0; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.footer__logo { height: 40px; width: auto; filter: brightness(0) invert(1); }
.footer__kite { font-size: .92rem; font-weight: 600; color: #93a7bf; }
.footer__tag { margin: .4rem 0 0; font-weight: 700; font-size: 1rem; color: var(--oc-orange); }
.footer__meta { margin: 1.6rem 0 0; font-size: .82rem; color: #7b8ba0; }
.footer__meta a { color: #cdd9e6; }

.loading { padding: 6rem 0; text-align: center; color: var(--oc-gray); }
