/* copi.pe portal — neon sticky note theme */

:root {
  --bg: #0f1115;
  --surface: #1a1e26;
  --text: #f2f4f8;
  --text-muted: #9aa3b2;
  --yellow: #ffe566;
  --pink: #ff6bcb;
  --mint: #5cffc2;
  --radius: 14px;
  --radius-sm: 10px;
  --max-width: 1080px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body.portal {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.portal a {
  color: var(--mint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.portal a:hover {
  color: var(--yellow);
}

/* ── Header ── */

.portal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.portal-logo img {
  display: block;
  height: 52px;
  width: auto;
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.portal-nav a:hover {
  color: var(--text);
}

/* ── Main sections ── */

.portal-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.portal-section {
  padding: 3.5rem 0;
}

.portal-section__title {
  margin: 0 0 1.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.portal-section__title span {
  display: inline-block;
  padding: 0.15em 0.6em;
  background: var(--yellow);
  color: var(--bg);
  border-radius: var(--radius-sm);
  transform: rotate(-1.5deg);
}

/* ── Hero ── */

.portal-hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.portal-hero__heading {
  margin: 0 0 1.25rem;
  font-size: clamp(1.6rem, 4.5vw, 2.35rem);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.portal-hero__lead {
  max-width: 38em;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  text-align: left;
}

.portal-hero__cta {
  display: inline-block;
  padding: 0.75em 1.75em;
  background: var(--yellow);
  color: var(--bg) !important;
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--radius);
  transform: rotate(-1deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 0 var(--pink);
}

.portal-hero__cta:hover {
  color: var(--bg) !important;
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 6px 0 var(--pink);
}

/* ── Service cards ── */

.portal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.portal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--yellow);
  color: var(--bg);
  border-radius: var(--radius);
  min-height: 180px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.portal-card::before,
.portal-card::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* top-right mint fold */
.portal-card::before {
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 36px 36px 0;
  border-color: transparent var(--mint) transparent transparent;
}

/* bottom-left pink fold */
.portal-card::after {
  bottom: 0;
  left: 0;
  border-style: solid;
  border-width: 36px 0 0 36px;
  border-color: transparent transparent transparent var(--pink);
}

.portal-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.portal-card--soon {
  background: var(--surface);
  color: var(--text-muted);
  cursor: default;
  border: 2px dashed rgba(255, 255, 255, 0.12);
}

.portal-card--soon::before {
  border-color: transparent rgba(92, 255, 194, 0.35) transparent transparent;
}

.portal-card--soon::after {
  border-color: transparent transparent transparent rgba(255, 107, 203, 0.35);
}

.portal-card--soon:hover {
  transform: none;
  box-shadow: none;
}

.portal-card__heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.portal-card__icon {
  display: block;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 17, 21, 0.2);
}

.portal-card__heading .portal-card__title {
  margin: 0;
}

.portal-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.3;
}

.portal-card__desc {
  margin: 0;
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.85;
}

.portal-card__arrow {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 800;
  opacity: 0.7;
}

.portal-card:not(.portal-card--soon) .portal-card__arrow {
  color: var(--bg);
}

a.portal-card {
  text-decoration: none;
  color: var(--bg);
}

a.portal-card:hover {
  color: var(--bg);
}

/* ── News ── */

.portal-news {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
}

.portal-news__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.portal-news__empty span {
  display: inline-block;
  padding: 0.2em 0.65em;
  background: rgba(255, 229, 102, 0.15);
  color: var(--yellow);
  border-radius: var(--radius-sm);
  font-weight: 700;
}

/* ── Footer ── */

.portal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--surface);
  padding: 2.5rem 1.5rem;
}

.portal-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.portal-footer__tagline {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.portal-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.portal-footer__links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.portal-footer__links a:hover {
  color: var(--mint);
}

.portal-footer__badge {
  margin-top: 0.5rem;
}

.portal-footer__badge img {
  height: 31px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}

.portal-footer__badge a:hover img {
  opacity: 1;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .portal-header__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }

  .portal-logo img {
    height: 44px;
  }

  .portal-hero {
    padding: 2.5rem 0 2rem;
  }

  .portal-hero__lead {
    font-size: 1rem;
  }

  .portal-section {
    padding: 2.5rem 0;
  }
}
/* copi.pe subpages — dark neon sticky prose (pairs with portal.css) */

.service-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

/* ── Typography ── */

.service-page .service-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.5rem;
  text-align: center;
}

.service-page .service-hero__icon {
  display: block;
  width: 128px;
  height: 128px;
  margin: 0;
  border: none;
  border-radius: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.service-page .service-hero h1 {
  margin: 0;
}

.service-page h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.service-page h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.25rem;
  font-weight: 800;
}

.service-page h2::before {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 1em;
  margin-right: 0.45em;
  background: var(--yellow);
  border-radius: 3px;
  vertical-align: -0.1em;
  transform: rotate(-2deg);
}

.service-page h3 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--mint);
}

.service-page p,
.service-page li {
  color: var(--text-muted);
}

.service-page p {
  margin: 0 0 1rem;
}

.service-page ul,
.service-page ol {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
}

.service-page li {
  margin-bottom: 0.35rem;
}

.service-page a {
  color: var(--mint);
  text-decoration: underline;
  text-decoration-color: rgba(92, 255, 194, 0.35);
  text-underline-offset: 0.15em;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.service-page a:hover {
  color: var(--yellow);
  text-decoration-color: rgba(255, 229, 102, 0.5);
}

.service-page strong {
  color: var(--text);
  font-weight: 700;
}

.service-page code {
  padding: 0.15em 0.45em;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--yellow);
}

.service-page img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.service-page .service-screenshots {
  display: grid;
  gap: 2rem;
  margin: 1.5rem 0 2rem;
}

.service-page .service-screenshot {
  margin: 0;
}

.service-page .service-screenshot img {
  margin: 0 0 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.service-page .service-screenshot figcaption {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.service-page .service-screenshot figcaption strong {
  color: var(--text);
}

/* ── Lead paragraph ── */

.service-page .service-lead {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text);
}

/* ── CTA button ── */

.service-page #misskey-join-button,
.service-page .service-cta {
  display: block;
  width: 100%;
  max-width: 22rem;
  margin: 1.25rem 0;
  padding: 0.85em 1.25em;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
  color: #0f1115 !important;
  background: var(--yellow);
  border: none;
  border-radius: var(--radius);
  text-decoration: none !important;
  box-shadow: 0 4px 0 var(--pink);
  transform: rotate(-0.5deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service-page #misskey-join-button:hover,
.service-page .service-cta:hover {
  color: #0f1115 !important;
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 6px 0 var(--pink);
  text-decoration: none !important;
}

/* ── Sticky-note info card ── */

.service-page .service-info {
  position: relative;
  margin: 1.75rem 0;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--yellow);
  color: #0f1115;
  border-radius: var(--radius);
  overflow: hidden;
}

.service-page .service-info::before,
.service-page .service-info::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.service-page .service-info::before {
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 28px 28px 0;
  border-color: transparent var(--mint) transparent transparent;
}

.service-page .service-info::after {
  bottom: 0;
  left: 0;
  border-style: solid;
  border-width: 28px 0 0 28px;
  border-color: transparent transparent transparent var(--pink);
}

.service-page .service-info p {
  margin: 0 0 1rem;
  color: #0f1115;
}

.service-page .service-info p:last-child {
  margin-bottom: 0;
}

.service-page .service-info strong {
  color: #0f1115;
}

.service-page .service-info a {
  color: #0f1115;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(15, 17, 21, 0.35);
}

.service-page .service-info a:hover {
  color: #0f1115;
  text-decoration-color: #0f1115;
}

.service-page .service-info code {
  background: rgba(15, 17, 21, 0.1);
  border-color: rgba(15, 17, 21, 0.15);
  color: #0f1115;
}

/* ── Note callout ── */

.service-page .service-note {
  margin: 1.25rem 0;
  padding: 0.85rem 1.1rem;
  background: rgba(255, 229, 102, 0.12);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text);
}

/* ── Server info table ── */

.service-page .service-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.25rem 0 1.75rem;
  font-size: 0.95rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.service-page .service-table th,
.service-page .service-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.service-page .service-table tr:last-child th,
.service-page .service-table tr:last-child td {
  border-bottom: none;
}

.service-page .service-table th {
  width: 9em;
  font-weight: 800;
  color: var(--yellow);
  white-space: nowrap;
  background: rgba(255, 229, 102, 0.06);
}

.service-page .service-table td {
  color: var(--text-muted);
}

.service-page .service-table code {
  color: var(--mint);
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.06);
}

/* ── 404 helper ── */

.service-page--centered {
  text-align: center;
  padding: 3rem 0;
}

.service-page--centered h1 {
  font-size: clamp(4rem, 15vw, 7rem);
  color: var(--yellow);
  transform: rotate(-2deg);
}

.service-page--centered p {
  color: var(--text-muted);
}

.service-page--centered a {
  font-weight: 700;
}

@media (max-width: 600px) {
  .service-page .service-table th,
  .service-page .service-table td {
    display: block;
    width: 100%;
  }

  .service-page .service-table th {
    padding-bottom: 0.25rem;
    border-bottom: none;
  }

  .service-page .service-table td {
    padding-top: 0;
    padding-bottom: 0.85rem;
  }
}

/* ── Sticky-note info card headings (markdown="1" blocks) ── */

.service-page .service-info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f1115;
}

.service-page .service-info h3:not(:first-child) {
  margin-top: 1.25rem;
}
