/*
Theme Name: Real Nihongo
Theme URI: https://realnihongo.com
Author: Real Nihongo
Author URI: https://realnihongo.com
Description: Clean, sleek English to Japanese translation platform theme.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
Text Domain: real-nihongo
*/

/* ============================================================
   RESET & BASE
   ============================================================ */

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

:root {
    --red:      #C8102E;
    --red-dark: #a00d24;
    --black:    #111111;
    --white:    #ffffff;
    --grey-100: #f7f7f7;
    --grey-200: #eeeeee;
    --grey-400: #999999;
    --grey-600: #555555;

    --font-main: 'Outfit', Arial, sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
    --shadow-md: 0 6px 24px rgba(0,0,0,0.10);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.13);

    --max-width: 1160px;
    --gutter:    clamp(20px, 5vw, 60px);

    --header-h: 68px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: var(--font-main);
    font-size: inherit;
}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
    line-height: 1.15;
    color: var(--black);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); letter-spacing: -0.01em; }
h4 { font-size: 1.15rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
h6 { font-size: 0.9rem; font-weight: 600; }

p {
    font-size: 1rem;
    color: var(--grey-600);
    line-height: 1.75;
    max-width: 680px;
}

strong { font-weight: 700; color: var(--black); }
em     { font-style: italic; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.rn-container {
    width: 100%;
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.rn-section {
    padding-top: clamp(60px, 8vw, 120px);
    padding-bottom: clamp(60px, 8vw, 120px);
}

.rn-section--tight {
    padding-top: clamp(40px, 5vw, 72px);
    padding-bottom: clamp(40px, 5vw, 72px);
}

.rn-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.rn-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.rn-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.rn-flex {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rn-flex--between {
    justify-content: space-between;
}

.rn-flex--center {
    justify-content: center;
}

.rn-text-center { text-align: center; }
.rn-text-left   { text-align: left; }

/* ============================================================
   HEADER
   ============================================================ */

#rn-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: 1.5px solid var(--grey-200);
    height: var(--header-h);
    display: flex;
    align-items: center;
}

.rn-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.rn-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.rn-logo__mark {
    width: 36px;
    height: 36px;
    background: var(--red);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rn-logo__mark span {
    color: var(--white);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.rn-logo__text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.02em;
}

.rn-logo__text em {
    color: var(--red);
    font-style: normal;
}

/* Nav */
.rn-nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.rn-nav__link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--grey-600);
    text-decoration: none;
    transition: color 0.18s ease;
    letter-spacing: 0.01em;
}

.rn-nav__link:hover {
    color: var(--black);
}

.rn-nav__link.is-active {
    color: var(--black);
    font-weight: 600;
}

/* Header CTA */
.rn-header__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Hamburger (mobile) */
.rn-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.rn-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--black);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.rn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 10px 22px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.rn-btn:active {
    transform: translateY(1px);
}

/* Primary — red fill */
.rn-btn--primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.rn-btn--primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    box-shadow: 0 4px 16px rgba(200,16,46,0.28);
}

/* Secondary — outlined */
.rn-btn--secondary {
    background: transparent;
    color: var(--black);
    border-color: var(--grey-200);
}

.rn-btn--secondary:hover {
    border-color: var(--black);
    background: var(--black);
    color: var(--white);
}

/* Ghost — text only */
.rn-btn--ghost {
    background: transparent;
    color: var(--grey-600);
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}

.rn-btn--ghost:hover {
    color: var(--black);
}

/* Sizes */
.rn-btn--lg {
    font-size: 1.05rem;
    padding: 14px 32px;
    border-radius: var(--radius-md);
}

.rn-btn--sm {
    font-size: 0.82rem;
    padding: 7px 14px;
}

/* Full width */
.rn-btn--full {
    width: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */

#rn-footer {
    background: var(--black);
    color: var(--white);
    margin-top: auto;
}

.rn-footer__inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
    padding-top: 72px;
    padding-bottom: 72px;
}

.rn-footer__brand .rn-logo__text {
    color: var(--white);
}

.rn-footer__tagline {
    font-size: 0.88rem;
    color: var(--grey-400);
    margin-top: 14px;
    line-height: 1.6;
    max-width: 240px;
}

.rn-footer__col h5 {
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.rn-footer__col ul li {
    margin-bottom: 12px;
}

.rn-footer__col ul li a {
    font-size: 0.9rem;
    color: var(--grey-400);
    text-decoration: none;
    transition: color 0.18s ease;
}

.rn-footer__col ul li a:hover {
    color: var(--white);
}

.rn-footer__bottom {
    border-top: 1px solid #2a2a2a;
    padding-top: 24px;
    padding-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rn-footer__copy {
    font-size: 0.82rem;
    color: var(--grey-400);
}

.rn-footer__bottom-links {
    display: flex;
    gap: 24px;
}

.rn-footer__bottom-links a {
    font-size: 0.82rem;
    color: var(--grey-400);
    text-decoration: none;
    transition: color 0.18s ease;
}

.rn-footer__bottom-links a:hover {
    color: var(--white);
}

/* ============================================================
   CARDS
   ============================================================ */

.rn-card {
    background: var(--white);
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rn-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #ddd;
    transform: translateY(-2px);
}

.rn-card--featured {
    border-color: var(--red);
    position: relative;
}

/* ============================================================
   BADGES / TAGS
   ============================================================ */

.rn-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--grey-100);
    color: var(--grey-600);
}

.rn-badge--red {
    background: rgba(200,16,46,0.08);
    color: var(--red);
}

/* ============================================================
   DIVIDER
   ============================================================ */

.rn-divider {
    width: 100%;
    height: 1.5px;
    background: var(--grey-200);
    border: none;
    margin: 0;
}

/* ============================================================
   SECTION LABELS
   ============================================================ */

.rn-section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 18px;
}

.rn-section-label::before {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--red);
    border-radius: 2px;
}

/* ============================================================
   ALERTS / NOTICES
   ============================================================ */

.rn-notice {
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 4px solid;
}

.rn-notice--success {
    background: #f0fff4;
    border-color: #22c55e;
    color: #166534;
}

.rn-notice--error {
    background: #fff1f2;
    border-color: var(--red);
    color: #9f0e23;
}

.rn-notice--info {
    background: #f0f7ff;
    border-color: #3b82f6;
    color: #1e40af;
}

/* ============================================================
   FORMS
   ============================================================ */

.rn-form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 20px;
}

.rn-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--black);
    letter-spacing: 0.01em;
}

.rn-input,
.rn-select,
.rn-textarea {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--black);
    background: var(--white);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    appearance: none;
}

.rn-input:focus,
.rn-select:focus,
.rn-textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(200,16,46,0.10);
}

.rn-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* ============================================================
   PRICING CARDS
   ============================================================ */

.rn-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;
}

.rn-pricing-card {
    background: var(--white);
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rn-pricing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.rn-pricing-card--featured {
    border-color: var(--red);
    box-shadow: 0 0 0 1px var(--red), var(--shadow-md);
    background: #fff;
    position: relative;
}

.rn-pricing-card--featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--red);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 100px;
    white-space: nowrap;
}

.rn-pricing-card__name {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--grey-600);
    margin-bottom: 20px;
}

.rn-pricing-card__price {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    margin-bottom: 8px;
}

.rn-pricing-card__amount {
    font-size: 3rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.04em;
    line-height: 1;
}

.rn-pricing-card__currency {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 6px;
}

.rn-pricing-card__period {
    font-size: 0.88rem;
    color: var(--grey-400);
    margin-bottom: 4px;
    padding-bottom: 4px;
}

.rn-pricing-card__desc {
    font-size: 0.9rem;
    color: var(--grey-600);
    margin-bottom: 32px;
    line-height: 1.55;
}

.rn-pricing-card__divider {
    height: 1.5px;
    background: var(--grey-200);
    margin-bottom: 28px;
}

.rn-pricing-card__features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 13px;
    flex: 1;
    margin-bottom: 36px;
}

.rn-pricing-card__features li {
    font-size: 0.92rem;
    color: var(--black);
    display: flex;
    align-items: flex-start;
    gap: 11px;
    line-height: 1.45;
}

.rn-pricing-card__features li::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='9' fill='%23C8102E' opacity='0.1'/%3E%3Cpath d='M5 9l3 3 5-5' stroke='%23C8102E' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    margin-top: 1px;
}

/* ============================================================
   HERO
   ============================================================ */

.rn-hero {
    padding-top: clamp(72px, 10vw, 140px);
    padding-bottom: clamp(72px, 10vw, 140px);
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.rn-hero::after {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(200,16,46,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.rn-hero__eyebrow {
    margin-bottom: 24px;
}

.rn-hero__title {
    margin-bottom: 24px;
}

.rn-hero__title span {
    color: var(--red);
}

.rn-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--grey-600);
    margin-bottom: 40px;
    max-width: 580px;
    line-height: 1.7;
}

.rn-hero__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================================
   MOBILE NAV DRAWER
   ============================================================ */

.rn-mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    flex-direction: column;
    padding: 32px var(--gutter);
    gap: 8px;
    border-top: 1.5px solid var(--grey-200);
}

.rn-mobile-nav.is-open {
    display: flex;
}

.rn-mobile-nav a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    padding: 14px 0;
    border-bottom: 1px solid var(--grey-200);
    text-decoration: none;
}

.rn-mobile-nav .rn-btn {
    margin-top: 16px;
    width: 100%;
    justify-content: center;
}

/* ============================================================
   CONTENT PAGES (page.php generic)
   ============================================================ */

.rn-page-content {
    padding-top: clamp(48px, 6vw, 96px);
    padding-bottom: clamp(48px, 6vw, 96px);
}

.rn-page-content h1 {
    margin-bottom: 28px;
}

.rn-page-content h2 {
    margin-top: 48px;
    margin-bottom: 16px;
}

.rn-page-content h3 {
    margin-top: 36px;
    margin-bottom: 12px;
}

.rn-page-content p {
    margin-bottom: 20px;
}

.rn-page-content ul,
.rn-page-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
    list-style: disc;
}

.rn-page-content ol {
    list-style: decimal;
}

.rn-page-content li {
    font-size: 1rem;
    color: var(--grey-600);
    line-height: 1.75;
    margin-bottom: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
    .rn-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .rn-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .rn-pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
    .rn-footer__inner { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .rn-nav { display: none; }
    .rn-hamburger { display: flex; }
    .rn-grid-2 { grid-template-columns: 1fr; }
    .rn-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .rn-footer__inner { grid-template-columns: 1fr; gap: 32px; }
    .rn-footer__bottom { flex-direction: column; gap: 12px; text-align: center; }
    .rn-hero__actions { flex-direction: column; align-items: flex-start; }
    .rn-pricing-card { padding: 32px 24px; }
}
