/*
Theme Name: Antaratma
Theme URI: https://example.com/antaratma
Author: —
Description: A premium editorial theme for a philosophy and ideas publication. Component-based, token-driven, and built so that new posts, pages and categories inherit the design system automatically. Includes a lightweight canvas-based 3D signature experience, full archive/single/search/404 templates, Gutenberg patterns and block styles, JSON-LD schema, and an accessible contact form.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: antaratma
Tags: blog, editorial, one-column, custom-colors, custom-logo, custom-menu, featured-images, block-patterns, block-styles, translation-ready, accessibility-ready
*/

/* ==========================================================================
   This file loads LAST. Put custom overrides here — everything above is
   the design system and should rarely need editing.

   Layer order:
     01-tokens.css      variables (change colours here)
     02-base.css        reset + prose
     03-components.css  cards, buttons, forms
     04-layout.css      header, footer, sections
     style.css          <- you are here
   ========================================================================== */


/* ==========================================================================
   GUTENBERG BLOCK STYLES
   Registered in inc/blocks.php, styled here.
   ========================================================================== */

.prose .is-style-antaratma-pullquote {
  border-left: 1px solid var(--accent);
  border-top: 0;
  padding-left: var(--s-6);
  margin-block: var(--s-8);
  font-family: var(--font-display);
  font-size: var(--t-xl);
  font-weight: var(--w-light);
  font-style: normal;
  line-height: 1.28;
  letter-spacing: var(--ls-tighter);
  color: var(--ink);
}
.prose .is-style-antaratma-pullquote p { margin: 0; font-size: inherit; }
.prose .is-style-antaratma-pullquote cite {
  display: block;
  margin-top: var(--s-4);
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  font-style: normal;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--ink-faint);
}

.prose .is-style-antaratma-lede {
  font-size: var(--t-lg);
  font-style: italic;
  color: var(--ink-muted);
  line-height: var(--lh-normal);
}

.is-style-antaratma-eyebrow {
  font-family: var(--font-sans) !important;
  font-size: var(--t-2xs) !important;
  font-weight: var(--w-medium) !important;
  letter-spacing: var(--ls-widest) !important;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Asterism separator — three dots, a print convention */
.prose .is-style-antaratma-asterism {
  border: 0;
  background: none;
  height: auto;
  text-align: center;
  margin-block: var(--s-8);
}
.prose .is-style-antaratma-asterism::before {
  content: "⁂";
  font-family: var(--font-serif);
  font-size: var(--t-lg);
  color: var(--accent);
  letter-spacing: 0.4em;
}

.prose .is-style-antaratma-framed img {
  border: 1px solid var(--rule);
  padding: var(--s-4);
  background: var(--bg-raised);
  border-radius: var(--r-sm);
}

/* Core block colour classes from the editor palette */
.has-ivory-color { color: var(--c-ivory-50); }
.has-parchment-color { color: var(--c-parchment); }
.has-stone-color { color: var(--c-stone); }
.has-earth-color { color: var(--c-earth); }
.has-obsidian-color { color: var(--c-obsidian); }
.has-bronze-color { color: var(--c-bronze); }
.has-saffron-color { color: var(--c-saffron); }

.has-ivory-background-color { background-color: var(--c-ivory-50); }
.has-parchment-background-color { background-color: var(--c-parchment); }
.has-stone-background-color { background-color: var(--c-stone); }
.has-earth-background-color { background-color: var(--c-earth); }
.has-obsidian-background-color { background-color: var(--c-obsidian); }
.has-bronze-background-color { background-color: var(--c-bronze); }
.has-saffron-background-color { background-color: var(--c-saffron); }


/* ==========================================================================
   COMMENTS
   ========================================================================== */

.comments-title, .comment-reply-title {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  font-weight: var(--w-light);
  letter-spacing: var(--ls-tighter);
  margin-bottom: var(--s-7);
}

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: var(--s-6); }
.comment-list .children {
  list-style: none;
  margin: var(--s-5) 0 0;
  padding-left: var(--s-6);
  border-left: 1px solid var(--rule);
}

.comment-body {
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--rule);
}
.comment-author {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: var(--w-medium);
}
.comment-author img { border-radius: var(--r-full); filter: grayscale(1); }
.comment-metadata {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  color: var(--ink-faint);
  margin-top: var(--s-2);
}
.comment-metadata a { text-decoration: none; }
.comment-content { margin-top: var(--s-4); color: var(--ink-muted); }
.comment-content p + p { margin-top: var(--s-4); }
.reply { margin-top: var(--s-3); }
.reply a {
  font-family: var(--font-sans);
  font-size: var(--t-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
}

.comment-form { display: grid; gap: var(--s-5); margin-top: var(--s-7); }
.comment-form label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--t-2xs);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s-2);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 1em 1.2em;
  font-family: var(--font-sans);
  font-size: var(--t-base);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-full);
}
.comment-form textarea { border-radius: var(--r-lg); min-height: 9rem; }
.comment-form input:focus, .comment-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}
.comment-form .submit {
  justify-self: start;
  padding: 1.05em 2.1em;
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: var(--w-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background var(--d-base) var(--e-out);
}
.comment-form .submit:hover { background: var(--accent); border-color: var(--accent); }
.comment-form-cookies-consent { display: flex; align-items: center; gap: var(--s-3); }
.comment-form-cookies-consent label {
  margin: 0;
  text-transform: none;
  letter-spacing: var(--ls-normal);
  font-size: var(--t-xs);
}


/* ==========================================================================
   RESPONSIVE REFINEMENTS
   Mobile is not a shrunken desktop — layouts are re-composed.
   ========================================================================== */

/* --- Tablet: 1024px --- */
@media (max-width: 64rem) {
  .featured { grid-template-columns: 1fr; }
  .featured__media { aspect-ratio: 16 / 9; }

  .article-layout { grid-template-columns: var(--gutter) 1fr var(--gutter); }
}

/* --- Large phone: 768px --- */
@media (max-width: 48rem) {
  :root { --header-h: 4.25rem; }

  /* Asymmetric layouts collapse via .grid--split (03-components.css) —
     no inline-style matching required. */

  .hero { min-height: 92svh; }
  .hero__title { font-size: clamp(2.75rem, 13vw, 4.5rem); }

  .observer__track { height: 320svh; }
  .mind__track { height: 260svh; }

  .footer__watermark { font-size: 22vw; }
}

/* --- Phone: 430px and below --- */
@media (max-width: 27rem) {
  :root {
    --gutter: 1.25rem;
    --section-y: 3.5rem;
    --section-y-lg: 5rem;
  }

  /* A reading app, not a shrunk website: bigger body text, tighter chrome */
  .prose { font-size: 1.0625rem; line-height: 1.72; }
  .prose > p:first-of-type::first-letter { font-size: 3.2em; }

  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .hero__scroll { display: none; }

  .card--horizontal { gap: var(--s-4); }
  .cat-card { min-height: 13rem; padding: var(--s-5); }

  .share { flex-wrap: wrap; }
  .author-box { padding: var(--s-5); }

  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .footer__legal { gap: var(--s-4); }

  .pagination .page-numbers { min-width: 2.5rem; height: 2.5rem; }
}

/* --- Very small: 360px --- */
@media (max-width: 22.5rem) {
  .brand__tag { display: none; }
  .quote-display { font-size: var(--t-xl); }
}

/* --- Landscape phones: don't force 100svh heroes --- */
@media (max-height: 30rem) and (orientation: landscape) {
  .hero { min-height: auto; padding-block: calc(var(--header-h) + var(--s-7)) var(--s-7); }
  .observer__stage, .mind__stage { height: 100svh; }
}


/* ==========================================================================
   PRINT — articles should print cleanly
   ========================================================================== */

@media print {
  .header, .footer, .progress, .share, .post-nav,
  .menu-overlay, .search-overlay, .newsletter,
  .hero__canvas, .observer, .mind { display: none !important; }

  body { background: #fff; color: #000; font-size: 11pt; }
  body::after { display: none; }

  .prose { max-width: none; font-size: 11pt; }
  .prose a { text-decoration: underline; }
  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }
  .article-hero__figure { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
}


/* ==========================================================================
   FORCED COLORS / HIGH CONTRAST
   ========================================================================== */

@media (forced-colors: active) {
  .btn, .tag, .input, .textarea { border: 1px solid ButtonBorder; }
  .btn::before, .cat-card::before { display: none; }
  body::after { display: none; }
}
