/* ------------------------------
   FlareCraft Style System
   Floral Palette Edition
   Namespace: fc-
   ------------------------------ */

:root {
  /* Color Tokens — Floral Theme */
  --fc-primary: #e08aad;      /* Petal pink */
  --fc-surface: #f6eef2;      /* Soft blossom surface */
  --fc-paper: #faf6f9;        /* Orchid paper white */
  --fc-ink: #402a38;          /* Floral stem brown */
  --fc-muted: #b67f99;        /* Soft orchid lavender */

  /* Motion Tokens */
  --fc-motion-fast: 150ms;
  --fc-motion-med: 260ms;
  --fc-motion-slow: 420ms;
  --fc-easing: cubic-bezier(.22,.61,.36,1);

  /* Shadows + Radii */
  --fc-radius: 14px;
  --fc-shadow-soft: 0 8px 22px rgba(224,138,173,0.25);
  --fc-shadow-drift: 0 14px 40px rgba(180,120,150,0.28);

  /* Layout Width */
  --fc-width: 900px;
  --fc-space: 32px;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Typography */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--fc-paper);
  color: var(--fc-ink);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ultra subtle floral background wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(120% 60% at 80% 20%, rgba(224,138,173,0.14), transparent 60%),
    linear-gradient(120deg, rgba(240,210,225,0.20), rgba(250,230,240,0.20));
  animation: fc-wash 24s ease-in-out infinite alternate;
  opacity: .50;
}

@keyframes fc-wash {
  0% { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(0,-2%,0) scale(1.02); }
}

/* Header + Logo */
.fc-header {
  padding: var(--fc-space) 0 var(--fc-space) 0;
  text-align: center;
}

.fc-logo-wrap {
  margin-bottom: 20px;
}

.fc-logo {
  width: 140px;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Navigation */
.fc-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 28px;
}

.fc-nav a {
  text-decoration: none;
  color: var(--fc-muted);
  padding: 10px 16px;
  border-radius: var(--fc-radius);
  transition: background var(--fc-motion-med) var(--fc-easing),
             color var(--fc-motion-med) var(--fc-easing);
  position: relative;
}

/* Animated link underline */
.fc-link,
.fc-nav a {
  position: relative;
  text-decoration: none;
  border-bottom: none;
}

.fc-link::after,
.fc-nav a::after {
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-2px;
  height:2px;
  background: linear-gradient(90deg, var(--fc-primary), transparent);
  transform: scaleX(0);
  transform-origin:left;
  transition: transform var(--fc-motion-med) var(--fc-easing);
}

.fc-link:hover::after,
.fc-nav a:hover::after {
  transform: scaleX(1);
}

.fc-nav a.fc-active {
  color: var(--fc-primary);
}

/* Layout */
.fc-main {
  width: 100%;
  max-width: var(--fc-width);
  margin: 0 auto;
  padding-bottom: var(--fc-space);
}

.fc-article {
  padding: 0 var(--fc-space);
}

/* Headings */
.fc-h1 {
  font-size: 2.4rem;
  margin-bottom: var(--fc-space);
  color: var(--fc-ink);
  text-align: left;
}

/* Dek */
.fc-dek {
  font-size: 1.15rem;
  margin-bottom: var(--fc-space);
  color: var(--fc-muted);
}

/* Floral-framed image */
.fc-figure {
  margin-bottom: var(--fc-space);
}

.fc-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--fc-radius);
  box-shadow: 0 10px 32px rgba(224,138,173,0.28);
  outline: 4px solid rgba(224,138,173,0.25);
  display: block;
}

/* ----------------------------------------------------
   Sections — Final Floral Dividers (correct)
   ---------------------------------------------------- */

section.fc-section {
  margin-bottom: var(--fc-space);
  padding-bottom: calc(var(--fc-space)*1.8);
  position: relative;
  border-bottom: none !important;
}

/* Remove old reveal line */
section.fc-section::before,
section.fc-section.is-seen::before {
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
  border: none !important;
  display: none !important;
}

/* New horizontal floral divider */
section.fc-section::after {
  content:"";
  position:absolute;
  bottom:0;
  left:50%;
  width:95%;
  height:2px;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(224,138,173,0.55),
    transparent
  );
  transform:translateX(-50%);
}

/* Centered petal ornament */
.fc-divider-petal {
  content:"";
  position:absolute;
  bottom:-10px;
  left:50%;
  width:20px;
  height:20px;
  background:rgba(224,138,173,0.65);
  border-radius:60% 40% 60% 40%;
  transform:translateX(-50%) rotate(45deg);
  box-shadow:0 2px 6px rgba(224,138,173,0.35);
  pointer-events:none;
}

/* Paragraph Justification */
article p,
section p,
main p,
p {
  text-align: justify !important;
  text-justify: inter-word !important;
  -webkit-hyphens: auto !important;
  -ms-hyphens: auto !important;
  hyphens: auto !important;
  margin-bottom: var(--fc-space);
  color: var(--fc-ink);
}

/* ----------------------------------------------------
   Footer — Petal Capsule
   ---------------------------------------------------- */

.fc-footer {
  text-align: center;
  padding: var(--fc-space) 0;
  position: relative;
}

.fc-footer p {
  display: inline-block;
  padding: 14px 28px;
  background: #f7dce7;
  color: #402a38;
  border-radius: 40px 40px 28px 28px;
  box-shadow: 0 8px 22px rgba(224,138,173,0.25),
              0 0 0 6px rgba(224,138,173,0.15);
  border: 1px solid rgba(224,138,173,0.35);
}

/* ----------------------------------------------------
   Back to Top — Fully Fixed & Visible
   ---------------------------------------------------- */

.fc-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border: none;
  background: var(--fc-primary);
  color: #fff;
  font: 700 18px/46px system-ui,-apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  z-index: 9999;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(224,138,173,0.35);

  clip-path: polygon(
    50% 0%,
    64% 22%,
    88% 28%,
    72% 48%,
    76% 72%,
    50% 62%,
    24% 72%,
    28% 48%,
    12% 28%,
    36% 22%
  );

  transition:
    opacity .25s ease,
    transform .25s ease,
    background .2s ease;
}

/* Hidden when NOT scrolled */
.fc-to-top:not(.fc-show) {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* Visible when scrolled */
.fc-to-top.fc-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fc-to-top:hover {
  background: #f9c6d6;
  color: #402a38;
}

/* Ripple */
.fc-to-top .ripple {
  position:absolute;
  border-radius:999px;
  pointer-events:none;
  opacity:.45;
  transform:translate(-50%,-50%) scale(0);
  background:#fff;
  animation:fc-ripple .6s ease-out forwards;
}

@keyframes fc-ripple {
  to { transform:translate(-50%,-50%) scale(8); opacity:0; }
}

/* ----------------------------------------------------
   Reading Progress Bar
   ---------------------------------------------------- */

.fc-progress {
  position:fixed;
  left:0;
  top:0;
  height:3px;
  width:0%;
  background:linear-gradient(90deg, var(--fc-primary), transparent);
  z-index:9998;
  transition:width var(--fc-motion-fast) linear;
}

/* ----------------------------------------------------
   Responsive
   ---------------------------------------------------- */

@media (max-width:700px){
  .fc-article{padding:0 18px;}
  .fc-nav ul{gap:16px;flex-wrap:wrap;}
  .fc-h1{font-size:2rem;}
  .fc-dek{font-size:1.05rem;}
}

/* ------------------------------
   FlareCraft Style System
   Floral Palette Edition
   Namespace: fc-
   ------------------------------ */

:root {
  /* Color Tokens — Floral Theme */
  --fc-primary: #e08aad;      /* Petal pink */
  --fc-surface: #f6eef2;      /* Soft blossom surface */
  --fc-paper: #faf6f9;        /* Orchid paper white */
  --fc-ink: #402a38;          /* Floral stem brown */
  --fc-muted: #b67f99;        /* Soft orchid lavender */

  /* Motion Tokens */
  --fc-motion-fast: 150ms;
  --fc-motion-med: 260ms;
  --fc-motion-slow: 420ms;
  --fc-easing: cubic-bezier(.22,.61,.36,1);

  /* Shadows + Radii */
  --fc-radius: 14px;
  --fc-shadow-soft: 0 8px 22px rgba(224,138,173,0.25);
  --fc-shadow-drift: 0 14px 40px rgba(180,120,150,0.28);

  /* Layout Width */
  --fc-width: 900px;
  --fc-space: 32px;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Typography */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--fc-paper);
  color: var(--fc-ink);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ultra subtle floral background wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(120% 60% at 80% 20%, rgba(224,138,173,0.14), transparent 60%),
    linear-gradient(120deg, rgba(240,210,225,0.20), rgba(250,230,240,0.20));
  animation: fc-wash 24s ease-in-out infinite alternate;
  opacity: .50;
}

@keyframes fc-wash {
  0% { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(0,-2%,0) scale(1.02); }
}

/* Header + Logo */
.fc-header {
  padding: var(--fc-space) 0 var(--fc-space) 0;
  text-align: center;
}

.fc-logo-wrap {
  margin-bottom: 20px;
}

.fc-logo {
  width: 140px;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Navigation */
.fc-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 28px;
}

.fc-nav a {
  text-decoration: none;
  color: var(--fc-muted);
  padding: 10px 16px;
  border-radius: var(--fc-radius);
  transition: background var(--fc-motion-med) var(--fc-easing),
             color var(--fc-motion-med) var(--fc-easing);
  position: relative;
}

/* Animated link underline */
.fc-link,
.fc-nav a {
  position: relative;
  text-decoration: none;
  border-bottom: none;
}

.fc-link::after,
.fc-nav a::after {
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:-2px;
  height:2px;
  background: linear-gradient(90deg, var(--fc-primary), transparent);
  transform: scaleX(0);
  transform-origin:left;
  transition: transform var(--fc-motion-med) var(--fc-easing);
}

.fc-link:hover::after,
.fc-nav a:hover::after {
  transform: scaleX(1);
}

.fc-nav a.fc-active {
  color: var(--fc-primary);
}

/* Layout */
.fc-main {
  width: 100%;
  max-width: var(--fc-width);
  margin: 0 auto;
  padding-bottom: var(--fc-space);
}

.fc-article {
  padding: 0 var(--fc-space);
}

/* Headings */
.fc-h1 {
  font-size: 2.4rem;
  margin-bottom: var(--fc-space);
  color: var(--fc-ink);
  text-align: left;
}

/* Dek */
.fc-dek {
  font-size: 1.15rem;
  margin-bottom: var(--fc-space);
  color: var(--fc-muted);
}

/* Floral-framed image */
.fc-figure {
  margin-bottom: var(--fc-space);
}

.fc-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--fc-radius);
  box-shadow: 0 10px 32px rgba(224,138,173,0.28);
  outline: 4px solid rgba(224,138,173,0.25);
  display: block;
}

/* ----------------------------------------------------
   Sections — Final Floral Dividers (correct)
   ---------------------------------------------------- */

section.fc-section {
  margin-bottom: var(--fc-space);
  padding-bottom: calc(var(--fc-space)*1.8);
  position: relative;
  border-bottom: none !important;
}

/* Remove old reveal line */
section.fc-section::before,
section.fc-section.is-seen::before {
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
  border: none !important;
  display: none !important;
}

/* New horizontal floral divider */
section.fc-section::after {
  content:"";
  position:absolute;
  bottom:0;
  left:50%;
  width:95%;
  height:2px;
  background:linear-gradient(
    90deg,
    transparent,
    rgba(224,138,173,0.55),
    transparent
  );
  transform:translateX(-50%);
}

/* Centered petal ornament */
.fc-divider-petal {
  content:"";
  position:absolute;
  bottom:-10px;
  left:50%;
  width:20px;
  height:20px;
  background:rgba(224,138,173,0.65);
  border-radius:60% 40% 60% 40%;
  transform:translateX(-50%) rotate(45deg);
  box-shadow:0 2px 6px rgba(224,138,173,0.35);
  pointer-events:none;
}

/* Paragraph Justification */
article p,
section p,
main p,
p {
  text-align: justify !important;
  text-justify: inter-word !important;
  -webkit-hyphens: auto !important;
  -ms-hyphens: auto !important;
  hyphens: auto !important;
  margin-bottom: var(--fc-space);
  color: var(--fc-ink);
}

/* ----------------------------------------------------
   Footer — Petal Capsule
   ---------------------------------------------------- */

.fc-footer {
  text-align: center;
  padding: var(--fc-space) 0;
  position: relative;
}

.fc-footer p {
  display: inline-block;
  padding: 14px 28px;
  background: #f7dce7;
  color: #402a38;
  border-radius: 40px 40px 28px 28px;
  box-shadow: 0 8px 22px rgba(224,138,173,0.25),
              0 0 0 6px rgba(224,138,173,0.15);
  border: 1px solid rgba(224,138,173,0.35);
}

/* ----------------------------------------------------
   Back to Top — Fully Fixed & Visible
   ---------------------------------------------------- */

.fc-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px;
  height: 46px;
  border: none;
  background: var(--fc-primary);
  color: #fff;
  font: 700 18px/46px system-ui,-apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  text-align: center;
  cursor: pointer;
  z-index: 9999;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(224,138,173,0.35);

  clip-path: polygon(
    50% 0%,
    64% 22%,
    88% 28%,
    72% 48%,
    76% 72%,
    50% 62%,
    24% 72%,
    28% 48%,
    12% 28%,
    36% 22%
  );

  transition:
    opacity .25s ease,
    transform .25s ease,
    background .2s ease;
}

/* Hidden when NOT scrolled */
.fc-to-top:not(.fc-show) {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* Visible when scrolled */
.fc-to-top.fc-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.fc-to-top:hover {
  background: #f9c6d6;
  color: #402a38;
}

/* Ripple */
.fc-to-top .ripple {
  position:absolute;
  border-radius:999px;
  pointer-events:none;
  opacity:.45;
  transform:translate(-50%,-50%) scale(0);
  background:#fff;
  animation:fc-ripple .6s ease-out forwards;
}

@keyframes fc-ripple {
  to { transform:translate(-50%,-50%) scale(8); opacity:0; }
}

/* ----------------------------------------------------
   Reading Progress Bar
   ---------------------------------------------------- */

.fc-progress {
  position:fixed;
  left:0;
  top:0;
  height:3px;
  width:0%;
  background:linear-gradient(90deg, var(--fc-primary), transparent);
  z-index:9998;
  transition:width var(--fc-motion-fast) linear;
}

/* ----------------------------------------------------
   Responsive
   ---------------------------------------------------- */

@media (max-width:700px){
  .fc-article{padding:0 18px;}
  .fc-nav ul{gap:16px;flex-wrap:wrap;}
  .fc-h1{font-size:2rem;}
  .fc-dek{font-size:1.05rem;}
}

/* ----------------------------------------------------
   Floral Petal-Loop Navigation Buttons
   ---------------------------------------------------- */

.fc-nav a {
  position: relative;
  padding: 12px 20px;
  color: var(--fc-muted);
  background: var(--fc-surface);
  border: 1px solid rgba(224,138,173,0.35);
  box-shadow: 0 4px 12px rgba(224,138,173,0.15);
  transition:
    background var(--fc-motion-med) var(--fc-easing),
    color var(--fc-motion-med) var(--fc-easing),
    transform var(--fc-motion-fast) var(--fc-easing),
    box-shadow var(--fc-motion-fast) var(--fc-easing);
  
  /* Organic petal-loop contour */
  clip-path: polygon(
    10% 0%,
    90% 0%,
    100% 25%,
    95% 70%,
    75% 100%,
    25% 100%,
    5% 70%,
    0% 25%
  );
}

/* Hover effect */
.fc-nav a:hover {
  background: #f7dce7;
  color: var(--fc-ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(224,138,173,0.25);
}

/* Active link color consistency */
.fc-nav a.fc-active {
  color: var(--fc-primary);
}

