@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Space+Grotesk:wght@400;500;600&display=swap");

/*
Theme Name: iDevice Frame
Theme URI: https://example.com/
Author: Codex
Description: A WordPress theme that renders an iPad-style frame on desktop and an iPhone-style frame on mobile.
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: idevice-frame
*/

:root {
  --bg-1: #f6f1e9;
  --bg-2: #e8eef6;
  --bg-3: #ffe9dc;
  --ink: #202327;
  --muted: #6b7280;
  --accent: #ff6b4a;
  --accent-2: #2c6bed;
  --frame-dark: #1f2430;
  --frame-light: #e9edf3;
  --screen: #ffffff;
  --shadow: rgba(18, 18, 23, 0.25);
  --radius-lg: 36px;
  --radius-md: 24px;
  --radius-sm: 18px;
  --gutter: 28px;
  --max-content: 820px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, var(--bg-2), transparent 45%),
    radial-gradient(circle at 92% 15%, var(--bg-3), transparent 35%),
    linear-gradient(180deg, #fff7f1 0%, #f6f1e9 50%, #fdfdfd 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 32px var(--gutter) 12px;
  text-align: center;
}

.site-title {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
  letter-spacing: 0.04em;
  margin: 0;
}

.site-tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.device-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px var(--gutter) 56px;
}

.device {
  position: relative;
  width: min(92vw, 980px);
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #3b4253, #1b202b);
  border-radius: calc(var(--radius-lg) + 6px);
  box-shadow: 0 24px 60px var(--shadow);
  padding: 26px;
  animation: float-in 0.8s ease-out;
}

.device::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, var(--frame-dark), #2f3645);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.device::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #8b93a1, #2f3645);
  opacity: 0.7;
}

.screen {
  position: relative;
  background: var(--screen);
  border-radius: var(--radius-md);
  padding: 32px 36px 40px;
  height: 100%;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.06),
    inset 0 0 30px rgba(32, 35, 39, 0.05);
}

.screen-content {
  height: 100%;
  overflow-y: auto;
  padding-right: 8px;
}

.screen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.screen-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #101521;
  color: #f9fafb;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.screen-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.screen-hero {
  position: relative;
  background: linear-gradient(120deg, #fff1e6, #f4f8ff);
  border-radius: 20px;
  padding: 22px 24px;
  margin-bottom: 24px;
  overflow: hidden;
}

.screen-hero::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(44, 107, 237, 0.2), transparent 70%);
}

.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.hero-title {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: clamp(1.6rem, 2vw, 2.1rem);
  margin: 0 0 8px;
}

.hero-copy {
  margin: 0;
  color: #3f4550;
}

.post-grid {
  display: grid;
  gap: 18px;
}

.post-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 14px 30px rgba(20, 22, 29, 0.08);
  border: 1px solid rgba(20, 22, 29, 0.04);
  animation: rise-in 0.6s ease both;
}

.post-card:nth-child(2) {
  animation-delay: 0.1s;
}

.post-card:nth-child(3) {
  animation-delay: 0.2s;
}

.post-thumb img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  margin-bottom: 14px;
}

.post-title {
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  margin: 0 0 10px;
  font-family: "Playfair Display", "Times New Roman", serif;
}

.post-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.post-content {
  line-height: 1.7;
  font-size: 1rem;
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--accent);
}

.read-more:hover {
  color: var(--accent-2);
}

.site-nav {
  margin-top: 16px;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.nav-list a {
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-list a:hover {
  border-color: var(--accent);
}

.site-footer {
  text-align: center;
  padding: 12px 0 28px;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .device {
    width: min(94vw, 680px);
  }
}

@media (max-width: 768px) {
  .site-header {
    padding-top: 20px;
  }

  .device-stage {
    padding: 20px 18px 40px;
  }

  .device {
    aspect-ratio: 9 / 19.5;
    border-radius: 52px;
    padding: 18px;
    background: linear-gradient(150deg, #202532, #121621);
  }

  .device::before {
    inset: 10px;
    border-radius: 46px;
  }

  .device::after {
    width: 140px;
    height: 18px;
    border-radius: 10px;
    top: 28px;
    background: #0c0f16;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }

  .screen {
    border-radius: 32px;
    padding: 28px 22px 36px;
  }

  .screen::before {
    content: "";
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    border-radius: 999px;
    background: #e5e7eb;
  }

  .screen-hero {
    padding: 20px;
  }

  .nav-list {
    gap: 10px;
    font-size: 0.75rem;
  }
}

@keyframes float-in {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes rise-in {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
