﻿/* =========================================================
   MDC Studio V3 — Card Engine
   ========================================================= */

.mdc-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  background: var(--palette-surface, #ffffff);
  color: var(--palette-text, #222222);
  border: 1px solid var(--palette-border, #dddddd);
  overflow: hidden;
  isolation: isolate;
}

.mdc-card-inner {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 28px;
}

/* =========================================================
   01. SQUARE
   Four straight sides + sharp corners.
   ========================================================= */

.card-square {
  border-radius: 0;
}

/* =========================================================
   02. ROUNDED
   Four straight sides + rounded corners.
   NOT an arch.
   ========================================================= */

.card-rounded {
  border-radius: 24px;
}

/* =========================================================
   03. ARCH
   True architectural arch:
   straight vertical sides + genuinely curved upper section.
   Uses clip-path instead of ordinary rounded corners.
   ========================================================= */

.card-arch {
  border-radius: 0;
  clip-path: path(
    "M 0 100
     L 0 24
     Q 0 0 24 0
     L calc(100% - 24px) 0
     Q 100% 0 100% 24
     L 100% 100
     Z"
  );
}

/* Fallback arch appearance for browsers without path() support. */
@supports not (clip-path: path("M 0 0 L 1px 1px")) {
  .card-arch {
    border-radius: 120px 120px 0 0;
  }
}

/* =========================================================
   04. OVAL
   Horizontal / vertical oval depending on aspect ratio.
   ========================================================= */

.card-oval {
  border-radius: 50%;
  aspect-ratio: 1.35 / 1;
}

/* =========================================================
   05. CIRCLE
   Perfect circular geometry.
   ========================================================= */

.card-circle {
  aspect-ratio: 1;
  border-radius: 50%;
}

/* =========================================================
   06. PORTRAIT
   Tall editorial portrait card.
   ========================================================= */

.card-portrait {
  border-radius: 14px;
  aspect-ratio: 4 / 5;
}

/* =========================================================
   07. POLAROID
   Photo-card character with visible bottom area.
   ========================================================= */

.card-polaroid {
  border-radius: 2px;
  padding-bottom: 34px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.card-polaroid::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  height: 1px;
  background: var(--palette-border, #dddddd);
}

/* =========================================================
   08. EDITORIAL
   Magazine-inspired asymmetric frame.
   ========================================================= */

.card-editorial {
  border-radius: 0;
  border-width: 1px;
  border-left-width: 4px;
  box-shadow:
    12px 12px 0 rgba(0, 0, 0, 0.04);
}

.card-editorial::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-top: 1px solid var(--palette-accent, currentColor);
  border-right: 1px solid var(--palette-accent, currentColor);
  pointer-events: none;
}

/* =========================================================
   09. GLASS
   Frosted translucent surface.
   ========================================================= */

.card-glass {
  border-radius: 24px;
  background: color-mix(
    in srgb,
    var(--palette-surface, #ffffff) 58%,
    transparent
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: color-mix(
    in srgb,
    var(--palette-border, #dddddd) 65%,
    transparent
  );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    0 18px 45px rgba(0,0,0,0.10);
}

/* =========================================================
   10. LUXURY
   Double-line premium frame.
   ========================================================= */

.card-luxury {
  border-radius: 18px;
  border-width: 2px;
}

.card-luxury::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--palette-accent, currentColor);
  border-radius: 11px;
  pointer-events: none;
}

/* =========================================================
   11. MINIMAL
   Almost borderless with subtle lower rule.
   ========================================================= */

.card-minimal {
  border-radius: 8px;
  border-color: transparent;
  border-bottom: 2px solid var(--palette-border, #dddddd);
  box-shadow: none;
}

/* =========================================================
   12. RIBBON
   Distinct top ribbon treatment.
   ========================================================= */

.card-ribbon {
  border-radius: 20px 20px 8px 8px;
  overflow: visible;
}

.card-ribbon::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 42%;
  height: 10px;
  background: var(--palette-accent, #999999);
  border-radius: 0 0 8px 8px;
  z-index: 3;
}

.card-ribbon::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 52%;
  height: 1px;
  background: var(--palette-border, #dddddd);
}

/* =========================================================
   Shared content helpers
   ========================================================= */

.mdc-card-title {
  margin: 0 0 8px;
  font-family: var(--font-heading, serif);
  font-size: 24px;
  line-height: 1.15;
}

.mdc-card-text {
  margin: 0;
  font-family: var(--font-body, sans-serif);
  font-size: 14px;
  line-height: 1.6;
}

.mdc-card-label {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-body, sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
}
